summaryrefslogtreecommitdiff
path: root/nor-utils
diff options
context:
space:
mode:
Diffstat (limited to 'nor-utils')
-rw-r--r--nor-utils/rfddump.c12
-rw-r--r--nor-utils/rfdformat.c12
2 files changed, 10 insertions, 14 deletions
diff --git a/nor-utils/rfddump.c b/nor-utils/rfddump.c
index 32810f5..048f58c 100644
--- a/nor-utils/rfddump.c
+++ b/nor-utils/rfddump.c
@@ -10,7 +10,6 @@
*/
#define PROGRAM_NAME "rfddump"
-#define PROGRAM_VERSION "$Revision 1.0 $"
#define _XOPEN_SOURCE 500 /* For pread */
@@ -28,6 +27,8 @@
#include <linux/types.h>
#include <mtd_swab.h>
+#include "common.h"
+
/* next is an array of mapping for each corresponding sector */
#define RFD_MAGIC 0x9193
#define HEADER_MAP_OFFSET 3
@@ -69,12 +70,9 @@ void display_help(void)
void display_version(void)
{
- printf("%s " PROGRAM_VERSION "\n"
- "\n"
- "This is free software; see the source for copying conditions. There is NO\n"
- "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
- PROGRAM_NAME);
-
+ common_print_version();
+ printf("This is free software; see the source for copying conditions. There is NO\n"
+ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
exit(0);
}
diff --git a/nor-utils/rfdformat.c b/nor-utils/rfdformat.c
index a8a44a9..d393975 100644
--- a/nor-utils/rfdformat.c
+++ b/nor-utils/rfdformat.c
@@ -13,7 +13,6 @@
*/
#define PROGRAM_NAME "rfdformat"
-#define PROGRAM_VERSION "$Revision 1.0 $"
#define _XOPEN_SOURCE 500 /* For pread/pwrite */
@@ -29,6 +28,8 @@
#include <mtd/mtd-user.h>
#include <linux/types.h>
+#include "common.h"
+
void display_help(void)
{
printf("Usage: %s [OPTIONS] MTD-device\n"
@@ -42,12 +43,9 @@ void display_help(void)
void display_version(void)
{
- printf("%s " PROGRAM_VERSION "\n"
- "\n"
- "This is free software; see the source for copying conditions. There is NO\n"
- "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
- PROGRAM_NAME);
-
+ common_print_version();
+ printf("This is free software; see the source for copying conditions. There is NO\n"
+ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
exit(0);
}