]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf list: Fix the --no-desc option
authorBreno Leitao <leitao@debian.org>
Fri, 17 May 2024 14:14:26 +0000 (07:14 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Tue, 28 May 2024 18:29:49 +0000 (11:29 -0700)
commit265b71153e1ac270546f1d0d2a59a565947f2ed3
treed0165f7f8a6efb344265802f80328982eb5a6fc4
parentcbd446b4db7efce27311f3186f81c2a2d906dd60
perf list: Fix the --no-desc option

Currently, the --no-desc option in perf list isn't functioning as
intended.

This issue arises from the overwriting of struct option->desc with the
opposite value of struct option->long_desc. Consequently, whatever
parse_options() returns at struct option->desc gets overridden later,
rendering the --desc or --no-desc arguments ineffective.

To resolve this, set ->desc as true by default and allow parse_options()
to adjust it accordingly. This adjustment will fix the --no-desc
option while preserving the functionality of the other parameters.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: leit@meta.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240517141427.1905691-1-leitao@debian.org
tools/perf/builtin-list.c