From 2c308875a7fa1aaa44892c368f6b37bcfcb8879a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 16 Apr 2019 15:14:13 +0200 Subject: misc: consolidate version printing and close_stdout() Signed-off-by: Karel Zak --- include/c.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/c.h b/include/c.h index fb6835253..fc69b910b 100644 --- a/include/c.h +++ b/include/c.h @@ -351,6 +351,11 @@ static inline int xusleep(useconds_t usec) #define UTIL_LINUX_VERSION _("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING +#define print_version(eval) __extension__ ({ \ + printf(UTIL_LINUX_VERSION); \ + exit(eval); \ +}) + /* * scanf modifiers for "strings allocation" */ -- cgit v1.2.3-55-g7522