]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: suffix SecureBoot message with newline
authorLennart Poettering <lennart@poettering.net>
Mon, 27 Nov 2023 11:50:09 +0000 (12:50 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 28 Nov 2023 15:40:38 +0000 (15:40 +0000)
Output is otherwise so weird, since this is the last log line seen for a
while typically, and if it doesn#t put the cursor back in the first
column it looks like something is incomplete and hanging. Hence do what
we always do: finish log messages with a newline.

src/boot/efi/secure-boot.c

index 370064fa08983db94c239a64279ade6ef6981e98..f76d2f46d75ac907d44c60bd209a92ff628a8ddc 100644 (file)
@@ -74,6 +74,8 @@ EFI_STATUS secure_boot_enroll_at(EFI_FILE *root_dir, const char16_t *path, bool
                         /* user aborted, returning EFI_SUCCESS here allows the user to go back to the menu */
                         return EFI_SUCCESS;
                 }
+
+                printf("\n");
         }
 
         _cleanup_(file_closep) EFI_FILE *dir = NULL;
@@ -117,10 +119,7 @@ EFI_STATUS secure_boot_enroll_at(EFI_FILE *root_dir, const char16_t *path, bool
                 }
         }
 
-        if (!is_safe)
-                printf("\n");
-
-        printf("Custom Secure Boot keys successfully enrolled, rebooting the system now!");
+        printf("Custom Secure Boot keys successfully enrolled, rebooting the system now!\n");
         /* The system should be in secure boot mode now and we could continue a regular boot. But at least
          * TPM PCR7 measurements should change on next boot. Reboot now so that any OS we load does not end
          * up relying on the old PCR state. */