From: Karel Zak Date: Tue, 16 Aug 2011 12:00:06 +0000 (+0200) Subject: losetup: cleanup usage() X-Git-Tag: v2.20-rc2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6997468eaae62e6593a9546f6e9d66365a1fe3e7;p=thirdparty%2Futil-linux.git losetup: cleanup usage() Signed-off-by: Karel Zak --- diff --git a/mount/lomount.c b/mount/lomount.c index ab542e27ad..7570137346 100644 --- a/mount/lomount.c +++ b/mount/lomount.c @@ -1010,28 +1010,30 @@ find_loopdev_by_backing_file(const char *filename, char **loopdev) #include static void -usage(FILE *f) { - fprintf(f, _("\nUsage:\n" - " %1$s loop_device give info\n" - " %1$s -a | --all list all used\n" - " %1$s -d | --detach [ ...] delete\n" - " %1$s -f | --find find unused\n" - " %1$s -c | --set-capacity resize\n" - " %1$s -j | --associated [-o ] list all associated with \n" - " %1$s [ options ] {-f|--find|loopdev} setup\n"), - progname); - - fprintf(f, _("\nOptions:\n" - " -e | --encryption enable data encryption with specified \n" - " -h | --help this help\n" - " -o | --offset start at offset into file\n" - " --sizelimit loop limited to only bytes of the file\n" - " -p | --pass-fd read passphrase from file descriptor \n" - " -r | --read-only setup read-only loop device\n" - " --show print device name (with -f )\n" - " -v | --verbose verbose mode\n\n")); - - exit(f == stderr ? EXIT_FAILURE : EXIT_SUCCESS); +usage(FILE *out) { + + fputs(_("\nUsage:\n"), out); + fprintf(out, + _(" %1$s loop_device give info\n" + " %1$s -a | --all list all used\n" + " %1$s -d | --detach [ ...] delete\n" + " %1$s -f | --find find unused\n" + " %1$s -c | --set-capacity resize\n" + " %1$s -j | --associated [-o ] list all associated with \n" + " %1$s [options] {-f|--find|loopdev} setup\n"), + progname); + + fputs(_("\nOptions:\n"), out); + fputs(_(" -e, --encryption enable data encryption with specified \n" + " -h, --help this help\n" + " -o, --offset start at offset into file\n" + " --sizelimit loop limited to only bytes of the file\n" + " -p, --pass-fd read passphrase from file descriptor \n" + " -r, --read-only setup read-only loop device\n" + " --show print device name (with -f )\n" + " -v, --verbose verbose mode\n\n"), out); + + exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); } int