]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2002-12-04 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Wed, 4 Dec 2002 04:43:23 +0000 (04:43 +0000)
committerokuji <okuji@localhost>
Wed, 4 Dec 2002 04:43:23 +0000 (04:43 +0000)
* stage2/builtins.c (embed_func): When checking if the disk can
store Stage 1.5, check every partition, if it isn't empty.

ChangeLog
stage2/builtins.c

index 41ff3d97a17d92d77c54c3802f7a7cd8b1f183bc..bcf55b8b3a35c59170f7b1da5beb085d14728b69 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index d0051388c4a00e324446b6e2315c2eae258d8943..b9e4ada959c8fc0076fdcbaa3004bf0e27b6815b 100644 (file)
@@ -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.