summaryrefslogtreecommitdiff
path: root/jffs2reader.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-09-26 14:48:51 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-09-27 09:31:10 +0300
commite960f7eb17f8d72f00364e9fc9f9a27b5563e318 (patch)
tree9c64699e742b6d220539a8827e29a662d9629fb7 /jffs2reader.c
parent6edaa0c971aab663cda573ded5013b3b998ee5d4 (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 'jffs2reader.c')
-rw-r--r--jffs2reader.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/jffs2reader.c b/jffs2reader.c
index 0ad7207..0cdff19 100644
--- a/jffs2reader.c
+++ b/jffs2reader.c
@@ -62,6 +62,7 @@ BUGS:
- Doesn't check CRC checksums.
*/
+#define PROGRAM_NAME "jffs2reader"
#include <errno.h>
#include <stdint.h>
@@ -817,8 +818,8 @@ void lsdir(char *o, size_t size, char *path, int recurse)
if (ino == 0 ||
(dd == NULL && ino == 0) || (dd != NULL && dd->type != DT_DIR)) {
- fprintf(stderr, "jffs2reader: %s: No such file or directory\n",
- path);
+ fprintf(stderr, "%s: %s: No such file or directory\n",
+ PROGRAM_NAME, path);
exit(EXIT_FAILURE);
}
@@ -888,7 +889,8 @@ int main(int argc, char **argv)
break;
default:
fprintf(stderr,
- "Usage: jffs2reader <image> [-d|-f] < path > \n");
+ "Usage: %s <image> [-d|-f] < path >\n",
+ PROGRAM_NAME);
exit(EXIT_FAILURE);
}
}