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:
parent
ad2df4cd66
commit
3217288404
2 changed files with 14 additions and 7 deletions
|
@ -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>
|
||||
|
||||
* stage2/stage2.c (print_entry): Put a right arrow, if the entry
|
||||
|
|
|
@ -1044,7 +1044,8 @@ embed_func (char *arg, int flags)
|
|||
|
||||
char mbr[SECTOR_SIZE];
|
||||
char ezbios_check[2*SECTOR_SIZE];
|
||||
|
||||
int i;
|
||||
|
||||
/* Open the partition. */
|
||||
if (! open_partition ())
|
||||
return 1;
|
||||
|
@ -1068,12 +1069,13 @@ embed_func (char *arg, int flags)
|
|||
}
|
||||
|
||||
/* 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue