From 882b3bd6c5cb4f629d0142f5c0d3fc542f45e0de Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 5 Feb 2019 19:15:21 +0100 Subject: [PATCH] bootctl: let's make sure we always add empty line after EFI binary output Let's make sure we output another "\n", even if we fail this function, so that the output we started is separated properly from what is following. --- src/boot/bootctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index 5cc187f5ab..be8a90445c 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -224,19 +224,21 @@ static int status_binaries(const char *esp_path, sd_id128_t partition) { r = enumerate_binaries(esp_path, "EFI/systemd", NULL); if (r < 0) - return r; + goto finish; if (r == 0) log_info("systemd-boot not installed in ESP."); r = enumerate_binaries(esp_path, "EFI/BOOT", "boot"); if (r < 0) - return r; + goto finish; if (r == 0) log_info("No default/fallback boot loader installed in ESP."); - printf("\n"); + r = 0; - return 0; +finish: + printf("\n"); + return r; } static int print_efi_option(uint16_t id, bool in_order) {