diff options
author | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-09-01 17:22:24 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-09-01 17:22:24 +0200 |
commit | 42fba964c9e23830454fbfdd3895da315356bd27 (patch) | |
tree | 6d5a54554ae318d0b87cc7dfe2290447c3b37832 /cmd/syslog.c | |
parent | 3b8764b9d21009d7e163bdc20e4a80fb765bbdfc (diff) |
Centralize/unify version string printing
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'cmd/syslog.c')
-rw-r--r-- | cmd/syslog.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/cmd/syslog.c b/cmd/syslog.c index d225921..48c9343 100644 --- a/cmd/syslog.c +++ b/cmd/syslog.c @@ -72,13 +72,6 @@ static const struct option options[] = { static const char *shortopt = "hVcf:l:i:"; -static const char *versiontext = -"syslog (Pygos init) "PACKAGE_VERSION"\n" -"Copyright (C) 2018 David Oberhollenzer\n" -"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\n" -"This is free software: you are free to change and redistribute it.\n" -"There is NO WARRANTY, to the extent permitted by law.\n"; - static const char *helptext = "Usage: syslog [OPTION]... [STRING]...\n\n" "Concatenate the given STRINGs and send a log message to the syslog daemon.\n" @@ -125,12 +118,6 @@ static NORETURN void usage(int status) exit(status); } -static NORETURN void version(void) -{ - fputs(versiontext, stdout); - exit(EXIT_SUCCESS); -} - static int readint(const char *str) { int x = 0; @@ -188,7 +175,7 @@ static void process_options(int argc, char **argv) case 'h': usage(EXIT_SUCCESS); case 'V': - version(); + print_version("syslog"); default: usage(EXIT_FAILURE); } |