]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2007-10-15 Robert Millan <rmh@aybabtu.com>
authorrobertmh <robertmh@localhost>
Mon, 15 Oct 2007 10:59:38 +0000 (10:59 +0000)
committerrobertmh <robertmh@localhost>
Mon, 15 Oct 2007 10:59:38 +0000 (10:59 +0000)
* normal/misc.c (grub_normal_print_device_info): Do not probe for
filesystem when dev->disk is unset.
Do probe for filesystem even when dev->disk->has_partitions is set.
In case a filesystem is found, always report it.
In case it isn't, if dev->disk->has_partitions is set, report that
a partition table was found instead of reporting that no filesystem
could be identified.

ChangeLog
normal/misc.c

index 9470fb343fb31dfcc55b0c339cfea7056ba1667e..45a043603c24154befb1d19dcb26262730bbec79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-10-15  Robert Millan  <rmh@aybabtu.com>
+
+       * normal/misc.c (grub_normal_print_device_info): Do not probe for
+       filesystem when dev->disk is unset.
+       Do probe for filesystem even when dev->disk->has_partitions is set.
+       In case a filesystem is found, always report it.
+       In case it isn't, if dev->disk->has_partitions is set, report that
+       a partition table was found instead of reporting that no filesystem
+       could be identified.
+
 2007-10-12  Robert Millan  <rmh@aybabtu.com>
 
        * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
index 55b55359fa77bac99c07cb1d187552c7b76d1cf7..271bbc94fd4e0c32610a67033c997d568692bb77 100644 (file)
@@ -40,7 +40,7 @@ grub_normal_print_device_info (const char *name)
   dev = grub_device_open (name);
   if (! dev)
     grub_printf ("Filesystem cannot be accessed");
-  else if (! dev->disk || ! dev->disk->has_partitions || dev->disk->partition)
+  else if (dev->disk)
     {
       char *label;
       grub_fs_t fs;
@@ -49,7 +49,12 @@ grub_normal_print_device_info (const char *name)
       /* Ignore all errors.  */
       grub_errno = 0;
 
-      grub_printf ("Filesystem type %s", fs ? fs->name : "unknown");
+      if (fs)
+       grub_printf ("Filesystem type %s", fs->name);
+      else if (! dev->disk->has_partitions || dev->disk->partition)
+       grub_printf ("Unknown filesystem");
+      else
+       grub_printf ("Partition table");
          
       if (fs && fs->label)
        {