summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-07-19 18:39:54 +0200
committerLennart Poettering <lennart@poettering.net>2016-07-21 11:10:35 +0200
commit25579a43efcf5fdced4041427164e0852c035ab0 (patch)
tree6946e2af2ed51322fe254c9dcd05fe0f6ae33c61
parenta6bc7db980532d294c29f1cd5654f03453519c92 (diff)
bootctl: minor coding style improvements
-rw-r--r--src/boot/bootctl.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index 7cb2259717..6e0c961527 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -46,6 +46,9 @@
#include "string-util.h"
#include "util.h"
+static const char *arg_path = "/boot";
+static bool arg_touch_variables = true;
+
static int verify_esp(const char *p, uint32_t *part, uint64_t *pstart, uint64_t *psize, sd_id128_t *uuid) {
struct statfs sfs;
struct stat st, st2;
@@ -930,9 +933,6 @@ static int help(void) {
return 0;
}
-static const char *arg_path = "/boot";
-static bool arg_touch_variables = true;
-
static int parse_argv(int argc, char *argv[]) {
enum {
ARG_PATH = 0x100,
@@ -1036,12 +1036,10 @@ static int bootctl_main(int argc, char*argv[]) {
return r;
switch (arg_action) {
+
case ACTION_STATUS: {
- _cleanup_free_ char *fw_type = NULL;
- _cleanup_free_ char *fw_info = NULL;
- _cleanup_free_ char *loader = NULL;
- _cleanup_free_ char *loader_path = NULL;
- sd_id128_t loader_part_uuid = {};
+ _cleanup_free_ char *fw_type = NULL, *fw_info = NULL, *loader = NULL, *loader_path = NULL;
+ sd_id128_t loader_part_uuid = SD_ID128_NULL;
if (is_efi_boot()) {
read_loader_efi_var("LoaderFirmwareType", &fw_type);