Patchwork [v2,06/10] mtd-utils: add common version printing function

login
register
mail settings
Submitter Brian Norris
Date June 28, 2011, midnight
Message ID <1309219229-5604-2-git-send-email-computersforpeace@gmail.com>
Download mbox | patch
Permalink /patch/102296/
State Accepted
Commit e1e6889909bb1ffcde894f69efe307ed9a1a28a4
Headers show

Comments

Brian Norris - June 28, 2011, midnight
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 include/common.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch

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