isosize: fix usage() -h option print out

Fixes usage() bug from commit 4eba43a7 which claimed sort option for
--help being -H.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-12-16 10:43:53 +00:00 committed by Karel Zak
parent 19b7b517b9
commit bb7ea8d81a
1 changed files with 11 additions and 10 deletions

View File

@ -153,15 +153,17 @@ static void isosize(char *filenamep, int xflag, long divisor)
static void __attribute__((__noreturn__)) usage(FILE *out) static void __attribute__((__noreturn__)) usage(FILE *out)
{ {
fprintf(out, _("\nUsage:\n" fputs(USAGE_HEADER, out);
" %s [options] iso9660_image_file\n"), fprintf(out,
_(" %s [options] iso9660_image_file\n"),
program_invocation_short_name); program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fprintf(out, _("\nOptions:\n" fputs(_(" -d, --divisor=NUM divide bytes NUM\n"), out);
" -d, --divisor=NUM divide bytes NUM\n" fputs(_(" -x, --sectors show sector count and size\n"), out);
" -x, --sectors show sector count and size\n" fputs(USAGE_SEPARATOR, out);
" -V, --version output version information and exit\n" fputs(USAGE_HELP, out);
" -H, --help display this help and exit\n\n")); fputs(USAGE_VERSION, out);
fprintf(out, USAGE_MAN_TAIL("isosize(8)"));
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
} }
@ -195,8 +197,7 @@ int main(int argc, char **argv)
xflag = 1; xflag = 1;
break; break;
case 'V': case 'V':
printf(_("%s (%s)\n"), program_invocation_short_name, printf(UTIL_LINUX_VERSION);
PACKAGE_STRING);
return EXIT_SUCCESS; return EXIT_SUCCESS;
case 'h': case 'h':
usage(stdout); usage(stdout);