:: commit c0924e6cf103feb9794f0259e4b91e59652cfa75

mintsuki <mintsuki@protonmail.com> — 2025-02-25 18:47

parents: 71014d8f24

protos/chainload: Get rid of unnecessary function splits

diff --git a/common/protos/chainload.c b/common/protos/chainload.c
index 9cc1e663..acf96f58 100644
--- a/common/protos/chainload.c
+++ b/common/protos/chainload.c
@@ -177,12 +177,6 @@ noreturn void chainload(char *config, char *cmdline) {
     }
 
 load:
-    bios_chainload_volume(p);
-
-    panic(true, "bios: Volume is not bootable");
-}
-
-void bios_chainload_volume(struct volume *p) {
     vga_textmode_init(false);
 
     void *buf = ext_mem_alloc(512);
@@ -192,7 +186,7 @@ void bios_chainload_volume(struct volume *p) {
     uint16_t *boot_sig = (uint16_t *)(buf + 0x1fe);
 
     if (*boot_sig != 0xaa55) {
-        return;
+        panic(true, "bios: Volume is not bootable");
     }
 
     spinup(p->drive, buf);
diff --git a/common/protos/chainload.h b/common/protos/chainload.h
index 80f6e74f..93759bc3 100644
--- a/common/protos/chainload.h
+++ b/common/protos/chainload.h
@@ -5,14 +5,4 @@
 
 noreturn void chainload(char *config, char *cmdline);
 
-#if defined (UEFI)
-#include <fs/file.h>
-noreturn void efi_chainload_file(char *config, char *cmdline, struct file_handle *image);
-#endif
-
-#if defined (BIOS)
-#include <lib/part.h>
-void bios_chainload_volume(struct volume *v);
-#endif
-
 #endif
tab: 248 wrap: offon