mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
log: Fix loglevel assignment
For some reason the optind was misused (maybe I broke it with prev patch) Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
0b76ba375e
commit
76e7f12cb8
2 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
2
log.c
2
log.c
|
|
@ -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, ...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue