summaryrefslogtreecommitdiffstats
path: root/term-utils/wall.c
diff options
context:
space:
mode:
authorSami Kerola2013-08-18 01:46:02 +0200
committerSami Kerola2013-08-29 19:14:07 +0200
commitbbeae1cef163e2275ffa6c8a3fa271e4b69d2c6c (patch)
tree1bd76b9ad0409d1f7ef10f727ac5ff5ffa1c11c8 /term-utils/wall.c
parentlast: fix typo (diff)
downloadkernel-qcow2-util-linux-bbeae1cef163e2275ffa6c8a3fa271e4b69d2c6c.tar.gz
kernel-qcow2-util-linux-bbeae1cef163e2275ffa6c8a3fa271e4b69d2c6c.tar.xz
kernel-qcow2-util-linux-bbeae1cef163e2275ffa6c8a3fa271e4b69d2c6c.zip
wall: sync usage() with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils/wall.c')
-rw-r--r--term-utils/wall.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/term-utils/wall.c b/term-utils/wall.c
index 98dc5c7f4..451b5d31a 100644
--- a/term-utils/wall.c
+++ b/term-utils/wall.c
@@ -77,16 +77,16 @@ static char *makemsg(char *fname, char **mvec, int mvecsz,
static void __attribute__((__noreturn__)) usage(FILE *out)
{
- fputs(_("\nUsage:\n"), out);
+ fputs(USAGE_HEADER, out);
fprintf(out,
- _(" %s [options] [<file> | <message>]\n"),
- program_invocation_short_name);
-
- fputs(_("\nOptions:\n"), out);
- fputs(_(" -n, --nobanner do not print banner, works only for root\n"
- " -t, --timeout <timeout> write timeout in seconds\n"
- " -V, --version output version information and exit\n"
- " -h, --help display this help and exit\n\n"), out);
+ _(" %s [options] [<file> | <message>]\n"), program_invocation_short_name);
+ fputs(USAGE_OPTIONS, out);
+ fputs(_(" -n, --nobanner do not print banner, works only for root\n"), out);
+ fputs(_(" -t, --timeout <timeout> write timeout in seconds\n"), out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
+ fprintf(out, USAGE_MAN_TAIL("wall(1)"));
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
@@ -132,8 +132,7 @@ int main(int argc, char **argv)
errx(EXIT_FAILURE, _("invalid timeout argument: %s"), optarg);
break;
case 'V':
- printf(_("%s from %s\n"), program_invocation_short_name,
- PACKAGE_STRING);
+ printf(UTIL_LINUX_VERSION);
exit(EXIT_SUCCESS);
case 'h':
usage(stdout);