diff options
author | Sami Kerola | 2011-07-20 22:12:40 +0200 |
---|---|---|
committer | Sami Kerola | 2011-07-21 23:56:48 +0200 |
commit | 5260748c28a8efd18e50c7942b001160c02bfb93 (patch) | |
tree | b139d6ea736fdfae470aff50f8ac6dbd717a3cf7 /disk-utils/mkfs.cramfs.c | |
parent | mkfs.cramfs: use xalloc.h (diff) | |
download | kernel-qcow2-util-linux-5260748c28a8efd18e50c7942b001160c02bfb93.tar.gz kernel-qcow2-util-linux-5260748c28a8efd18e50c7942b001160c02bfb93.tar.xz kernel-qcow2-util-linux-5260748c28a8efd18e50c7942b001160c02bfb93.zip |
mkfs.cramfs: use program_invocation_short_name
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'disk-utils/mkfs.cramfs.c')
-rw-r--r-- | disk-utils/mkfs.cramfs.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c index 167535fc3..545585ad5 100644 --- a/disk-utils/mkfs.cramfs.c +++ b/disk-utils/mkfs.cramfs.c @@ -37,6 +37,7 @@ #include <stdarg.h> #include <zlib.h> +#include "c.h" #include "cramfs.h" #include "md5.h" #include "nls.h" @@ -47,7 +48,6 @@ /* The kernel only supports PAD_SIZE of 0 and 512. */ #define PAD_SIZE 512 -static const char *progname = "mkcramfs"; static int verbose = 0; static unsigned int blksize; /* settable via -b option */ @@ -137,7 +137,7 @@ usage(int status) { " -z make explicit holes (requires >= 2.3.39)\n" " dirname root of the filesystem to be compressed\n" " outfile output file\n"), - progname, PAD_SIZE); + program_invocation_short_name, PAD_SIZE); exit(status); } @@ -722,13 +722,6 @@ int main(int argc, char **argv) blksize = getpagesize(); total_blocks = 0; - if (argc) { - char *p; - progname = argv[0]; - if ((p = strrchr(progname, '/')) != NULL) - progname = p+1; - } - setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); @@ -784,7 +777,7 @@ int main(int argc, char **argv) break; case 'V': printf(_("%s (%s)\n"), - progname, PACKAGE_STRING); + program_invocation_short_name, PACKAGE_STRING); exit(MKFS_OK); case 'v': verbose = 1; |