]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
dmesg: cleanup usage()
authorKarel Zak <kzak@redhat.com>
Tue, 16 Aug 2011 11:02:00 +0000 (13:02 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 16 Aug 2011 11:02:00 +0000 (13:02 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/wipefs.c
sys-utils/dmesg.c

index 10102aea48e192da436f774bf4923bb442b9ec12..58fc03d00d89c87aec13fd92e8e6529f59d0c9c3 100644 (file)
@@ -300,16 +300,17 @@ strtoll_offset(const char *str)
 static void __attribute__((__noreturn__))
 usage(FILE *out)
 {
-       fprintf(out, _("Usage: %s [options] <device>\n\nOptions:\n"),
-                       program_invocation_short_name);
-
-       fprintf(out, _(
-       " -a, --all           wipe all magic strings (BE CAREFUL!)\n"
-       " -h, --help          show this help text\n"
-       " -n, --no-act        do everything except the actual write() call\n"
-       " -o, --offset <num>  offset to erase, in bytes\n"
-       " -p, --parsable      print out in parsable instead of printable format\n"
-       " -V, --version       output version information and exit\n"));
+       fputs(_("\nUsage:\n"), out);
+       fprintf(out,
+             _(" %s [options] <device>\n"), program_invocation_short_name);
+
+       fputs(_("\nOptions:\n"), out);
+       fputs(_(" -a, --all           wipe all magic strings (BE CAREFUL!)\n"
+               " -h, --help          show this help text\n"
+               " -n, --no-act        do everything except the actual write() call\n"
+               " -o, --offset <num>  offset to erase, in bytes\n"
+               " -p, --parsable      print out in parsable instead of printable format\n"
+               " -V, --version       output version information and exit\n"), out);
 
        fprintf(out, _("\nFor more information see wipefs(8).\n"));
 
index 705269db0db7ed3bf32d2156620c66d775e5ff36..6090f4e67ce4165cd8d25e1c3b793b88164c2563 100644 (file)
@@ -129,39 +129,38 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
 {
        size_t i;
 
-       fprintf(out, _(
-               "\nUsage:\n"
-               " %s [options]\n"), program_invocation_short_name);
-
-       fprintf(out, _(
-               "\nOptions:\n"
-               " -C, --clear               clear the kernel ring buffer\n"
-               " -c, --read-clear          read and clear all messages\n"
-               " -D, --console-off         disable printing messages to console\n"
-               " -d, --show-delta          show time delta between printed messages\n"
-               " -E, --console-on          enable printing messages to console\n"
-               " -f, --facility=LIST       restrict output to defined facilities\n"
-               " -h, --help                display this help and exit\n"
-               " -k, --kernel              display kernel messages\n"
-               " -l, --level=LIST          restrict output to defined levels\n"
-               " -n, --console-level=LEVEL set level of messages printed to console\n"
-               " -r, --raw                 print the raw message buffer\n"
-               " -s, --buffer-size=SIZE    buffer size to query the kernel ring buffer\n"
-               " -T, --ctime               show human readable timestamp (could be \n"
-               "                           inaccurate if you have used SUSPEND/RESUME)\n"
-               " -t, --notime              don't print messages timestamp\n"
-               " -u, --userspace           display userspace messages\n"
-               " -V, --version             output version information and exit\n"
-               " -x, --decode              decode facility and level to readable string\n\n"));
-
-       fprintf(out, _("Supported log facilities:\n"));
+       fputs(_("\nUsage:\n"), out);
+       fprintf(out,
+             _(" %s [options]\n"), program_invocation_short_name);
+
+       fputs(_("\nOptions:\n"), out);
+       fputs(_(" -C, --clear                 clear the kernel ring buffer\n"
+               " -c, --read-clear            read and clear all messages\n"
+               " -D, --console-off           disable printing messages to console\n"
+               " -d, --show-delta            show time delta between printed messages\n"
+               " -E, --console-on            enable printing messages to console\n"
+               " -f, --facility <list>       restrict output to defined facilities\n"
+               " -h, --help                  display this help and exit\n"
+               " -k, --kernel                display kernel messages\n"
+               " -l, --level <list>          restrict output to defined levels\n"
+               " -n, --console-level <level> set level of messages printed to console\n"
+               " -r, --raw                   print the raw message buffer\n"
+               " -s, --buffer-size <size>    buffer size to query the kernel ring buffer\n"
+               " -T, --ctime                 show human readable timestamp (could be \n"
+               "                             inaccurate if you have used SUSPEND/RESUME)\n"
+               " -t, --notime                don't print messages timestamp\n"
+               " -u, --userspace             display userspace messages\n"
+               " -V, --version               output version information and exit\n"
+               " -x, --decode                decode facility and level to readable string\n"), out);
+
+       fputs(_("\nSupported log facilities:\n"), out);
        for (i = 0; i < ARRAY_SIZE(level_names); i++) {
                fprintf(stderr, " %7s - %s\n",
                                facility_names[i].name,
                                _(facility_names[i].help));
        }
 
-       fprintf(out, _("\nSupported log levels (priorities):\n"));
+       fputs(_("\nSupported log levels (priorities):\n"), out);
        for (i = 0; i < ARRAY_SIZE(level_names); i++) {
                fprintf(stderr, " %7s - %s\n",
                                level_names[i].name,