Don't access drive_g->desc from boot_cdrom().
authorKevin O'Connor <kevin@koconnor.net>
Wed, 29 Dec 2010 18:26:01 +0000 (13:26 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 29 Dec 2010 18:26:01 +0000 (13:26 -0500)
The drive description is allocated with malloc_tmp() and is thus only
available during the POST phase - boot_cdrom() is called during the
boot phase.

src/boot.c

index a93bb5fcf60ced7d3795f7592ea2215d63b9bd22..8e33d5312f6cbf32fe96235b77c80130313f8d60 100644 (file)
@@ -431,7 +431,7 @@ boot_cdrom(struct ipl_entry_s *ie)
     struct drive_s *drive_g = (void*)ie->vector;
     int status = cdrom_boot(drive_g);
     if (status) {
-        printf("Boot failed: Could not read from CDROM %s (code %04x)\n", drive_g->desc, status);
+        printf("Boot failed: Could not read from CDROM (code %04x)\n", status);
         return;
     }