mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
376ddfbd22
Hyptop's "--sort_field" command line option has always been documented as "--sort", while the code _only_ explicitly has "--sort_field". Specifying the shorter "--sort" happened to work due to an unnoticed getopt() behavior. 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. """ With the addition of "--sort-field" as another unique identifier via commitc5695e43c4("hyptop/opts: Replace long option formats for consistency") "--sort" is no longer unique. getopt() won't be able to use that as an abbreviation, since there is ambiguity between "--sort_field" and new "--sort-field" as they are defined as separate options. Replace "--sort-field" and "--sort_field" with plain "--sort" to adhere to the documented hyptop command line argument specification and resolve the broken behavior. 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>