+2002-12-04 Yoshinori K. Okuji <okuji@enbug.org>
+
+ * stage2/builtins.c (embed_func): When checking if the disk can
+ store Stage 1.5, check every partition, if it isn't empty.
+
2002-12-04 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/stage2.c (print_entry): Put a right arrow, if the entry
char mbr[SECTOR_SIZE];
char ezbios_check[2*SECTOR_SIZE];
-
+ int i;
+
/* Open the partition. */
if (! open_partition ())
return 1;
}
/* Check if the disk can store the Stage 1.5. */
- if (PC_SLICE_START (mbr, 0) - 1 < size)
- {
- errnum = ERR_NO_DISK_SPACE;
- return 1;
- }
-
+ for (i = 0; i < 4; i++)
+ if (PC_SLICE_TYPE (mbr, i) && PC_SLICE_START (mbr, i) - 1 < size)
+ {
+ errnum = ERR_NO_DISK_SPACE;
+ return 1;
+ }
+
/* Check for EZ-BIOS signature. It should be in the third
* sector, but due to remapping it can appear in the second, so
* load and check both.