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.
This commit is contained in:
okuji 2002-12-04 04:43:23 +00:00
parent ad2df4cd66
commit 3217288404
2 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,8 @@
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> 2002-12-04 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/stage2.c (print_entry): Put a right arrow, if the entry * stage2/stage2.c (print_entry): Put a right arrow, if the entry

View file

@ -1044,6 +1044,7 @@ embed_func (char *arg, int flags)
char mbr[SECTOR_SIZE]; char mbr[SECTOR_SIZE];
char ezbios_check[2*SECTOR_SIZE]; char ezbios_check[2*SECTOR_SIZE];
int i;
/* Open the partition. */ /* Open the partition. */
if (! open_partition ()) if (! open_partition ())
@ -1068,11 +1069,12 @@ embed_func (char *arg, int flags)
} }
/* Check if the disk can store the Stage 1.5. */ /* Check if the disk can store the Stage 1.5. */
if (PC_SLICE_START (mbr, 0) - 1 < size) 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; errnum = ERR_NO_DISK_SPACE;
} return 1;
}
/* Check for EZ-BIOS signature. It should be in the third /* Check for EZ-BIOS signature. It should be in the third
* sector, but due to remapping it can appear in the second, so * sector, but due to remapping it can appear in the second, so