:: commit 2f08116acb790b15b6178b62cad7a02a104bda76

mintsuki <mintsuki@protonmail.com> — 2021-06-30 16:44

parents: f8b5b145b5

misc: Fix potentially misleading strings

diff --git a/stage23/menu.c b/stage23/menu.c
index 29716268..0c74c8a3 100644
--- a/stage23/menu.c
+++ b/stage23/menu.c
@@ -406,7 +406,7 @@ refresh:
     int max_entries = print_tree(0, 0, selected_entry, menu_tree,
                                  &selected_menu_entry);
 
-    print("\nArrows to choose, enter to boot, 'e' to edit selected entry.");
+    print("\nArrows to select, enter to boot, 'e' to edit selected entry.");
 
     if (selected_menu_entry->sub != NULL)
         skip_timeout = true;
diff --git a/stage23/protos/chainload.c b/stage23/protos/chainload.c
index 21c35113..6ca5cfe7 100644
--- a/stage23/protos/chainload.c
+++ b/stage23/protos/chainload.c
@@ -117,7 +117,7 @@ void chainload(char *config) {
 
     struct file_handle *image = ext_mem_alloc(sizeof(struct file_handle));
     if (!uri_open(image, image_path))
-        panic("chainload: Could not open image");
+        panic("chainload: Failed to open image with path `%s`. Is the path correct?", image_path);
 
     void *ptr = freadall(image, MEMMAP_RESERVED);
     size_t image_size = image->size;
diff --git a/stage23/protos/linux.c b/stage23/protos/linux.c
index eb266ad9..1961b9f1 100644
--- a/stage23/protos/linux.c
+++ b/stage23/protos/linux.c
@@ -353,7 +353,7 @@ void linux_load(char *config, char *cmdline) {
         panic("linux: KERNEL_PATH not specified");
 
     if (!uri_open(kernel, kernel_path))
-        panic("linux: Could not open kernel resource");
+        panic("linux: Failed to open kernel with path `%s`. Is the path correct?", kernel_path);
 
     uint32_t signature;
     fread(kernel, &signature, 0x202, sizeof(uint32_t));
@@ -443,7 +443,7 @@ void linux_load(char *config, char *cmdline) {
 
         struct file_handle module;
         if (!uri_open(&module, module_path))
-            panic("linux: Could not open `%s`", module_path);
+            panic("linux: Failed to open module with path `%s`. Is the path correct?", module_path);
 
         size_of_all_modules += module.size;
     }
diff --git a/stage23/protos/multiboot1.c b/stage23/protos/multiboot1.c
index 1ce7a660..9c8a64c3 100644
--- a/stage23/protos/multiboot1.c
+++ b/stage23/protos/multiboot1.c
@@ -28,7 +28,7 @@ void multiboot1_load(char *config, char *cmdline) {
     print("multiboot1: Loading kernel `%s`...\n", kernel_path);
 
     if (!uri_open(kernel_file, kernel_path))
-        panic("multiboot1: Could not open kernel resource");
+        panic("multiboot1: Failed to open kernel with path `%s`. Is the path correct?", kernel_path);
 
     uint8_t *kernel = freadall(kernel_file, MEMMAP_USABLE);
 
@@ -98,7 +98,7 @@ void multiboot1_load(char *config, char *cmdline) {
 
             struct file_handle f;
             if (!uri_open(&f, module_path))
-                panic("multiboot1: Requested module with path \"%s\" not found!", module_path);
+                panic("multiboot1: Failed to open module with path `%s`. Is the path correct?", module_path);
 
             char *cmdline = config_get_value(config, i, "MODULE_STRING");
 
diff --git a/stage23/protos/stivale.c b/stage23/protos/stivale.c
index 841c80b9..e6d6abfa 100644
--- a/stage23/protos/stivale.c
+++ b/stage23/protos/stivale.c
@@ -46,7 +46,7 @@ void stivale_load(char *config, char *cmdline) {
     print("stivale: Loading kernel `%s`...\n", kernel_path);
 
     if (!uri_open(kernel_file, kernel_path))
-        panic("stivale: Could not open kernel resource");
+        panic("stivale: Failed to open kernel with path `%s`. Is the path correct?", kernel_path);
 
     struct stivale_header stivale_hdr;
 
@@ -153,7 +153,7 @@ void stivale_load(char *config, char *cmdline) {
 
         struct file_handle f;
         if (!uri_open(&f, module_path))
-            panic("stivale: Requested module with path \"%s\" not found!", module_path);
+            panic("stivale: Failed to open module with path `%s`. Is the path correct?", module_path);
 
         m->begin = REPORTED_ADDR((uint64_t)(size_t)freadall(&f, STIVALE_MMAP_KERNEL_AND_MODULES));
         m->end   = m->begin + f.size;
diff --git a/stage23/protos/stivale2.c b/stage23/protos/stivale2.c
index 9159da79..8fab0bc6 100644
--- a/stage23/protos/stivale2.c
+++ b/stage23/protos/stivale2.c
@@ -68,7 +68,7 @@ void stivale2_load(char *config, char *cmdline, bool pxe, void *efi_system_table
     print("stivale2: Loading kernel `%s`...\n", kernel_path);
 
     if (!uri_open(kernel_file, kernel_path))
-        panic("stivale2: Could not open kernel resource");
+        panic("stivale2: Failed to open kernel with path `%s`. Is the path correct?", kernel_path);
 
     struct stivale2_header stivale2_hdr;
 
@@ -228,7 +228,7 @@ void stivale2_load(char *config, char *cmdline, bool pxe, void *efi_system_table
 
         struct file_handle f;
         if (!uri_open(&f, module_path))
-            panic("stivale2: Requested module with path \"%s\" not found!", module_path);
+            panic("stivale2: Failed to open module with path `%s`. Is the path correct?", module_path);
 
         m->begin = REPORTED_ADDR((uint64_t)(size_t)freadall(&f, STIVALE2_MMAP_KERNEL_AND_MODULES));
         m->end   = m->begin + f.size;
tab: 248 wrap: offon