Commit 76e7f12c authored by Pavel Emelyanov's avatar Pavel Emelyanov

log: Fix loglevel assignment

For some reason the optind was misused (maybe I broke it with prev patch)
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 0b76ba37
......@@ -134,7 +134,7 @@ int main(int argc, char *argv[])
break;
case 'v':
if (optind < argc - 1) {
char *opt = argv[optind + 1];
char *opt = argv[optind];
if (isdigit(*opt)) {
log_level = -atoi(opt);
......
......@@ -101,6 +101,8 @@ void log_set_loglevel(unsigned int level)
current_loglevel = DEFAULT_LOGLEVEL;
else
current_loglevel = level;
pr_msg("Loglevel set to %d\n", level);
}
void print_on_level(unsigned int loglevel, const char *format, ...)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment