misc: cosmetics, remove argument from usage(FILE*)
This patch is trivial and changes nothing, because we were always using usage(stdout) Now all our usage() functions look very similar. If wanted we could auto-generate another big cosmetical patch to remove all the useless "FILE *out" constants and use printf and puts rather than their f* friends. Such patch could be automatically synchronized with the translation project (newlines!) to not make the translators sick. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This commit is contained in:
parent
fa2cd89aca
commit
86be6a32d3
|
@ -34,8 +34,9 @@
|
|||
* Other usage() constants that are not demonstrated below:
|
||||
* USAGE_FUNCTIONS USAGE_COMMANDS USAGE_COLUMNS
|
||||
*/
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options] file...\n"), program_invocation_short_name);
|
||||
|
||||
|
@ -58,7 +59,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
fputs(USAGE_HELP, out);
|
||||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("fixme-command-name(1)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
@ -101,7 +102,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -2542,8 +2542,9 @@ static int ui_run(struct cfdisk *cf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out,
|
||||
_(" %1$s [options] <disk>\n"), program_invocation_short_name);
|
||||
|
@ -2562,7 +2563,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
|
|||
fputs(USAGE_VERSION, out);
|
||||
|
||||
fprintf(out, USAGE_MAN_TAIL("cfdisk(8)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -2588,7 +2589,7 @@ int main(int argc, char *argv[])
|
|||
while((c = getopt_long(argc, argv, "L::hVz", longopts, NULL)) != -1) {
|
||||
switch(c) {
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
break;
|
||||
case 'L':
|
||||
colormode = UL_COLORMODE_AUTO;
|
||||
|
|
|
@ -1839,8 +1839,9 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
||||
fprintf(out,
|
||||
|
@ -1906,7 +1907,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
|
|||
list_available_columns(out);
|
||||
|
||||
fprintf(out, USAGE_MAN_TAIL("sfdisk(8)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2042,7 +2043,7 @@ int main(int argc, char *argv[])
|
|||
sf->act = ACT_SHOW_GEOM;
|
||||
break;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
break;
|
||||
case 'l':
|
||||
sf->act = ACT_LIST;
|
||||
|
|
|
@ -560,8 +560,9 @@ static int list(const struct last_control *ctl, struct utmpx *p, time_t logout_t
|
|||
}
|
||||
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(const struct last_control *ctl, FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(const struct last_control *ctl)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(
|
||||
" %s [options] [<username>...] [<tty>...]\n"), program_invocation_short_name);
|
||||
|
@ -953,7 +954,7 @@ int main(int argc, char **argv)
|
|||
|
||||
switch(c) {
|
||||
case 'h':
|
||||
usage(&ctl, stdout);
|
||||
usage(&ctl);
|
||||
break;
|
||||
case 'V':
|
||||
printf(UTIL_LINUX_VERSION);
|
||||
|
|
|
@ -1219,8 +1219,9 @@ static int parse_time_mode(const char *s)
|
|||
errx(EXIT_FAILURE, _("unknown time format: %s"), s);
|
||||
}
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
size_t i;
|
||||
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
@ -1261,7 +1262,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
|
||||
fprintf(out, USAGE_MAN_TAIL("lslogins(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -1365,7 +1366,7 @@ int main(int argc, char *argv[])
|
|||
groups = optarg;
|
||||
break;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
break;
|
||||
case 'L':
|
||||
add_column(columns, ncolumns++, COL_LAST_TTY);
|
||||
|
|
|
@ -166,19 +166,20 @@ static int allow_setgid(const struct passwd *pe, const struct group *ge)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
fprintf(out, USAGE_HEADER);
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s <group>\n"), program_invocation_short_name);
|
||||
|
||||
fputs(USAGE_SEPARATOR, out);
|
||||
fputs(_("Log in to a new group.\n"), out);
|
||||
|
||||
fprintf(out, USAGE_OPTIONS);
|
||||
fprintf(out, USAGE_HELP);
|
||||
fprintf(out, USAGE_VERSION);
|
||||
fputs(USAGE_OPTIONS, out);
|
||||
fputs(USAGE_HELP,out);
|
||||
fputs(USAGE_VERSION,out);
|
||||
fprintf(out, USAGE_MAN_TAIL("newgrp(1)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -204,7 +205,7 @@ int main(int argc, char *argv[])
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -19,8 +19,9 @@
|
|||
* Always return EXIT_FAILURE (1), don't try to be smart!
|
||||
*/
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out,
|
||||
_(" %s [options]\n"), program_invocation_short_name);
|
||||
|
@ -53,7 +54,7 @@ int main(int argc, char *argv[])
|
|||
while ((c = getopt_long(argc, argv, "hV", longopts, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
break;
|
||||
case 'V':
|
||||
printf(UTIL_LINUX_VERSION);
|
||||
|
|
|
@ -296,8 +296,9 @@ static void undump(FILE *in, FILE *out)
|
|||
free(linestart);
|
||||
}
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
||||
fprintf(out,
|
||||
|
@ -314,7 +315,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
fputs(USAGE_VERSION, out);
|
||||
|
||||
fprintf(out, USAGE_MAN_TAIL("utmpdump(1)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
@ -356,7 +357,7 @@ int main(int argc, char **argv)
|
|||
break;
|
||||
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
break;
|
||||
case 'V':
|
||||
printf(UTIL_LINUX_VERSION);
|
||||
|
|
|
@ -296,8 +296,9 @@ static void edit_file(int is_shadow)
|
|||
ulckpwdf();
|
||||
}
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, " %s\n", program_invocation_short_name);
|
||||
|
||||
|
@ -308,7 +309,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
fputs(USAGE_HELP, out);
|
||||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("vipw(8)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -339,7 +340,7 @@ int main(int argc, char *argv[])
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -258,8 +258,9 @@ static int fincore_name(struct fincore_control *ctl,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
size_t i;
|
||||
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
@ -283,7 +284,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
|
||||
fprintf(out, USAGE_MAN_TAIL("fincore(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
|
@ -334,7 +335,7 @@ int main(int argc, char ** argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -1182,8 +1182,9 @@ static int uniq_fs_target_cmp(
|
|||
return !mnt_fs_match_target(a, mnt_fs_get_target(b), cache);
|
||||
}
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
size_t i;
|
||||
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
@ -1254,7 +1255,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
|
||||
fprintf(out, USAGE_MAN_TAIL("findmnt(8)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -1377,7 +1378,7 @@ int main(int argc, char *argv[])
|
|||
flags |= FL_EVALUATE;
|
||||
break;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
break;
|
||||
case 'i':
|
||||
flags |= FL_INVERT;
|
||||
|
|
|
@ -296,8 +296,9 @@ static int arg_to_signum(char *arg, int maskbit)
|
|||
return signame_to_signum(arg);
|
||||
}
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options] <pid>|<name>...\n"), program_invocation_short_name);
|
||||
|
||||
|
@ -321,7 +322,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("kill(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static char **parse_arguments(int argc, char **argv, struct kill_control *ctl)
|
||||
|
@ -345,7 +346,7 @@ static char **parse_arguments(int argc, char **argv, struct kill_control *ctl)
|
|||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
if (!strcmp(arg, "-h") || !strcmp(arg, "--help"))
|
||||
usage(stdout);
|
||||
usage();
|
||||
if (!strcmp(arg, "--verbose")) {
|
||||
ctl->verbose = 1;
|
||||
continue;
|
||||
|
|
|
@ -988,8 +988,9 @@ static void logger_close(const struct logger_ctl *ctl)
|
|||
free(ctl->hdr);
|
||||
}
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options] [<message>]\n"), program_invocation_short_name);
|
||||
|
||||
|
@ -1030,7 +1031,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
|
|||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("logger(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1160,7 +1161,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
exit(EXIT_SUCCESS);
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
case OPT_OCTET_COUNT:
|
||||
ctl.octet_count = 1;
|
||||
break;
|
||||
|
|
|
@ -1622,8 +1622,9 @@ static int cmp_u64_cells(struct libscols_cell *a,
|
|||
return *adata == *bdata ? 0 : *adata >= *bdata ? 1 : -1;
|
||||
}
|
||||
|
||||
static void __attribute__((__noreturn__)) help(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
size_t i;
|
||||
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
@ -1667,7 +1668,7 @@ static void __attribute__((__noreturn__)) help(FILE *out)
|
|||
|
||||
fprintf(out, USAGE_MAN_TAIL("lsblk(8)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void check_sysdevblock(void)
|
||||
|
@ -1766,7 +1767,7 @@ int main(int argc, char *argv[])
|
|||
parse_excludes(optarg);
|
||||
break;
|
||||
case 'h':
|
||||
help(stdout);
|
||||
usage();
|
||||
break;
|
||||
case 'J':
|
||||
lsblk->flags |= LSBLK_JSON;
|
||||
|
|
|
@ -484,8 +484,9 @@ static int show_locks(struct list_head *locks)
|
|||
}
|
||||
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
size_t i;
|
||||
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
@ -516,7 +517,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|||
|
||||
fprintf(out, USAGE_MAN_TAIL("lslocks(8)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -569,7 +570,7 @@ int main(int argc, char *argv[])
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
case 'n':
|
||||
no_headings = 1;
|
||||
break;
|
||||
|
|
|
@ -76,8 +76,9 @@ static uint64_t hash_file(struct mcookie_control *ctl, int fd)
|
|||
return count;
|
||||
}
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
|
||||
|
||||
|
@ -94,7 +95,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("mcookie(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void randomness_from_files(struct mcookie_control *ctl)
|
||||
|
@ -167,7 +168,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -58,8 +58,9 @@ struct uuidd_cxt_t {
|
|||
no_sock: 1;
|
||||
};
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
|
||||
fputs(USAGE_SEPARATOR, out);
|
||||
|
@ -81,7 +82,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|||
fputs(USAGE_HELP, out);
|
||||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("uuidd(8)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void create_daemon(void)
|
||||
|
@ -633,7 +634,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -18,8 +18,9 @@
|
|||
#include "c.h"
|
||||
#include "closestream.h"
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out,
|
||||
_(" %s [options]\n"), program_invocation_short_name);
|
||||
|
@ -34,7 +35,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|||
fputs(USAGE_HELP, out);
|
||||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("uuidgen(1)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -70,7 +71,7 @@ main (int argc, char *argv[])
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -290,8 +290,9 @@ static int blkzone_reset(struct blkzone_control *ctl)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
size_t i;
|
||||
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
@ -314,7 +315,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
fputs(USAGE_VERSION, out);
|
||||
|
||||
fprintf(out, USAGE_MAN_TAIL("blkzone(8)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
@ -362,7 +363,7 @@ int main(int argc, char **argv)
|
|||
|
||||
switch (c) {
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
break;
|
||||
case 'c':
|
||||
ctl.count = strtou32_or_err(optarg,
|
||||
|
|
|
@ -21,19 +21,20 @@
|
|||
#define LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF
|
||||
#define LINUX_REBOOT_CMD_CAD_OFF 0x00000000
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
fprintf(out, USAGE_HEADER);
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s hard|soft\n"), program_invocation_short_name);
|
||||
|
||||
fprintf(out, USAGE_SEPARATOR);
|
||||
fputs(USAGE_SEPARATOR, out);
|
||||
fprintf(out, _("Set the function of the Ctrl-Alt-Del combination.\n"));
|
||||
|
||||
fprintf(out, USAGE_OPTIONS);
|
||||
fprintf(out, USAGE_HELP);
|
||||
fprintf(out, USAGE_VERSION);
|
||||
fputs(USAGE_OPTIONS, out);
|
||||
fputs(USAGE_HELP, out);
|
||||
fputs(USAGE_VERSION,out);
|
||||
fprintf(out, USAGE_MAN_TAIL("ctrlaltdel(8)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static int get_cad(void)
|
||||
|
@ -98,7 +99,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -127,8 +127,9 @@ static inline void info(const char *fmt, ...)
|
|||
va_end(va);
|
||||
}
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out,
|
||||
_(" %s [options] [<device>|<mountpoint>]\n"), program_invocation_short_name);
|
||||
|
@ -164,7 +165,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|||
fputs(_("\nBy default tries -r, -s, -f, and -q in order until success.\n"), out);
|
||||
fprintf(out, USAGE_MAN_TAIL("eject(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
@ -223,7 +224,7 @@ static void parse_args(struct eject_control *ctl, int argc, char **argv)
|
|||
ctl->F_option = 1;
|
||||
break;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
break;
|
||||
case 'i':
|
||||
ctl->i_option = 1;
|
||||
|
|
|
@ -76,8 +76,9 @@
|
|||
static int verbose;
|
||||
static char *filename;
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out,
|
||||
_(" %s [options] <filename>\n"), program_invocation_short_name);
|
||||
|
@ -105,7 +106,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
|
||||
fprintf(out, USAGE_MAN_TAIL("fallocate(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static loff_t cvtnum(char *s)
|
||||
|
@ -329,7 +330,7 @@ int main(int argc, char **argv)
|
|||
|
||||
switch(c) {
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
break;
|
||||
case 'c':
|
||||
mode |= FALLOC_FL_COLLAPSE_RANGE;
|
||||
|
|
|
@ -1200,8 +1200,9 @@ static void out_version(void)
|
|||
}
|
||||
|
||||
static void __attribute__((__noreturn__))
|
||||
usage(const struct hwclock_control *ctl, FILE *out)
|
||||
usage(const struct hwclock_control *ctl)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fputs(_(" hwclock [function] [option...]\n"), out);
|
||||
|
||||
|
@ -1451,7 +1452,7 @@ int main(int argc, char **argv)
|
|||
out_version();
|
||||
return 0;
|
||||
case 'h': /* --help */
|
||||
usage(&ctl, stdout);
|
||||
usage(&ctl);
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -46,8 +46,9 @@ static void print_msg (int id, int unit);
|
|||
/* we read time as int64_t from /proc, so cast... */
|
||||
#define xctime(_x) ctime((time_t *) (_x))
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %1$s [resource-option...] [output-option]\n"
|
||||
" %1$s -m|-q|-s -i <id>\n"), program_invocation_short_name);
|
||||
|
@ -78,7 +79,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|||
fputs(_(" -b, --bytes show sizes in bytes\n"), out);
|
||||
fprintf(out, USAGE_MAN_TAIL("ipcs(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main (int argc, char **argv)
|
||||
|
@ -150,7 +151,7 @@ int main (int argc, char **argv)
|
|||
unit = IPC_UNIT_BYTES;
|
||||
break;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
case 'V':
|
||||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
|
|
|
@ -603,8 +603,9 @@ static int show_namespace_processes(struct lsns *ls, struct lsns_namespace *ns)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
size_t i;
|
||||
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
@ -635,7 +636,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|||
|
||||
fprintf(out, USAGE_MAN_TAIL("lsns(8)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
@ -698,7 +699,7 @@ int main(int argc, char *argv[])
|
|||
ls.fltr_pid = strtos32_or_err(optarg, _("invalid PID argument"));
|
||||
break;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
case 'n':
|
||||
ls.no_headings = 1;
|
||||
break;
|
||||
|
|
|
@ -151,8 +151,9 @@ static int prlimit(pid_t p, int resource,
|
|||
}
|
||||
#endif
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
size_t i;
|
||||
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
@ -199,7 +200,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|||
|
||||
fprintf(out, USAGE_MAN_TAIL("prlimit(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static inline int get_column_id(int num)
|
||||
|
@ -584,7 +585,7 @@ int main(int argc, char **argv)
|
|||
pid = strtos32_or_err(optarg, _("invalid PID argument"));
|
||||
break;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
case 'o':
|
||||
ncolumns = string_to_idarray(optarg,
|
||||
columns, ARRAY_SIZE(columns),
|
||||
|
|
|
@ -97,9 +97,9 @@ static char *boot_uname_r_str(void)
|
|||
return s;
|
||||
}
|
||||
|
||||
static void __attribute__ ((__noreturn__))
|
||||
usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
|
||||
|
||||
|
@ -125,7 +125,7 @@ static void __attribute__ ((__noreturn__))
|
|||
fputs(USAGE_HELP, out);
|
||||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("readprofile(8)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
@ -211,7 +211,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -92,8 +92,9 @@ struct privctx {
|
|||
const char *apparmor_profile;
|
||||
};
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options] <program> [<argument>...]\n"),
|
||||
program_invocation_short_name);
|
||||
|
@ -127,7 +128,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
fputs(_(" This tool can be dangerous. Read the manpage, and be careful.\n"), out);
|
||||
fprintf(out, USAGE_MAN_TAIL("setpriv(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static int real_cap_last_cap(void)
|
||||
|
@ -797,7 +798,7 @@ int main(int argc, char **argv)
|
|||
opts.apparmor_profile = optarg;
|
||||
break;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
case 'V':
|
||||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
|
|
|
@ -165,8 +165,9 @@ static struct colinfo *get_column_info(unsigned num)
|
|||
return &infos[ get_column_id(num) ];
|
||||
}
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
size_t i;
|
||||
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
@ -201,7 +202,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
|
|||
|
||||
fprintf(out, USAGE_MAN_TAIL("wdctl(8)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void add_flag_line(struct libscols_table *table, struct wdinfo *wd, const struct wdflag *fl)
|
||||
|
@ -531,7 +532,7 @@ int main(int argc, char *argv[])
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
case 'F':
|
||||
noflags = 1;
|
||||
break;
|
||||
|
|
|
@ -517,8 +517,9 @@ static void status(struct zram *z)
|
|||
scols_unref_table(tb);
|
||||
}
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
size_t i;
|
||||
|
||||
fputs(USAGE_HEADER, out);
|
||||
|
@ -550,7 +551,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|||
fprintf(out, " %11s %s\n", infos[i].name, _(infos[i].help));
|
||||
|
||||
fprintf(out, USAGE_MAN_TAIL("zramctl(8)"));
|
||||
exit(out == stderr ? 1 : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/* actions */
|
||||
|
@ -642,7 +643,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -154,8 +154,9 @@ static inline time_t script_time(time_t *t)
|
|||
# define script_time(x) time(x)
|
||||
#endif
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options] [file]\n"), program_invocation_short_name);
|
||||
|
||||
|
@ -174,7 +175,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
" -h, --help display this help and exit\n\n"), out);
|
||||
|
||||
fprintf(out, USAGE_MAN_TAIL("script(1)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void die_if_link(const struct script_control *ctl)
|
||||
|
@ -736,7 +737,7 @@ int main(int argc, char **argv)
|
|||
exit(EXIT_SUCCESS);
|
||||
break;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
break;
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
|
|
|
@ -36,8 +36,9 @@
|
|||
#define SCRIPT_MIN_DELAY 0.0001 /* from original sripreplay.pl */
|
||||
|
||||
static void __attribute__((__noreturn__))
|
||||
usage(FILE *out)
|
||||
usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out,
|
||||
_(" %s [-t] timingfile [typescript] [divisor]\n"),
|
||||
|
@ -55,7 +56,7 @@ usage(FILE *out)
|
|||
" -h, --help display this help and exit\n\n"), out);
|
||||
|
||||
fprintf(out, USAGE_MAN_TAIL("scriptreplay(1)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static double
|
||||
|
@ -172,7 +173,7 @@ main(int argc, char *argv[])
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
exit(EXIT_SUCCESS);
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -78,8 +78,9 @@
|
|||
static char *makemsg(char *fname, char **mvec, int mvecsz,
|
||||
size_t *mbufsize, int print_banner);
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out,
|
||||
_(" %s [options] [<file> | <message>]\n"), program_invocation_short_name);
|
||||
|
@ -96,7 +97,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("wall(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
struct group_workspace {
|
||||
|
@ -224,7 +225,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
exit(EXIT_SUCCESS);
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -75,8 +75,9 @@ struct colcrt_control {
|
|||
half_lines:1;
|
||||
};
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options] [<file>...]\n"), program_invocation_short_name);
|
||||
|
||||
|
@ -93,7 +94,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
|
||||
fprintf(out, USAGE_MAN_TAIL("colcrt(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void trim_trailing_spaces(wchar_t *s)
|
||||
|
@ -264,7 +265,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -54,8 +54,9 @@ COLRM removes unwanted columns from a file
|
|||
Jeff Schriebman UC Berkeley 11-74
|
||||
*/
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fprintf(out, _("\nUsage:\n"
|
||||
" %s [startcol [endcol]]\n"),
|
||||
program_invocation_short_name);
|
||||
|
@ -69,7 +70,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|||
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)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static int process_input(unsigned long first, unsigned long last)
|
||||
|
@ -176,7 +177,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ parse_args(int argc, char **argv, struct hexdump *hex)
|
|||
add_fmt("\"%07.7_ax \" 8/2 \" %04x \" \"\\n\"", hex);
|
||||
break;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
case 'V':
|
||||
printf(UTIL_LINUX_VERSION);
|
||||
exit(EXIT_SUCCESS);
|
||||
|
@ -149,8 +149,9 @@ parse_args(int argc, char **argv, struct hexdump *hex)
|
|||
return optind;
|
||||
}
|
||||
|
||||
void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options] <file>...\n"), program_invocation_short_name);
|
||||
|
||||
|
@ -177,7 +178,7 @@ void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("hexdump(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
|
|
@ -101,7 +101,7 @@ void add_fmt(const char *, struct hexdump *);
|
|||
void rewrite_rules(struct hexdump_fs *, struct hexdump *);
|
||||
void addfile(char *, struct hexdump *);
|
||||
void display(struct hexdump *);
|
||||
void __attribute__((__noreturn__)) usage(FILE *out);
|
||||
void __attribute__((__noreturn__)) usage(void);
|
||||
void conv_c(struct hexdump_pr *, u_char *);
|
||||
void conv_u(struct hexdump_pr *, u_char *);
|
||||
int next(char **, struct hexdump *);
|
||||
|
|
|
@ -24,8 +24,9 @@
|
|||
#include "nls.h"
|
||||
#include "widechar.h"
|
||||
|
||||
static void __attribute__((__noreturn__)) usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
|
||||
|
||||
|
@ -36,7 +37,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||
fputs(USAGE_HELP, out);
|
||||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("line(1)"));
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
@ -62,7 +63,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -71,8 +71,9 @@ static void sig_handler(int signo __attribute__ ((__unused__)))
|
|||
_exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fprintf(out, _("Usage: %s [options] [file ...]\n"),
|
||||
program_invocation_short_name);
|
||||
|
||||
|
@ -84,7 +85,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
|||
fputs(USAGE_VERSION, out);
|
||||
fprintf(out, USAGE_MAN_TAIL("rev(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void reverse_str(wchar_t *str, size_t n)
|
||||
|
@ -125,7 +126,7 @@ int main(int argc, char *argv[])
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
exit(EXIT_SUCCESS);
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -135,9 +135,9 @@ static int halfpos;
|
|||
static int upln;
|
||||
static int iflag;
|
||||
|
||||
static void __attribute__((__noreturn__))
|
||||
usage(FILE *out)
|
||||
static void __attribute__((__noreturn__)) usage(void)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
fputs(USAGE_HEADER, out);
|
||||
fprintf(out, _(" %s [options] [<file> ...]\n"), program_invocation_short_name);
|
||||
|
||||
|
@ -153,7 +153,7 @@ usage(FILE *out)
|
|||
|
||||
fprintf(out, USAGE_MAN_TAIL("ul(1)"));
|
||||
|
||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
@ -196,7 +196,7 @@ int main(int argc, char **argv)
|
|||
printf(UTIL_LINUX_VERSION);
|
||||
return EXIT_SUCCESS;
|
||||
case 'h':
|
||||
usage(stdout);
|
||||
usage();
|
||||
default:
|
||||
errtryhelp(EXIT_FAILURE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue