From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> Consolidate --help and --version descriptions. We are now able to align them to the other options. We changed include/c.h. The rest of this patch was generated by sed, plus manually setting the right alignment numbers. We do not change anything but white spaces in the --help output. Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> --- Documentation/boilerplate.c | 3 +-- disk-utils/addpart.c | 3 +-- disk-utils/cfdisk.c | 3 +-- disk-utils/delpart.c | 3 +-- disk-utils/fdformat.c | 3 +-- disk-utils/fdisk.c | 3 +-- disk-utils/fsck.cramfs.c | 3 +-- disk-utils/fsck.minix.c | 3 +-- disk-utils/isosize.c | 3 +-- disk-utils/mkfs.cramfs.c | 3 +-- disk-utils/mkfs.minix.c | 3 +-- disk-utils/partx.c | 3 +-- disk-utils/raw.c | 3 +-- disk-utils/resizepart.c | 3 +-- disk-utils/sfdisk.c | 4 ++-- disk-utils/swaplabel.c | 3 +-- include/c.h | 14 ++++++++++++-- login-utils/last.c | 3 +-- login-utils/lslogins.c | 3 +-- login-utils/newgrp.c | 3 +-- login-utils/nologin.c | 3 +-- login-utils/su-common.c | 3 +-- login-utils/sulogin.c | 3 +-- login-utils/utmpdump.c | 3 +-- login-utils/vipw.c | 3 +-- misc-utils/blkid.c | 3 +-- misc-utils/cal.c | 3 +-- misc-utils/fincore.c | 3 +-- misc-utils/findfs.c | 3 +-- misc-utils/findmnt.c | 3 +-- misc-utils/getopt.c | 3 +-- misc-utils/kill.c | 3 +-- misc-utils/logger.c | 3 +-- misc-utils/look.c | 3 +-- misc-utils/lsblk.c | 3 +-- misc-utils/lslocks.c | 3 +-- misc-utils/mcookie.c | 3 +-- misc-utils/rename.c | 3 +-- misc-utils/uuidd.c | 3 +-- misc-utils/uuidgen.c | 3 +-- misc-utils/uuidparse.c | 3 +-- misc-utils/whereis.c | 3 +-- schedutils/chrt.c | 3 +-- schedutils/ionice.c | 3 +-- schedutils/taskset.c | 1 - sys-utils/blkdiscard.c | 3 +-- sys-utils/blkzone.c | 3 +-- sys-utils/chmem.c | 3 +-- sys-utils/ctrlaltdel.c | 3 +-- sys-utils/dmesg.c | 3 +-- sys-utils/eject.c | 3 +-- sys-utils/fallocate.c | 3 +-- sys-utils/flock.c | 3 +-- sys-utils/fsfreeze.c | 3 +-- sys-utils/fstrim.c | 3 +-- sys-utils/hwclock.c | 3 +-- sys-utils/ipcmk.c | 3 +-- sys-utils/ipcrm.c | 3 +-- sys-utils/ipcs.c | 3 +-- sys-utils/ldattach.c | 3 +-- sys-utils/losetup.c | 3 +-- sys-utils/lscpu.c | 3 +-- sys-utils/lsipc.c | 3 +-- sys-utils/lsmem.c | 3 +-- sys-utils/lsns.c | 3 +-- sys-utils/mount.c | 3 +-- sys-utils/mountpoint.c | 3 +-- sys-utils/nsenter.c | 3 +-- sys-utils/pivot_root.c | 3 +-- sys-utils/readprofile.c | 3 +-- sys-utils/renice.c | 3 +-- sys-utils/rtcwake.c | 3 +-- sys-utils/setarch.c | 3 +-- sys-utils/setpriv.c | 3 +-- sys-utils/setsid.c | 3 +-- sys-utils/swapoff.c | 3 +-- sys-utils/swapon.c | 3 +-- sys-utils/switch_root.c | 3 +-- sys-utils/tunelp.c | 3 +-- sys-utils/umount.c | 3 +-- sys-utils/unshare.c | 3 +-- sys-utils/wdctl.c | 3 +-- sys-utils/zramctl.c | 3 +-- term-utils/mesg.c | 3 +-- term-utils/wall.c | 3 +-- term-utils/write.c | 3 +-- text-utils/colcrt.c | 3 +-- text-utils/colrm.c | 3 +-- text-utils/column.c | 3 +-- text-utils/hexdump.c | 3 +-- text-utils/line.c | 3 +-- text-utils/pg.c | 3 +-- text-utils/rev.c | 3 +-- text-utils/ul.c | 3 +-- 94 files changed, 105 insertions(+), 187 deletions(-) diff --git a/Documentation/boilerplate.c b/Documentation/boilerplate.c index d0c163d8c..c9d110dd7 100644 --- a/Documentation/boilerplate.c +++ b/Documentation/boilerplate.c @@ -56,8 +56,7 @@ static void __attribute__((__noreturn__)) usage(void) " consecutive lines are intended by two spaces\n"), out); fputs(_(" -f, --foobar next option description resets indent\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(25); /* char offset to align option descriptions */ fprintf(out, USAGE_MAN_TAIL("fixme-command-name(1)")); exit(EXIT_SUCCESS); } diff --git a/disk-utils/addpart.c b/disk-utils/addpart.c index 07f4ca9a1..4393b1d05 100644 --- a/disk-utils/addpart.c +++ b/disk-utils/addpart.c @@ -19,8 +19,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Tell the kernel about the existence of a specified partition.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("addpart(8)")); exit(EXIT_SUCCESS); } diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index e17bc9167..a74611f34 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -2559,8 +2559,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -z, --zero start with zeroed partition table\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(26); fprintf(out, USAGE_MAN_TAIL("cfdisk(8)")); exit(EXIT_SUCCESS); diff --git a/disk-utils/delpart.c b/disk-utils/delpart.c index 7f347c886..1c9f56f82 100644 --- a/disk-utils/delpart.c +++ b/disk-utils/delpart.c @@ -19,8 +19,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Tell the kernel to forget about a specified partition.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("delpart(8)")); exit(EXIT_SUCCESS); } diff --git a/disk-utils/fdformat.c b/disk-utils/fdformat.c index 4b5ed5690..1a5323755 100644 --- a/disk-utils/fdformat.c +++ b/disk-utils/fdformat.c @@ -156,8 +156,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -n, --no-verify disable the verification after the format\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(19); fprintf(out, USAGE_MAN_TAIL("fdformat(8)")); exit(EXIT_SUCCESS); diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c index afd968076..9e98dd436 100644 --- a/disk-utils/fdisk.c +++ b/disk-utils/fdisk.c @@ -785,8 +785,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -S, --sectors <number> specify the number of sectors per track\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(31); list_available_columns(out); diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c index ff056c869..df13d2bb4 100644 --- a/disk-utils/fsck.cramfs.c +++ b/disk-utils/fsck.cramfs.c @@ -120,8 +120,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -b, --blocksize <size> use this blocksize, defaults to page size\n"), out); fputs(_(" --extract[=<dir>] test uncompression, optionally extract into <dir>\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fputs(USAGE_SEPARATOR, out); exit(FSCK_EX_OK); diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c index 13b12926c..f39266b89 100644 --- a/disk-utils/fsck.minix.c +++ b/disk-utils/fsck.minix.c @@ -192,8 +192,7 @@ usage(void) { fputs(_(" -m, --uncleared activate mode not cleared warnings\n"), out); fputs(_(" -f, --force force check\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(18); fprintf(out, USAGE_MAN_TAIL("fsck.minix(8)")); exit(FSCK_EX_OK); } diff --git a/disk-utils/isosize.c b/disk-utils/isosize.c index ed43c9d70..c763a1888 100644 --- a/disk-utils/isosize.c +++ b/disk-utils/isosize.c @@ -141,8 +141,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -d, --divisor=<number> divide the amount of bytes by <number>\n"), out); fputs(_(" -x, --sectors show sector count and size\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(25); fprintf(out, USAGE_MAN_TAIL("isosize(8)")); exit(EXIT_SUCCESS); diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c index 74664a811..ff8199d85 100644 --- a/disk-utils/mkfs.cramfs.c +++ b/disk-utils/mkfs.cramfs.c @@ -144,8 +144,7 @@ static void __attribute__((__noreturn__)) usage(void) program_invocation_short_name, PAD_SIZE); fputs(USAGE_SEPARATOR, stdout); - fputs(USAGE_HELP, stdout); - fputs(USAGE_VERSION, stdout); + PRINT_USAGE_HELP(16); printf(USAGE_MAN_TAIL("mkfs.cramfs(8)")); exit(MKFS_EX_OK); } diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c index 39e159f7a..f67ce39ed 100644 --- a/disk-utils/mkfs.minix.c +++ b/disk-utils/mkfs.minix.c @@ -145,8 +145,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -c, --check check the device for bad blocks\n"), out); fputs(_(" -l, --badblocks <file> list of bad blocks from file\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(25); fprintf(out, USAGE_MAN_TAIL("mkfs.minix(8)")); exit(MKFS_EX_OK); } diff --git a/disk-utils/partx.c b/disk-utils/partx.c index 9a868cd81..ae7a4e03d 100644 --- a/disk-utils/partx.c +++ b/disk-utils/partx.c @@ -773,8 +773,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -v, --verbose verbose mode\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(22); fputs(USAGE_COLUMNS, out); for (i = 0; i < NCOLS; i++) diff --git a/disk-utils/raw.c b/disk-utils/raw.c index c881d86ee..d303e65ca 100644 --- a/disk-utils/raw.c +++ b/disk-utils/raw.c @@ -59,8 +59,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(USAGE_OPTIONS, out); fputs(_(" -q, --query set query mode\n"), out); fputs(_(" -a, --all query all raw devices\n"), out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("raw(8)")); exit(EXIT_SUCCESS); } diff --git a/disk-utils/resizepart.c b/disk-utils/resizepart.c index a234c8079..a283de07b 100644 --- a/disk-utils/resizepart.c +++ b/disk-utils/resizepart.c @@ -24,8 +24,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Tell the kernel about the new size of a partition.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("resizepart(8)")); exit(EXIT_SUCCESS); } diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index 6f88780d7..0a6b992f2 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -1901,8 +1901,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -u, --unit S deprecated, only sector unit is supported\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(_(" -v, --version output version information and exit\n"), out); + printf( " -h, --help %s\n", USAGE_HELP_TXT); + printf( " -v, --version %s\n", USAGE_VERSION_TXT); list_available_columns(out); diff --git a/disk-utils/swaplabel.c b/disk-utils/swaplabel.c index c8fede25e..922ed8f36 100644 --- a/disk-utils/swaplabel.c +++ b/disk-utils/swaplabel.c @@ -125,8 +125,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -L, --label <label> specify a new label\n" " -U, --uuid <uuid> specify a new uuid\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(21); fprintf(out, USAGE_MAN_TAIL("swaplabel(8)")); exit(EXIT_SUCCESS); } diff --git a/include/c.h b/include/c.h index fe46b8c2d..ce5551535 100644 --- a/include/c.h +++ b/include/c.h @@ -315,8 +315,18 @@ static inline int xusleep(useconds_t usec) #define USAGE_COMMANDS _("\nCommands:\n") #define USAGE_COLUMNS _("\nAvailable output columns:\n") #define USAGE_SEPARATOR "\n" -#define USAGE_HELP _(" -h, --help display this help and exit\n") -#define USAGE_VERSION _(" -V, --version output version information and exit\n") + +#define USAGE_HELP_TXT _("display this help and exit") +#define USAGE_VERSION_TXT _("output version information and exit") + +#define PRINT_USAGE_HELP(marg_dsc) \ + printf( \ + "%-" #marg_dsc "s%s\n" \ + "%-" #marg_dsc "s%s\n" \ + , " -h, --help", USAGE_HELP_TXT \ + , " -V, --version", USAGE_VERSION_TXT \ + ) + #define USAGE_MAN_TAIL(_man) _("\nFor more details see %s.\n"), _man #define UTIL_LINUX_VERSION _("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING diff --git a/login-utils/last.c b/login-utils/last.c index 9cf6eb377..c52667935 100644 --- a/login-utils/last.c +++ b/login-utils/last.c @@ -589,8 +589,7 @@ static void __attribute__((__noreturn__)) usage(const struct last_control *ctl) " notime|short|full|iso\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(22); fprintf(out, USAGE_MAN_TAIL("last(1)")); exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c index c15b347f2..baccdf0a2 100644 --- a/login-utils/lslogins.c +++ b/login-utils/lslogins.c @@ -1253,8 +1253,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" --wtmp-file <path> set an alternate path for wtmp\n"), out); fputs(_(" --btmp-file <path> set an alternate path for btmp\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(26); fputs(USAGE_COLUMNS, out); for (i = 0; i < ARRAY_SIZE(coldescs); i++) diff --git a/login-utils/newgrp.c b/login-utils/newgrp.c index 767ae4bcf..34e2a3016 100644 --- a/login-utils/newgrp.c +++ b/login-utils/newgrp.c @@ -176,8 +176,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Log in to a new group.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP,out); - fputs(USAGE_VERSION,out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("newgrp(1)")); exit(EXIT_SUCCESS); } diff --git a/login-utils/nologin.c b/login-utils/nologin.c index 00b4b8af8..93b7bfc0f 100644 --- a/login-utils/nologin.c +++ b/login-utils/nologin.c @@ -30,8 +30,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Politely refuse a login.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("nologin(8)")); exit(EXIT_FAILURE); diff --git a/login-utils/su-common.c b/login-utils/su-common.c index d7b0a93dd..cea7abb21 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -709,8 +709,7 @@ usage(void) fputs (_(" -s, --shell <shell> run <shell> if /etc/shells allows it\n"), stdout); fputs(USAGE_SEPARATOR, stdout); - fputs(USAGE_HELP, stdout); - fputs(USAGE_VERSION, stdout); + PRINT_USAGE_HELP(33); printf(USAGE_MAN_TAIL(su_mode == SU_MODE ? "su(1)" : "runuser(1)")); exit(EXIT_SUCCESS); } diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index ac6a15c38..0956fde97 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -812,8 +812,7 @@ static void usage(void) out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(26); fprintf(out, USAGE_MAN_TAIL("sulogin(8)")); } diff --git a/login-utils/utmpdump.c b/login-utils/utmpdump.c index 5bcb4c35f..ee1a3ecc2 100644 --- a/login-utils/utmpdump.c +++ b/login-utils/utmpdump.c @@ -311,8 +311,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -f, --follow output appended data as the file grows\n"), out); fputs(_(" -r, --reverse write back dumped data into utmp file\n"), out); fputs(_(" -o, --output <file> write to file instead of standard output\n"), out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(22); fprintf(out, USAGE_MAN_TAIL("utmpdump(1)")); exit(EXIT_SUCCESS); diff --git a/login-utils/vipw.c b/login-utils/vipw.c index e3cca4906..31649bac8 100644 --- a/login-utils/vipw.c +++ b/login-utils/vipw.c @@ -306,8 +306,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Edit the password or group file.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("vipw(8)")); exit(EXIT_SUCCESS); } diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index f4757e8c8..457c4fe3a 100644 --- a/misc-utils/blkid.c +++ b/misc-utils/blkid.c @@ -103,8 +103,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_( " -n, --match-types <list> filter by filesystem type (e.g. -n vfat,ext3)\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(28); fprintf(out, USAGE_MAN_TAIL("blkid(8)")); exit(EXIT_SUCCESS); } diff --git a/misc-utils/cal.c b/misc-utils/cal.c index f73cbbf30..87ad3ad68 100644 --- a/misc-utils/cal.c +++ b/misc-utils/cal.c @@ -1015,8 +1015,7 @@ static void __attribute__((__noreturn__)) usage(void) " %s\n", USAGE_COLORS_DEFAULT); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(23); fprintf(out, USAGE_MAN_TAIL("cal(1)")); exit(EXIT_SUCCESS); diff --git a/misc-utils/fincore.c b/misc-utils/fincore.c index f1b9fa758..20488d5b1 100644 --- a/misc-utils/fincore.c +++ b/misc-utils/fincore.c @@ -274,8 +274,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -r, --raw use raw output format\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(23); fprintf(out, USAGE_COLUMNS); diff --git a/misc-utils/findfs.c b/misc-utils/findfs.c index c01dc1d53..beb708399 100644 --- a/misc-utils/findfs.c +++ b/misc-utils/findfs.c @@ -33,8 +33,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Find a filesystem by label or UUID.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("findfs(8)")); exit(FINDFS_SUCCESS); } diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index 5394d1a60..b5e4d66d0 100644 --- a/misc-utils/findmnt.c +++ b/misc-utils/findmnt.c @@ -1246,8 +1246,7 @@ static void __attribute__((__noreturn__)) usage(void) fputc('\n', out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(24); fputs(USAGE_COLUMNS, out); for (i = 0; i < ARRAY_SIZE(infos); i++) diff --git a/misc-utils/getopt.c b/misc-utils/getopt.c index 87d088ed5..5348ee62b 100644 --- a/misc-utils/getopt.c +++ b/misc-utils/getopt.c @@ -346,8 +346,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -T, --test test for getopt(1) version\n"), stdout); fputs(_(" -u, --unquoted do not quote the output\n"), stdout); fputs(USAGE_SEPARATOR, stdout); - fputs(USAGE_HELP, stdout); - fputs(USAGE_VERSION, stdout); + PRINT_USAGE_HELP(31); printf(USAGE_MAN_TAIL("getopt(1)")); exit(EXIT_SUCCESS); } diff --git a/misc-utils/kill.c b/misc-utils/kill.c index ecee26c4e..d245049aa 100644 --- a/misc-utils/kill.c +++ b/misc-utils/kill.c @@ -318,8 +318,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" --verbose print pids that will be signaled\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(24); fprintf(out, USAGE_MAN_TAIL("kill(1)")); exit(EXIT_SUCCESS); diff --git a/misc-utils/logger.c b/misc-utils/logger.c index 0ae5c61d0..6d0d2ca01 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -1027,8 +1027,7 @@ static void __attribute__((__noreturn__)) usage(void) #endif fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(26); fprintf(out, USAGE_MAN_TAIL("logger(1)")); exit(EXIT_SUCCESS); diff --git a/misc-utils/look.c b/misc-utils/look.c index a0d898db1..2f54f8006 100644 --- a/misc-utils/look.c +++ b/misc-utils/look.c @@ -365,8 +365,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -t, --terminate <char> define the string-termination character\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(26); fprintf(out, USAGE_MAN_TAIL("look(1)")); exit(EXIT_SUCCESS); diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index d997bc71e..dde4b2fc3 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -1658,8 +1658,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -t, --topology output info about topology\n"), out); fputs(_(" -x, --sort <column> sort output by <column>\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(22); fprintf(out, USAGE_COLUMNS); diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c index 54440496a..541298ea1 100644 --- a/misc-utils/lslocks.c +++ b/misc-utils/lslocks.c @@ -507,8 +507,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -u, --notruncate don't truncate text in columns\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(24); fputs(USAGE_COLUMNS, out); diff --git a/misc-utils/mcookie.c b/misc-utils/mcookie.c index 89b9a01eb..6237f175c 100644 --- a/misc-utils/mcookie.c +++ b/misc-utils/mcookie.c @@ -91,8 +91,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -v, --verbose explain what is being done\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(23); fprintf(out, USAGE_MAN_TAIL("mcookie(1)")); exit(EXIT_SUCCESS); diff --git a/misc-utils/rename.c b/misc-utils/rename.c index 48606d75e..2fb3aa998 100644 --- a/misc-utils/rename.c +++ b/misc-utils/rename.c @@ -144,8 +144,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -n, --no-act do not make any changes\n"), out); fputs(_(" -o, --no-overwrite don't overwrite existing files\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(21); fprintf(out, USAGE_MAN_TAIL("rename(1)")); exit(EXIT_SUCCESS); } diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index faaa0c12f..71558e163 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -79,8 +79,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -d, --debug run in debugging mode\n"), out); fputs(_(" -q, --quiet turn on quiet mode\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(25); fprintf(out, USAGE_MAN_TAIL("uuidd(8)")); exit(EXIT_SUCCESS); } diff --git a/misc-utils/uuidgen.c b/misc-utils/uuidgen.c index 77fda2fb3..0d18f5704 100644 --- a/misc-utils/uuidgen.c +++ b/misc-utils/uuidgen.c @@ -32,8 +32,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -r, --random generate random-based uuid\n"), out); fputs(_(" -t, --time generate time-based uuid\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(18); fprintf(out, USAGE_MAN_TAIL("uuidgen(1)")); exit(EXIT_SUCCESS); } diff --git a/misc-utils/uuidparse.c b/misc-utils/uuidparse.c index 09a6b46a8..1c22c0cad 100644 --- a/misc-utils/uuidparse.c +++ b/misc-utils/uuidparse.c @@ -105,8 +105,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -r, --raw use the raw output format\n"), stdout); fputs(USAGE_SEPARATOR, stdout); - fputs(USAGE_HELP, stdout); - fputs(USAGE_VERSION, stdout); + PRINT_USAGE_HELP(24); fputs(USAGE_COLUMNS, stdout); for (i = 0; i < ARRAY_SIZE(infos); i++) diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c index 897a7a213..db786aae5 100644 --- a/misc-utils/whereis.c +++ b/misc-utils/whereis.c @@ -205,8 +205,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -l output effective lookup paths\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("whereis(1)")); exit(EXIT_SUCCESS); } diff --git a/schedutils/chrt.c b/schedutils/chrt.c index d1abbe14e..24a2db3f1 100644 --- a/schedutils/chrt.c +++ b/schedutils/chrt.c @@ -165,8 +165,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -v, --verbose display status information\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(22); fprintf(out, USAGE_MAN_TAIL("chrt(1)")); exit(EXIT_SUCCESS); diff --git a/schedutils/ionice.c b/schedutils/ionice.c index 9d0648bca..77fa25b89 100644 --- a/schedutils/ionice.c +++ b/schedutils/ionice.c @@ -121,8 +121,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -u, --uid <uid>... act on already running processes owned by these users\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(24); fprintf(out, USAGE_MAN_TAIL("ionice(1)")); diff --git a/schedutils/taskset.c b/schedutils/taskset.c index 9870040e7..c55b986fb 100644 --- a/schedutils/taskset.c +++ b/schedutils/taskset.c @@ -78,7 +78,6 @@ static void __attribute__((__noreturn__)) usage(void) program_invocation_short_name); fprintf(out, USAGE_MAN_TAIL("taskset(1)")); - exit(EXIT_SUCCESS); } diff --git a/sys-utils/blkdiscard.c b/sys-utils/blkdiscard.c index e6a9dce5c..332b60750 100644 --- a/sys-utils/blkdiscard.c +++ b/sys-utils/blkdiscard.c @@ -96,8 +96,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -v, --verbose print aligned length and offset\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(21); fprintf(out, USAGE_MAN_TAIL("blkdiscard(8)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/blkzone.c b/sys-utils/blkzone.c index ee4902e45..588766965 100644 --- a/sys-utils/blkzone.c +++ b/sys-utils/blkzone.c @@ -311,8 +311,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -c, --count <number> maximum number of zones\n"), out); fputs(_(" -v, --verbose display more details\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(24); fprintf(out, USAGE_MAN_TAIL("blkzone(8)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/chmem.c b/sys-utils/chmem.c index 7f7be6ab6..91ec73ca9 100644 --- a/sys-utils/chmem.c +++ b/sys-utils/chmem.c @@ -249,8 +249,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -b, --blocks use memory blocks\n"), out); fputs(_(" -v, --verbose verbose output\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("chmem(8)")); diff --git a/sys-utils/ctrlaltdel.c b/sys-utils/ctrlaltdel.c index 98c8ed832..505c8cd29 100644 --- a/sys-utils/ctrlaltdel.c +++ b/sys-utils/ctrlaltdel.c @@ -31,8 +31,7 @@ static void __attribute__((__noreturn__)) usage(void) fprintf(out, _("Set the function of the Ctrl-Alt-Del combination.\n")); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION,out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("ctrlaltdel(8)")); exit(EXIT_SUCCESS); } diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index cd5da90f4..eb47b9129 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -306,8 +306,7 @@ static void __attribute__((__noreturn__)) usage(void) " [delta|reltime|ctime|notime|iso]\n" "Suspending/resume will make ctime and iso timestamps inaccurate.\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(29); fputs(_("\nSupported log facilities:\n"), out); for (i = 0; i < ARRAY_SIZE(level_names); i++) fprintf(out, " %7s - %s\n", diff --git a/sys-utils/eject.c b/sys-utils/eject.c index 296e5cba5..91f04dc0b 100644 --- a/sys-utils/eject.c +++ b/sys-utils/eject.c @@ -159,8 +159,7 @@ static void __attribute__((__noreturn__)) usage(void) out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(29); fputs(_("\nBy default tries -r, -s, -f, and -q in order until success.\n"), out); fprintf(out, USAGE_MAN_TAIL("eject(1)")); diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c index a2d212552..16233b249 100644 --- a/sys-utils/fallocate.c +++ b/sys-utils/fallocate.c @@ -101,8 +101,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -v, --verbose verbose mode\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(22); fprintf(out, USAGE_MAN_TAIL("fallocate(1)")); diff --git a/sys-utils/flock.c b/sys-utils/flock.c index 5abe2def5..1091c41bf 100644 --- a/sys-utils/flock.c +++ b/sys-utils/flock.c @@ -70,8 +70,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_( " -F, --no-fork execute command without forking\n"), stdout); fputs(_( " --verbose increase verbosity\n"), stdout); fputs(USAGE_SEPARATOR, stdout); - fputs(USAGE_HELP, stdout); - fputs(USAGE_VERSION, stdout); + PRINT_USAGE_HELP(26); printf(USAGE_MAN_TAIL("flock(1)")); exit(EXIT_SUCCESS); } diff --git a/sys-utils/fsfreeze.c b/sys-utils/fsfreeze.c index 8b0d5d10e..7b1a1666d 100644 --- a/sys-utils/fsfreeze.c +++ b/sys-utils/fsfreeze.c @@ -47,8 +47,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -f, --freeze freeze the filesystem\n"), out); fputs(_(" -u, --unfreeze unfreeze the filesystem\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(19); fprintf(out, USAGE_MAN_TAIL("fsfreeze(8)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c index 698f30a93..979d9857a 100644 --- a/sys-utils/fstrim.c +++ b/sys-utils/fstrim.c @@ -262,8 +262,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -v, --verbose print number of discarded bytes\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(21); fprintf(out, USAGE_MAN_TAIL("fstrim(8)")); exit(EXIT_SUCCESS); } diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index f3448a569..c6b85be29 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1241,8 +1241,7 @@ usage(const struct hwclock_control *ctl) fputs(_(" --test dry run; use -D to view what would have happened\n"), out); fputs(_(" -D, --debug use debug mode\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(22); fprintf(out, USAGE_MAN_TAIL("hwclock(8)")); hwclock_exit(ctl, EXIT_SUCCESS); } diff --git a/sys-utils/ipcmk.c b/sys-utils/ipcmk.c index c6d322cbf..8c10e7b55 100644 --- a/sys-utils/ipcmk.c +++ b/sys-utils/ipcmk.c @@ -76,8 +76,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -p, --mode <mode> permission for the resource (default is 0644)\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(26); fprintf(out, USAGE_MAN_TAIL("ipcmk(1)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c index a60919d9b..88102e5fd 100644 --- a/sys-utils/ipcrm.c +++ b/sys-utils/ipcrm.c @@ -65,8 +65,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -v, --verbose explain what is being done\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(28); fprintf(out, USAGE_MAN_TAIL("ipcrm(1)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c index 943b09c4a..f3a216b5c 100644 --- a/sys-utils/ipcs.c +++ b/sys-utils/ipcs.c @@ -58,8 +58,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(USAGE_OPTIONS, out); fputs(_(" -i, --id <id> print details on resource identified by <id>\n"), out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fputs(USAGE_SEPARATOR, out); fputs(_("Resource options:\n"), out); diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c index 9a3915b1c..e38e31eb2 100644 --- a/sys-utils/ldattach.c +++ b/sys-utils/ldattach.c @@ -213,8 +213,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -i, --iflag [-]<iflag> set input mode flag\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(25); fputs(_("\nKnown <ldisc> names:\n"), out); print_table(out, ld_discs); diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c index 593d3b536..044109945 100644 --- a/sys-utils/losetup.c +++ b/sys-utils/losetup.c @@ -419,8 +419,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" --raw use raw --list output format\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(31); fputs(USAGE_COLUMNS, out); for (i = 0; i < ARRAY_SIZE(infos); i++) diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 2504da2e0..dc5f90fb4 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -2066,8 +2066,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -x, --hex print hexadecimal masks rather than lists of CPUs\n"), out); fputs(_(" -y, --physical print physical instead of logical IDs\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(25); fputs(USAGE_COLUMNS, out); for (i = 0; i < ARRAY_SIZE(coldescs); i++) diff --git a/sys-utils/lsipc.c b/sys-utils/lsipc.c index 8ac50d67a..deee608ef 100644 --- a/sys-utils/lsipc.c +++ b/sys-utils/lsipc.c @@ -304,8 +304,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -t, --time show attach, detach and change times\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(26); fprintf(out, _("\nGeneric columns:\n")); for (i = COLDESC_IDX_GEN_FIRST; i <= COLDESC_IDX_GEN_LAST; i++) diff --git a/sys-utils/lsmem.c b/sys-utils/lsmem.c index 4efd29632..630bdd861 100644 --- a/sys-utils/lsmem.c +++ b/sys-utils/lsmem.c @@ -386,8 +386,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" --summary[=when] print summary information (never,always or only)\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(22); fputs(USAGE_COLUMNS, out); for (i = 0; i < ARRAY_SIZE(coldescs); i++) diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c index 6cadd0ef5..443113071 100644 --- a/sys-utils/lsns.c +++ b/sys-utils/lsns.c @@ -627,8 +627,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -t, --type <name> namespace type (mnt, net, ipc, user, pid, uts, cgroup)\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(24); fputs(USAGE_COLUMNS, out); for (i = 0; i < ARRAY_SIZE(infos); i++) diff --git a/sys-utils/mount.c b/sys-utils/mount.c index b46634c7c..3d7d9c322 100644 --- a/sys-utils/mount.c +++ b/sys-utils/mount.c @@ -426,8 +426,7 @@ static void __attribute__((__noreturn__)) usage(void) " -w, --rw, --read-write mount the filesystem read-write (default)\n")); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(25); fprintf(out, _( "\nSource:\n" diff --git a/sys-utils/mountpoint.c b/sys-utils/mountpoint.c index d07077252..06b9bb90d 100644 --- a/sys-utils/mountpoint.c +++ b/sys-utils/mountpoint.c @@ -127,8 +127,7 @@ static void __attribute__((__noreturn__)) usage(void) " -d, --fs-devno print maj:min device number of the filesystem\n" " -x, --devno print maj:min device number of the block device\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(20); fprintf(out, USAGE_MAN_TAIL("mountpoint(1)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c index 204e6ce3b..10cd5eddb 100644 --- a/sys-utils/nsenter.c +++ b/sys-utils/nsenter.c @@ -97,8 +97,7 @@ static void __attribute__((__noreturn__)) usage(void) #endif fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(24); fprintf(out, USAGE_MAN_TAIL("nsenter(1)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/pivot_root.c b/sys-utils/pivot_root.c index ee6fd3c19..e288936d5 100644 --- a/sys-utils/pivot_root.c +++ b/sys-utils/pivot_root.c @@ -38,8 +38,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Change the root filesystem.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("pivot_root(8)")); exit(EXIT_SUCCESS); } diff --git a/sys-utils/readprofile.c b/sys-utils/readprofile.c index dc14c64f2..da2923874 100644 --- a/sys-utils/readprofile.c +++ b/sys-utils/readprofile.c @@ -122,8 +122,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -r, --reset reset all the counters (root only)\n"), out); fputs(_(" -n, --no-auto disable byte order auto-detection\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(27); fprintf(out, USAGE_MAN_TAIL("readprofile(8)")); exit(EXIT_SUCCESS); } diff --git a/sys-utils/renice.c b/sys-utils/renice.c index a88f590fb..de1fb4bc5 100644 --- a/sys-utils/renice.c +++ b/sys-utils/renice.c @@ -73,8 +73,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -g, --pgrp <id> interpret argument as process group ID\n"), out); fputs(_(" -u, --user <name>|<id> interpret argument as username or user ID\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(24); fprintf(out, USAGE_MAN_TAIL("renice(1)")); exit(EXIT_SUCCESS); } diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c index 86c009536..519bd5e43 100644 --- a/sys-utils/rtcwake.c +++ b/sys-utils/rtcwake.c @@ -115,8 +115,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -v, --verbose verbose messages\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(26); printf(USAGE_MAN_TAIL("rtcwake(8)")); exit(EXIT_SUCCESS); } diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c index b14dbea40..40c9220f1 100644 --- a/sys-utils/setarch.c +++ b/sys-utils/setarch.c @@ -114,8 +114,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" --list list settable architectures, and exit\n"), stdout); fputs(USAGE_SEPARATOR, stdout); - fputs(USAGE_HELP, stdout); - fputs(USAGE_VERSION, stdout); + PRINT_USAGE_HELP(26); printf(USAGE_MAN_TAIL("setarch(8)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/setpriv.c b/sys-utils/setpriv.c index 310e6938d..ed36da042 100644 --- a/sys-utils/setpriv.c +++ b/sys-utils/setpriv.c @@ -122,8 +122,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" --apparmor-profile <pr> set AppArmor profile\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fputs(USAGE_SEPARATOR, out); fputs(_(" This tool can be dangerous. Read the manpage, and be careful.\n"), out); fprintf(out, USAGE_MAN_TAIL("setpriv(1)")); diff --git a/sys-utils/setsid.c b/sys-utils/setsid.c index 891d8a6b7..fc49cd078 100644 --- a/sys-utils/setsid.c +++ b/sys-utils/setsid.c @@ -40,8 +40,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -c, --ctty set the controlling terminal to the current one\n"), out); fputs(_(" -w, --wait wait program to exit, and use the same return\n"), out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("setsid(1)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/swapoff.c b/sys-utils/swapoff.c index da2e268d7..5e97e8156 100644 --- a/sys-utils/swapoff.c +++ b/sys-utils/swapoff.c @@ -130,8 +130,7 @@ static void __attribute__((__noreturn__)) usage(void) " -v, --verbose verbose mode\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(24); fputs(_("\nThe <spec> parameter:\n" \ " -L <label> LABEL of device to be used\n" \ diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c index 5242b96f4..8cfc754e0 100644 --- a/sys-utils/swapon.c +++ b/sys-utils/swapon.c @@ -808,8 +808,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -v, --verbose verbose mode\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(26); fputs(_("\nThe <spec> parameter:\n" \ " -L <label> synonym for LABEL=<label>\n" diff --git a/sys-utils/switch_root.c b/sys-utils/switch_root.c index dff334253..834b2a304 100644 --- a/sys-utils/switch_root.c +++ b/sys-utils/switch_root.c @@ -209,8 +209,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Switch to another filesystem as the root of the mount tree.\n"), output); fputs(USAGE_OPTIONS, output); - fputs(USAGE_HELP, output); - fputs(USAGE_VERSION, output); + PRINT_USAGE_HELP(16); fprintf(output, USAGE_MAN_TAIL("switch_root(8)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/tunelp.c b/sys-utils/tunelp.c index 99da3f3f6..37f8fb56c 100644 --- a/sys-utils/tunelp.c +++ b/sys-utils/tunelp.c @@ -112,8 +112,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -r, --reset reset the port\n"), out); fputs(_(" -q, --print-irq <on|off> display current irq setting\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(30); fprintf(out, USAGE_MAN_TAIL("tunelp(8)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/umount.c b/sys-utils/umount.c index 17d94be10..2751521b8 100644 --- a/sys-utils/umount.c +++ b/sys-utils/umount.c @@ -102,8 +102,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -v, --verbose say what is being done\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(25); fprintf(out, USAGE_MAN_TAIL("umount(8)")); exit(MNT_EX_SUCCESS); diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index d3973527b..8b62b560a 100644 --- a/sys-utils/unshare.c +++ b/sys-utils/unshare.c @@ -265,8 +265,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -s, --setgroups allow|deny control the setgroups syscall in user namespaces\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(27); fprintf(out, USAGE_MAN_TAIL("unshare(1)")); exit(EXIT_SUCCESS); diff --git a/sys-utils/wdctl.c b/sys-utils/wdctl.c index 28a24c1f8..662f9e44d 100644 --- a/sys-utils/wdctl.c +++ b/sys-utils/wdctl.c @@ -190,8 +190,7 @@ static void __attribute__((__noreturn__)) usage(void) " -x, --flags-only print only flags table (same as -I -T)\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(24); fputs(USAGE_SEPARATOR, out); fprintf(out, _("The default device is %s.\n"), _PATH_WATCHDOG_DEV); diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c index 948c58925..21441a5cb 100644 --- a/sys-utils/zramctl.c +++ b/sys-utils/zramctl.c @@ -543,8 +543,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -t, --streams <number> number of compression streams\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(27); fputs(USAGE_COLUMNS, out); for (i = 0; i < ARRAY_SIZE(infos); i++) diff --git a/term-utils/mesg.c b/term-utils/mesg.c index fe5218aa4..2c57d63d3 100644 --- a/term-utils/mesg.c +++ b/term-utils/mesg.c @@ -80,8 +80,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(USAGE_OPTIONS, out); fputs(_(" -v, --verbose explain what is being done\n"), out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("mesg(1)")); exit(EXIT_SUCCESS); diff --git a/term-utils/wall.c b/term-utils/wall.c index 803a02976..0194c4bd7 100644 --- a/term-utils/wall.c +++ b/term-utils/wall.c @@ -93,8 +93,7 @@ static void __attribute__((__noreturn__)) usage(void) 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); + PRINT_USAGE_HELP(25); fprintf(out, USAGE_MAN_TAIL("wall(1)")); exit(EXIT_SUCCESS); diff --git a/term-utils/write.c b/term-utils/write.c index a7b51809f..172c8a6fb 100644 --- a/term-utils/write.c +++ b/term-utils/write.c @@ -91,8 +91,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Send a message to another user.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("write(1)")); exit(EXIT_SUCCESS); } diff --git a/text-utils/colcrt.c b/text-utils/colcrt.c index 375d0d6f0..bba6a574b 100644 --- a/text-utils/colcrt.c +++ b/text-utils/colcrt.c @@ -89,8 +89,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -2, --half-lines print all half-lines\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(25); fprintf(out, USAGE_MAN_TAIL("colcrt(1)")); diff --git a/text-utils/colrm.c b/text-utils/colrm.c index ebebca0bf..a73604d47 100644 --- a/text-utils/colrm.c +++ b/text-utils/colrm.c @@ -65,8 +65,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Filter out the specified columns.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, _("%s reads from standard input and writes to standard output\n\n"), program_invocation_short_name); fprintf(out, USAGE_MAN_TAIL("colrm(1)")); diff --git a/text-utils/column.c b/text-utils/column.c index 7f956f721..7dfc73ce8 100644 --- a/text-utils/column.c +++ b/text-utils/column.c @@ -581,8 +581,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -x, --fillrows fill rows before columns\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(34); fprintf(out, USAGE_MAN_TAIL("column(1)")); exit(EXIT_SUCCESS); diff --git a/text-utils/hexdump.c b/text-utils/hexdump.c index 53d10a6d9..166a67502 100644 --- a/text-utils/hexdump.c +++ b/text-utils/hexdump.c @@ -174,8 +174,7 @@ void __attribute__((__noreturn__)) usage(void) fputs(_(" -s, --skip <offset> skip offset bytes from the beginning\n"), out); fputs(_(" -v, --no-squeezing output identical lines\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(27); fprintf(out, USAGE_MAN_TAIL("hexdump(1)")); exit(EXIT_SUCCESS); diff --git a/text-utils/line.c b/text-utils/line.c index 15d7d4adf..5ad4b093f 100644 --- a/text-utils/line.c +++ b/text-utils/line.c @@ -34,8 +34,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Read one line.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("line(1)")); exit(EXIT_SUCCESS); } diff --git a/text-utils/pg.c b/text-utils/pg.c index ce5898dc3..97339b60a 100644 --- a/text-utils/pg.c +++ b/text-utils/pg.c @@ -247,8 +247,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" +/pattern/ start at the line containing pattern\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("pg(1)")); exit(0); diff --git a/text-utils/rev.c b/text-utils/rev.c index 9a778e383..cd92ac9f5 100644 --- a/text-utils/rev.c +++ b/text-utils/rev.c @@ -81,8 +81,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Reverse lines characterwise.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(16); fprintf(out, USAGE_MAN_TAIL("rev(1)")); exit(EXIT_SUCCESS); diff --git a/text-utils/ul.c b/text-utils/ul.c index a2ad5ea42..af429739d 100644 --- a/text-utils/ul.c +++ b/text-utils/ul.c @@ -148,8 +148,7 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" -t, -T, --terminal TERMINAL override the TERM environment variable\n"), out); fputs(_(" -i, --indicated underlining is indicated via a separate line\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(USAGE_HELP, out); - fputs(USAGE_VERSION, out); + PRINT_USAGE_HELP(30); fprintf(out, USAGE_MAN_TAIL("ul(1)")); -- 2.12.3 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html