:: commit c02f8ef8cc07fc1a18177f7cc1fecfa55e8f33cb

mintsuki <mintsuki@protonmail.com> — 2022-08-09 12:35

parents: 450770435c

stivale(2): Move 'loading kernel' prints where they belong

diff --git a/common/protos/stivale.c b/common/protos/stivale.c
index aa251f12..374d5be8 100644
--- a/common/protos/stivale.c
+++ b/common/protos/stivale.c
@@ -74,6 +74,8 @@ noreturn void stivale_load(char *config, char *cmdline) {
     if (kernel_path == NULL)
         panic(true, "stivale: KERNEL_PATH not specified");
 
+    print("stivale: Loading kernel `%s`...\n", kernel_path);
+
     if ((kernel_file = uri_open(kernel_path)) == NULL)
         panic(true, "stivale: Failed to open kernel with path `%s`. Is the path correct?", kernel_path);
 
@@ -125,8 +127,6 @@ noreturn void stivale_load(char *config, char *cmdline) {
         }
     }
 
-    print("stivale: Loading kernel `%s`...\n", kernel_path);
-
     int ret = 0;
     switch (bits) {
         case 64: {
diff --git a/common/protos/stivale2.c b/common/protos/stivale2.c
index 2941317c..c1caf11a 100644
--- a/common/protos/stivale2.c
+++ b/common/protos/stivale2.c
@@ -87,6 +87,8 @@ noreturn void stivale2_load(char *config, char *cmdline) {
     if (kernel_path == NULL)
         panic(true, "stivale2: KERNEL_PATH not specified");
 
+    print("stivale2: Loading kernel `%s`...\n", kernel_path);
+
     if ((kernel_file = uri_open(kernel_path)) == NULL)
         panic(true, "stivale2: Failed to open kernel with path `%s`. Is the path correct?", kernel_path);
 
@@ -143,8 +145,6 @@ noreturn void stivale2_load(char *config, char *cmdline) {
         }
     }
 
-    print("stivale2: Loading kernel `%s`...\n", kernel_path);
-
     bool want_pmrs = false;
     bool want_fully_virtual = false;
 
tab: 248 wrap: offon