summaryrefslogtreecommitdiff
path: root/src/boot/bootctl.c
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/boot/bootctl.c
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/boot/bootctl.c')
-rw-r--r--src/boot/bootctl.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index ac1711b318..f991e30cfa 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -20,28 +20,27 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdio.h>
-#include <getopt.h>
-#include <stdlib.h>
#include <assert.h>
-#include <sys/statfs.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <dirent.h>
+#include <blkid/blkid.h>
#include <ctype.h>
-#include <limits.h>
+#include <dirent.h>
+#include <errno.h>
#include <ftw.h>
+#include <getopt.h>
+#include <limits.h>
#include <stdbool.h>
-#include <blkid/blkid.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/statfs.h>
+#include <unistd.h>
+#include "blkid-util.h"
#include "efivars.h"
-#include "build.h"
-#include "util.h"
#include "rm-rf.h"
-#include "blkid-util.h"
+#include "util.h"
static int verify_esp(const char *p, uint32_t *part, uint64_t *pstart, uint64_t *psize, sd_id128_t *uuid) {
struct statfs sfs;
@@ -967,8 +966,7 @@ static int parse_argv(int argc, char *argv[]) {
return 0;
case ARG_VERSION:
- printf(VERSION "\n");
- return 0;
+ return version();
case ARG_PATH:
arg_path = optarg;