summaryrefslogtreecommitdiffstats
path: root/disk-utils/blockdev.c
diff options
context:
space:
mode:
authorKarel Zak2007-06-29 12:06:58 +0200
committerKarel Zak2007-06-29 12:06:58 +0200
commita424171cd15ca39da64e8b3ba0c38ca814f981f1 (patch)
tree56edb597966fc6956a0c77996f5023633b6ae118 /disk-utils/blockdev.c
parentblockdev: add BLKFRAGET/BLKFRASET ioctls (diff)
downloadkernel-qcow2-util-linux-a424171cd15ca39da64e8b3ba0c38ca814f981f1.tar.gz
kernel-qcow2-util-linux-a424171cd15ca39da64e8b3ba0c38ca814f981f1.tar.xz
kernel-qcow2-util-linux-a424171cd15ca39da64e8b3ba0c38ca814f981f1.zip
blockdev: cleanup usage() and update man page
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/blockdev.c')
-rw-r--r--disk-utils/blockdev.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c
index 6cd038f10..46b7fa719 100644
--- a/disk-utils/blockdev.c
+++ b/disk-utils/blockdev.c
@@ -108,20 +108,26 @@ struct bdc {
static void
usage(void) {
int i;
+ fputc('\n', stderr);
fprintf(stderr, _("Usage:\n"));
fprintf(stderr, " %s -V\n", progname);
fprintf(stderr, _(" %s --report [devices]\n"), progname);
fprintf(stderr, _(" %s [-v|-q] commands devices\n"), progname);
+ fputc('\n', stderr);
+
fprintf(stderr, _("Available commands:\n"));
- fprintf(stderr, "\t--getsz\t(%s)\n", "get size in 512-byte sectors");
+ fprintf(stderr, "\t%-30s %s\n", "--getsz",
+ "get size in 512-byte sectors");
for (i = 0; i < SIZE(bdcms); i++) {
- fprintf(stderr, "\t%s", bdcms[i].name);
if (bdcms[i].argname)
- fprintf(stderr, " %s", bdcms[i].argname);
- if (bdcms[i].help)
- fprintf(stderr, "\t(%s)", _(bdcms[i].help));
- fprintf(stderr, "\n");
+ fprintf(stderr, "\t%s %-*s %s\n", bdcms[i].name,
+ (int) (29 - strlen(bdcms[i].name)),
+ bdcms[i].argname, _(bdcms[i].help));
+ else
+ fprintf(stderr, "\t%-30s %s\n", bdcms[i].name,
+ _(bdcms[i].help));
}
+ fputc('\n', stderr);
exit(1);
}