From: Lennart Poettering Date: Tue, 5 Feb 2019 18:15:21 +0000 (+0100) Subject: bootctl: let's make sure we always add empty line after EFI binary output X-Git-Tag: v242-rc1~218^2~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=882b3bd6c5cb4f629d0142f5c0d3fc542f45e0de;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index 5cc187f5ab2..be8a90445c9 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) {