]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2006-08-19 Robert Millan <rmh@aybabtu.com>
authorrobertmh <robertmh@localhost>
Thu, 14 Sep 2006 18:52:50 +0000 (18:52 +0000)
committerrobertmh <robertmh@localhost>
Thu, 14 Sep 2006 18:52:50 +0000 (18:52 +0000)
* util/i386/pc/grub-install.in: Skip menu.lst when removing
/boot/grub/*.lst.
* util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
* util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
before adding it to device.map.

ChangeLog
util/i386/pc/getroot.c
util/i386/pc/grub-install.in
util/i386/pc/grub-mkdevicemap.c

index a5ad08af48c990d9ee166910c163166f42832198..b31b96c8a00a81e4a982950d61ef0ad8b10e27ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-08-19  Robert Millan  <rmh@aybabtu.com>
+
+       * util/i386/pc/grub-install.in: Skip menu.lst when removing
+       /boot/grub/*.lst.
+       * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
+       * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
+       before adding it to device.map.
+
 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
 
        * genmk.rb: Let GCC generate dependenceies the first time it
index a4a1426fefa434fb64f5ed3931bb056fff46ba46..e72c156e96eef01f13832800b4a448d195ba1ffc 100644 (file)
@@ -160,9 +160,11 @@ find_root_device (const char *dir, dev_t dev)
        /* Don't follow symbolic links.  */
        continue;
       
-      if (S_ISDIR (st.st_mode))
+      if (S_ISDIR (st.st_mode) && ent->d_name[0] != '.')
        {
-         /* Find it recursively.  */
+         /* Find it recursively, but avoid dotdirs (like ".static") since they
+            could contain duplicates, which would later break the
+            pathname-based check */
          char *res;
 
          res = find_root_device (ent->d_name, dev);
index 418ec7fedd5e0c0232901429bfd5737ef64a285e..072bf585b42111c0843a9152dc4963652573d51f 100644 (file)
@@ -198,7 +198,7 @@ fi
 
 # Copy the GRUB images to the GRUB directory.
 for file in ${grubdir}/*.mod ${grubdir}/*.lst ${grubdir}/*.img; do
-    if test -f $file; then
+    if test -f $file && [ "`basename $file`" != menu.lst ]; then
        rm -f $file || exit 1
     fi
 done
@@ -206,7 +206,7 @@ for file in ${pkglibdir}/*.mod ${pkglibdir}/*.lst ${pkglibdir}/*.img; do
     cp -f $file ${grubdir} || exit 1
 done
 
-# Create the core image. First, auto-detect the filesystme module.
+# Create the core image. First, auto-detect the filesystem module.
 fs_module=`$grub_probefs --device-map=${device_map} ${grubdir}`
 if test "x$fs_module" = x -a "x$modules" = x; then
     echo "Auto-detection of a filesystem module failed." 1>&2
index 527fbf18d07de77310063ccafe1d4d2b4870c1e5..1c4ca86bdab8f97f8bd6468d0fde42e4b0977ea3 100644 (file)
@@ -378,8 +378,11 @@ make_device_map (const char *device_map, int floppy_disks)
   for (i = 0; i < floppy_disks; i++)
     {
       char name[16];
+      struct stat st;
       
       get_floppy_disk_name (name, i);
+      if (stat (name, &st) < 0)
+       break;
       /* In floppies, write the map, whether check_device succeeds
         or not, because the user just may not insert floppies.  */
       if (fp)