Misc minor improvements.
[seabios.git] / src / boot.c
index b090058fab64e41e3381c11d20407e1624d0c93d..1b5c3d8a9dcbe6bf8ef03857d47c2ae1b14cdab9 100644 (file)
@@ -1,4 +1,4 @@
-// 16bit code to load disk image and start system boot.
+// Code to load disk image and start system boot.
 //
 // Copyright (C) 2008  Kevin O'Connor <kevin@koconnor.net>
 // Copyright (C) 2002  MandrakeSoft S.A.
@@ -77,6 +77,9 @@ print_boot_failure(u16 type, u8 reason)
 static void
 try_boot(u16 seq_nr)
 {
+    if (! CONFIG_BOOT)
+        BX_PANIC("Boot support not compiled in.\n");
+
     SET_EBDA(ipl.sequence, seq_nr);
 
     u32 bootdev = GET_EBDA(ipl.bootorder);
@@ -104,8 +107,8 @@ try_boot(u16 seq_nr)
     u8 bootdrv = 0;
     struct bregs cr;
     switch(type) {
-    case IPL_TYPE_FLOPPY: /* FDD */
-    case IPL_TYPE_HARDDISK: /* HDD */
+    case IPL_TYPE_FLOPPY:
+    case IPL_TYPE_HARDDISK:
 
         bootdrv = (type == IPL_TYPE_HARDDISK) ? 0x80 : 0x00;
         bootseg = 0x07c0;
@@ -210,5 +213,5 @@ handle_19()
 }
 
 // Ughh - some older gcc compilers have a bug which causes VISIBLE32
-// functions to not be exported as global variables.
+// functions to not be exported as global variables.
 asm(".global handle_18, handle_19");