summaryrefslogtreecommitdiff
path: root/nandwrite.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 /nandwrite.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 'nandwrite.c')
-rw-r--r--nandwrite.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/nandwrite.c b/nandwrite.c
index 9eb2004..3520c62 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -19,6 +19,9 @@
* Bug/ToDo:
*/
+#define PROGRAM_NAME "nandwrite"
+#define VERSION "$Revision: 1.32 $"
+
#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
@@ -39,9 +42,6 @@
#include <asm/types.h>
#include "mtd/mtd-user.h"
-#define PROGRAM "nandwrite"
-#define VERSION "$Revision: 1.32 $"
-
#define MAX_PAGE_SIZE 4096
#define MAX_OOB_SIZE 128
@@ -94,16 +94,17 @@ static void display_help (void)
static void display_version (void)
{
- printf(PROGRAM " " VERSION "\n"
+ printf("%1$s " VERSION "\n"
"\n"
"Copyright (C) 2003 Thomas Gleixner \n"
"\n"
- PROGRAM " comes with NO WARRANTY\n"
+ "%1$s comes with NO WARRANTY\n"
"to the extent permitted by law.\n"
"\n"
- "You may redistribute copies of " PROGRAM "\n"
+ "You may redistribute copies of %1$s\n"
"under the terms of the GNU General Public Licence.\n"
- "See the file `COPYING' for more information.\n");
+ "See the file `COPYING' for more information.\n",
+ PROGRAM_NAME);
exit (EXIT_SUCCESS);
}