• Yang Jihong's avatar
    perf probe: Check -v and -q options in the right place · 8b269b75
    Yang Jihong authored
    Check the -q and -v options first to return earlier on error.
    
    Before:
    
      # perf probe -q -v test
      probe-definition(0): test
      symbol:test file:(null) line:0 offset:0 return:0 lazy:(null)
      0 arguments
        Error: -v and -q are exclusive.
    
    After:
    
      # perf probe -q -v test
        Error: -v and -q are exclusive.
    
    Fixes: 5e17b28f
    
     ("perf probe: Add --quiet option to suppress output result message")
    Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Carsten Haitzler <carsten.haitzler@arm.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Leo Yan <leo.yan@linaro.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Martin KaFai Lau <martin.lau@kernel.org>
    Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Cc: Masami Hiramatsu <mhiramat@kern...
    8b269b75
builtin-probe.c 19 KB