From 8fce3924e51eed84793dc8d4751c6dd2de17d966 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 15 Mar 2015 12:54:53 +0000 Subject: [PATCH] logger: use errx() when checking user input Additionally inform in usage() the --msgid requires an argument. Signed-off-by: Sami Kerola --- misc-utils/logger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc-utils/logger.c b/misc-utils/logger.c index 5af24469d2..8255ce6b95 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -656,7 +656,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out) fputs(_(" --rfc3164 use the obsolete BSD syslog protocol\n"), out); fputs(_(" --rfc5424[=] use the syslog protocol (the default for remote);\n" " 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 set rfc5424 message id field\n"), out); fputs(_(" -u, --socket write to this Unix socket\n"), out); fputs(_(" --socket-errors[=]\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 -- 2.47.2