From: Avinal Kumar Date: Mon, 5 Jan 2026 13:29:27 +0000 (+0530) Subject: elf: Fix ambiguous error message for --f in sotruss [BZ #25257] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19e84d59a40d93720883bc54dae0c09e07760b5a;p=thirdparty%2Fglibc.git elf: Fix ambiguous error message for --f in sotruss [BZ #25257] The sotruss utility printed an incomplete error message when the ambiguous option --f was used. The message did not list the possible matching options, making it unclear how to resolve the ambiguity. This commit corrects the error message to report all valid alternatives. Example after this change: $ sotruss --f /bin/true sotruss: option '--f' is ambiguous; possibilities: '--from' '--follow' Try `sotruss --help' or `sotruss --usage' for more information. This fixes BZ #25257. Signed-off-by: Avinal Kumar Suggested-by: Carlos Santos Reviewed-by: Adhemerval Zanella --- diff --git a/elf/sotruss.sh b/elf/sotruss.sh index 06216e612f..c90abaaed9 100755 --- a/elf/sotruss.sh +++ b/elf/sotruss.sh @@ -58,7 +58,8 @@ do_missing_arg() { } do_ambiguous() { - printf >&2 $"%s: option is ambiguous; possibilities:" + printf >&2 $"%s: option '%s' is ambiguous; possibilities:" "sotruss" "$1" + shift while test $# -gt 0; do printf >&2 " '%s'" $1 shift @@ -124,7 +125,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SOTRUSS_EXIT=1 ;; --f) - do_ambiguous '--from' '--follow' + do_ambiguous '--f' '--from' '--follow' ;; --) shift