Message ID | 20210625201511.1206465-4-rostedt@goodmis.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 9d848f98ce90b8df0b24a8cc03aa5a90e889f5c8 |
Headers | show |
Series | trace-cmd: Update verbose logic | expand |
diff --git a/tracecmd/trace-cmd.c b/tracecmd/trace-cmd.c index 7f5d1ffd..9fc126e4 100644 --- a/tracecmd/trace-cmd.c +++ b/tracecmd/trace-cmd.c @@ -68,7 +68,9 @@ int trace_set_verbose(char *level) if (isdigit(level[0])) { id = atoi(level); - if (id >= TEP_LOG_NONE && id <= TEP_LOG_ALL) { + if (id >= TEP_LOG_NONE) { + if (id > TEP_LOG_ALL) + id = TEP_LOG_ALL; tracecmd_set_loglevel(id); return 0; }