]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Mon, 18 Jul 2005 20:30:37 +0000 (20:30 +0000)
committerokuji <okuji@localhost>
Mon, 18 Jul 2005 20:30:37 +0000 (20:30 +0000)
* commands/ls.c (grub_ls_list_disks): Print the filesystem
information on each device, if it does not have partitions. Print
"Device" instead of "Disk", because this function is not specific
to disk devices.

* normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
static to ensure that it is put on the memory rather than a
register.

ChangeLog
commands/ls.c
normal/main.c

index 715fc2e2a7eef9ae292a28fdf0a96049880a32dc..cadf0c9fe00a7220b45feac6819a4029f45bf6a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
+
+       * commands/ls.c (grub_ls_list_disks): Print the filesystem
+       information on each device, if it does not have partitions. Print
+       "Device" instead of "Disk", because this function is not specific
+       to disk devices.
+
+       * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
+       static to ensure that it is put on the memory rather than a
+       register.
+
 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
 
        * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
index e0be7cc3cf5863686aa44a9a1fc103888389e486..32bedba554dc30f3403d809741bd37176b455c30 100644 (file)
@@ -71,7 +71,33 @@ grub_ls_list_disks (int longlist)
       if (dev)
        {
          if (longlist)
-           grub_printf ("Disk: %s\n", name);
+           {
+             grub_printf ("Device: %s", name);
+
+             if (! dev->disk || ! dev->disk->has_partitions)
+               {
+                 grub_fs_t fs;
+                 char *label;
+
+                 fs = grub_fs_probe (dev);
+                 grub_errno = GRUB_ERR_NONE;
+
+                 grub_printf (", Filesystem type %s",
+                              fs ? fs->name : "Unknown");
+                 
+                 (fs->label) (dev, &label);
+                 if (grub_errno == GRUB_ERR_NONE)
+                   {
+                     if (label && grub_strlen (label))
+                       grub_printf (", Label: %s", label);
+                     grub_free (label);
+                   }
+                 else
+                   grub_errno = GRUB_ERR_NONE;
+               }
+
+             grub_putchar ('\n');
+           }
          else
            grub_printf ("(%s) ", name);
 
@@ -91,7 +117,6 @@ grub_ls_list_disks (int longlist)
   grub_putchar ('\n');
   grub_refresh ();
 
   return 0;
 }
 
index f2f0b7039b087870ef9561f3cab9092f5f55de2a..2a39ce54f1540c582e81f04536bc53e00b9c1bb5 100644 (file)
@@ -490,8 +490,9 @@ grub_rescue_cmd_normal (int argc, char *argv[])
 {
   if (argc == 0)
     {
-      /* Guess the config filename.  */
-      char *config;
+      /* Guess the config filename. It is necessary to make CONFIG static,
+        so that it won't get broken by longjmp.  */
+      static char *config;
       const char *prefix;
       
       prefix = grub_env_get ("prefix");