mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Hyptop should be able to accept abbreviations of the long command line options as getopt() is able to match them. Ex; $ hyptop --batch-mode $ hyptop --batch $ hyptop --bat From getopt(3) man page: """ Long option names may be abbreviated if the abbreviation is unique or is an exact match for some defined option. """ After the introduction of commitc5695e43c4("hyptop/opts: Replace long option formats for consistency") long command line options for hyptop received additional definitions to support dash separated option formats. Unfortunately these definitions were defined as new and unique options and caused an ambiguity for getopt() when abbreviations matched both definitions. Ex; $ hyptop --batch hyptop: option '--batch' is ambiguous; possibilities: '--batch-mode' '--batch_mode' Map both long option formats to the same short option to fix the issue and restore the functionality. Fixes:c5695e43c4("hyptop/opts: Replace long option formats for consistency") Reported-by: Gorkem Kilinc <kilinc@linux.ibm.com> Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Mete Durlu <meted@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>