summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-23 03:01:06 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-29 21:08:37 +0200
commit3f6fd1ba65f962702753c4ad284b588e59689a23 (patch)
tree6520fcb6f2421c6ac0b0cb69d8242e3fb878f471 /src/basic
parent189d5bac5c45a6a735489541e285dec8bfc1d38d (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.c7
-rw-r--r--src/basic/util.h2
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);