summaryrefslogtreecommitdiffstats
path: root/misc-utils/lsblk.c
diff options
context:
space:
mode:
authorRuediger Meier2017-06-20 20:20:29 +0200
committerRuediger Meier2017-06-26 14:38:24 +0200
commit86be6a32d3fd229dbb17bf5e3348a01e6e6e855a (patch)
tree04f05fd94b26d2b5a6304d69e93f2ec59e789e17 /misc-utils/lsblk.c
parentmisc: cosmetics, remove argument from usage(int) (diff)
downloadkernel-qcow2-util-linux-86be6a32d3fd229dbb17bf5e3348a01e6e6e855a.tar.gz
kernel-qcow2-util-linux-86be6a32d3fd229dbb17bf5e3348a01e6e6e855a.tar.xz
kernel-qcow2-util-linux-86be6a32d3fd229dbb17bf5e3348a01e6e6e855a.zip
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>
Diffstat (limited to 'misc-utils/lsblk.c')
-rw-r--r--misc-utils/lsblk.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index dddd2a068..d997bc71e 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -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;