diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-09-26 14:48:51 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-09-27 09:31:10 +0300 |
commit | e960f7eb17f8d72f00364e9fc9f9a27b5563e318 (patch) | |
tree | 9c64699e742b6d220539a8827e29a662d9629fb7 /mkfs.jffs2.c | |
parent | 6edaa0c971aab663cda573ded5013b3b998ee5d4 (diff) |
mtd-utils: standardize PROGRAM_NAME
Make sure all the utils define PROGRAM_NAME and do so at the start of
the file so that sub-headers may assume it exists.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'mkfs.jffs2.c')
-rw-r--r-- | mkfs.jffs2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c index c83b725..1abe09c 100644 --- a/mkfs.jffs2.c +++ b/mkfs.jffs2.c @@ -47,6 +47,8 @@ * -Erik, November 2002 */ +#define PROGRAM_NAME "mkfs.jffs2" + #define _GNU_SOURCE #include <sys/types.h> #include <stdio.h> @@ -108,7 +110,6 @@ static int squash_uids = 0; static int squash_perms = 0; static int fake_times = 0; int target_endian = __BYTE_ORDER; -static const char *const app_name = "mkfs.jffs2"; static const char *const memory_exhausted = "memory exhausted"; uint32_t find_hardlink(struct filesystem_entry *e) @@ -141,7 +142,7 @@ uint32_t find_hardlink(struct filesystem_entry *e) static void verror_msg(const char *s, va_list p) { fflush(stdout); - fprintf(stderr, "%s: ", app_name); + fprintf(stderr, "%s: ", PROGRAM_NAME); vfprintf(stderr, s, p); } static void error_msg(const char *s, ...) @@ -247,7 +248,7 @@ extern char *xreadlink(const char *path) buf = xrealloc(buf, bufsize += GROWBY); readsize = readlink(path, buf, bufsize); /* 1st try */ if (readsize == -1) { - perror_msg("%s:%s", app_name, path); + perror_msg("%s:%s", PROGRAM_NAME, path); return NULL; } } |