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.
This commit is contained in:
Lennart Poettering
2015-09-29 21:08:37 +02:00
parent 189d5bac5c
commit 3f6fd1ba65
52 changed files with 474 additions and 586 deletions
+7
View File
@@ -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;
}
+2
View File
@@ -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);