From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> Applications that have a "verbose" option, do not usually set an upper limit of what can be passed in. If the max is -V6, trace-cmd should not error if someone passes in -V7. The way this is handled, is just set the verbosity to the highest level if the number supplied is above the highest level. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- tracecmd/trace-cmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.30.2