diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-23 03:01:06 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-29 21:08:37 +0200 |
commit | 3f6fd1ba65f962702753c4ad284b588e59689a23 (patch) | |
tree | 6520fcb6f2421c6ac0b0cb69d8242e3fb878f471 /src/basic | |
parent | 189d5bac5c45a6a735489541e285dec8bfc1d38d (diff) |
util: introduce common version() implementation and use it everywhere
This also allows us to drop build.h from a ton of files, hence do so.
Since we touched the #includes of those files, let's order them properly
according to CODING_STYLE.
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/util.c | 7 | ||||
-rw-r--r-- | src/basic/util.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/basic/util.c b/src/basic/util.c index f7e4aefebb..2bad33be1b 100644 --- a/src/basic/util.c +++ b/src/basic/util.c @@ -72,6 +72,7 @@ * otherwise conflicts with sys/mount.h. Yay, Linux is great! */ #include <linux/fs.h> +#include "build.h" #include "def.h" #include "device-nodes.h" #include "env-util.h" @@ -6920,3 +6921,9 @@ int receive_one_fd(int transport_fd, int flags) { void nop_signal_handler(int sig) { /* nothing here */ } + +int version(void) { + puts(PACKAGE_STRING "\n" + SYSTEMD_FEATURES); + return 0; +} diff --git a/src/basic/util.h b/src/basic/util.h index 96811f23d9..afd906477a 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -946,3 +946,5 @@ int send_one_fd(int transport_fd, int fd, int flags); int receive_one_fd(int transport_fd, int flags); void nop_signal_handler(int sig); + +int version(void); |