]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsmem: improve usage() output
authorKarel Zak <kzak@redhat.com>
Tue, 28 Apr 2026 13:35:37 +0000 (15:35 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 28 Apr 2026 13:35:37 +0000 (15:35 +0200)
Sort options alphabetically and use [=<when>] consistently for
--summary (matching --annotate and other tools).

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lsmem.c

index 46f4ef9fe5931359c4eb9409fb22db03252c1a15..db80956d8fc72d86f61f462a981a39e0e3bece68 100644 (file)
@@ -667,18 +667,18 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_("List the ranges of available memory with their online status.\n"), out);
 
        fputs(USAGE_OPTIONS, out);
-       fputs(_(" -J, --json                use JSON output format\n"), out);
-       fputs(_(" -P, --pairs               use key=\"value\" output format\n"), out);
        fputs(_(" -a, --all                 list each individual memory block\n"), out);
+       fputs(_("     --annotate[=<when>]   annotate columns with a tooltip (always|never|auto)\n"), out);
        fputs(_(" -b, --bytes               print SIZE in bytes rather than in human readable format\n"), out);
+       fputs(_(" -J, --json                use JSON output format\n"), out);
        fputs(_(" -n, --noheadings          don't print headings\n"), out);
        fputs(_(" -o, --output <list>       output columns\n"), out);
        fputs(_("     --output-all          output all columns\n"), out);
+       fputs(_(" -P, --pairs               use key=\"value\" output format\n"), out);
        fputs(_(" -r, --raw                 use raw output format\n"), out);
-       fputs(_("     --annotate[=<when>]   annotate columns with a tooltip (always|never|auto)\n"), out);
        fputs(_(" -S, --split <list>        split ranges by specified columns\n"), out);
        fputs(_(" -s, --sysroot <dir>       use the specified directory as system root\n"), out);
-       fputs(_("     --summary[=when]      print summary information (never,always or only)\n"), out);
+       fputs(_("     --summary[=<when>]    print summary information (never,always or only)\n"), out);
 
        fputs(USAGE_SEPARATOR, out);
        fprintf(out, USAGE_HELP_OPTIONS(27));