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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user