From patchwork Mon Jun 27 18:27:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [06/10] mtd-utils: add common version printing function Date: Mon, 27 Jun 2011 08:27:23 -0000 From: Brian Norris X-Patchwork-Id: 102249 Message-Id: <1309199247-19248-7-git-send-email-computersforpeace@gmail.com> To: "Artem Bityutskiy" Cc: Brian Norris , linux-mtd@lists.infradead.org, Mike Frysinger Signed-off-by: Brian Norris --- include/common.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/common.h b/include/common.h index 65ec086..b285bc0 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 { \ + fprintf(stderr, PROGRAM_NAME " " VERSION "\n"); \ +} while (0) + #include "xalloc.h" #ifdef __cplusplus