summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKarel Zak2017-04-26 11:17:46 +0200
committerKarel Zak2017-04-26 11:17:46 +0200
commit97fc6ccf791fc44f945f779608051a7bd3b6ea65 (patch)
treeb2bfc0dcc5de6ddb0ba1184ed9e28c2c0c116a21 /include
parentlibfdisk: fix NLS support (diff)
parentoptutils.h: don't print non-graph characters (diff)
downloadkernel-qcow2-util-linux-97fc6ccf791fc44f945f779608051a7bd3b6ea65.tar.gz
kernel-qcow2-util-linux-97fc6ccf791fc44f945f779608051a7bd3b6ea65.tar.xz
kernel-qcow2-util-linux-97fc6ccf791fc44f945f779608051a7bd3b6ea65.zip
Merge branch '170415' of github.com:jwpi/util-linux
* '170415' of github.com:jwpi/util-linux: optutils.h: don't print non-graph characters hwclock: improve audit control hwclock: --set and --predict segmentation fault hwclock: make epoch functions alpha only hwclock: improve default function handling
Diffstat (limited to 'include')
-rw-r--r--include/optutils.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/optutils.h b/include/optutils.h
index 325cb8812..0dc127bbc 100644
--- a/include/optutils.h
+++ b/include/optutils.h
@@ -5,6 +5,7 @@
#include "c.h"
#include "nls.h"
+#include "cctype.h"
static inline const char *option_to_longopt(int c, const struct option *opts)
{
@@ -81,8 +82,8 @@ static inline void err_exclusive_options(
else if (status[e] != c) {
size_t ct = 0;
- fprintf(stderr, _("%s: these options are "
- "mutually exclusive:"),
+ fprintf(stderr, _("%s: mutually exclusive "
+ "arguments:"),
program_invocation_short_name);
for (op = excl[e];
@@ -91,7 +92,7 @@ static inline void err_exclusive_options(
const char *n = option_to_longopt(*op, opts);
if (n)
fprintf(stderr, " --%s", n);
- else
+ else if (c_isgraph(*op))
fprintf(stderr, " -%c", *op);
}
fputc('\n', stderr);