mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-04 13:47:35 -08:00
dev-util/perf: apply fix for --help option and help command
Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
This commit is contained in:
parent
399bcdd904
commit
a77ba80e01
27
dev-util/perf/files/perf-6.18-subcmd.patch
Normal file
27
dev-util/perf/files/perf-6.18-subcmd.patch
Normal file
@ -0,0 +1,27 @@
|
||||
Fix for --help command when no commands are excluded.
|
||||
|
||||
Link: https://lore.kernel.org/lkml/20251202213632.2873731-1-sjayaram@akamai.com/
|
||||
|
||||
See also: https://lore.kernel.org/lkml/aTXQw9dtP5df7LmP@gentoo.org/
|
||||
|
||||
--- a/tools/lib/subcmd/help.c
|
||||
+++ b/tools/lib/subcmd/help.c
|
||||
@@ -97,11 +97,13 @@ void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes)
|
||||
ei++;
|
||||
}
|
||||
}
|
||||
- if (ci != cj) {
|
||||
- while (ci < cmds->cnt) {
|
||||
- cmds->names[cj++] = cmds->names[ci];
|
||||
- cmds->names[ci++] = NULL;
|
||||
+ while (ci < cmds->cnt) {
|
||||
+ if (ci != cj) {
|
||||
+ cmds->names[cj] = cmds->names[ci];
|
||||
+ cmds->names[ci] = NULL;
|
||||
}
|
||||
+ ci++;
|
||||
+ cj++;
|
||||
}
|
||||
for (ci = cj; ci < cmds->cnt; ci++)
|
||||
assert(cmds->names[ci] == NULL);
|
||||
--
|
||||
@ -177,6 +177,7 @@ src_prepare() {
|
||||
|
||||
pushd "${S_K}" >/dev/null || die
|
||||
# Gentoo patches go here
|
||||
eapply "${FILESDIR}/${P}-subcmd.patch"
|
||||
popd || die
|
||||
|
||||
# Drop some upstream too-developer-oriented flags and fix the
|
||||
Loading…
x
Reference in New Issue
Block a user