diff options
author | Sami Kerola | 2015-03-15 13:54:53 +0100 |
---|---|---|
committer | Karel Zak | 2015-03-16 11:45:38 +0100 |
commit | 8fce3924e51eed84793dc8d4751c6dd2de17d966 (patch) | |
tree | 3d5c7c2b36e59fc724ae6006fc3432a88ddfe23f /misc-utils/logger.c | |
parent | logger: check xgethostname() return value (diff) | |
download | kernel-qcow2-util-linux-8fce3924e51eed84793dc8d4751c6dd2de17d966.tar.gz kernel-qcow2-util-linux-8fce3924e51eed84793dc8d4751c6dd2de17d966.tar.xz kernel-qcow2-util-linux-8fce3924e51eed84793dc8d4751c6dd2de17d966.zip |
logger: use errx() when checking user input
Additionally inform in usage() the --msgid requires an argument.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils/logger.c')
-rw-r--r-- | misc-utils/logger.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc-utils/logger.c b/misc-utils/logger.c index 5af24469d..8255ce6b9 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[=<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 |