summaryrefslogtreecommitdiffstats
path: root/misc-utils/logger.c
diff options
context:
space:
mode:
authorSami Kerola2015-03-15 13:54:53 +0100
committerKarel Zak2015-03-16 11:45:38 +0100
commit8fce3924e51eed84793dc8d4751c6dd2de17d966 (patch)
tree3d5c7c2b36e59fc724ae6006fc3432a88ddfe23f /misc-utils/logger.c
parentlogger: check xgethostname() return value (diff)
downloadkernel-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.c4
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