]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: let's make sure we always add empty line after EFI binary output
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Feb 2019 18:15:21 +0000 (19:15 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2019 11:41:32 +0000 (12:41 +0100)
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

index 5cc187f5ab25b39d3a370c61c14c8d7e037efaaf..be8a90445c93ee2be45b5b9f13fc5f58035b9fd8 100644 (file)
@@ -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) {