aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-06-27 17:00:29 -0700
committerArtem Bityutskiy <dedekind1@gmail.com>2011-06-29 08:42:40 +0300
commite1e6889909bb1ffcde894f69efe307ed9a1a28a4 (patch)
tree5f3461782f9f528d915f4bee7777907080eab8a2
parentede39dff3f0352ae5237af8a47e97f22cd57e97e (diff)
mtd-utils: add common version printing function
Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
-rw-r--r--include/common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 65ec086..88b67e5 100644
--- a/include/common.h
+++ b/include/common.h
@@ -129,6 +129,12 @@ simple_strtoX(strtoll, long long int)
simple_strtoX(strtoul, unsigned long int)
simple_strtoX(strtoull, unsigned long long int)
+/* Simple version-printing for utils */
+#define common_print_version() \
+do { \
+ printf("%s %s\n", PROGRAM_NAME, VERSION); \
+} while (0)
+
#include "xalloc.h"
#ifdef __cplusplus