]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
logger: use errx() when checking user input
authorSami Kerola <kerolasa@iki.fi>
Sun, 15 Mar 2015 12:54:53 +0000 (12:54 +0000)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Mar 2015 10:45:38 +0000 (11:45 +0100)
Additionally inform in usage() the --msgid requires an argument.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/logger.c

index 5af24469d2b51966718c323c8dceeaf92b2359a0..8255ce6b95f0e3de2ada547b1d8dfacb202e5c55 100644 (file)
@@ -656,7 +656,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
        fputs(_("     --rfc3164            use the obsolete BSD syslog protocol\n"), out);
        fputs(_("     --rfc5424[=<snip>]   use the syslog protocol (the default for remote);\n"
                "                            <snip> can be notime, or notq, and/or nohost\n"), out);
-       fputs(_("     --msgid              set rfc5424 MSGID field, ignored for non-rfc5424 format\n"), out);
+       fputs(_("     --msgid <msgid>      set rfc5424 message id field\n"), out);
        fputs(_(" -u, --socket <socket>    write to this Unix socket\n"), out);
        fputs(_("     --socket-errors[=<on|off|auto>]\n"
                "                          print connection errors when using Unix sockets\n"), out);
@@ -806,7 +806,7 @@ int main(int argc, char **argv)
                        break;
                case OPT_MSGID:
                        if (strchr(optarg, ' '))
-                               err(EXIT_FAILURE, _("--msgid cannot contain space"));
+                               errx(EXIT_FAILURE, _("--msgid cannot contain space"));
                        ctl.msgid = optarg;
                        break;
 #ifdef HAVE_LIBSYSTEMD