2008-06-05 Robert Millan <rmh@aybabtu.com>

* normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
        is found, print it (same layout as with labels).
This commit is contained in:
robertmh 2008-06-05 21:27:54 +00:00
parent 1ad36d3785
commit 9ece62fb9f
2 changed files with 32 additions and 13 deletions

View file

@ -1,3 +1,8 @@
2008-06-05 Robert Millan <rmh@aybabtu.com>
* normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
is found, print it (same layout as with labels).
2008-06-04 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (get_drive): Rename to ...

View file

@ -42,7 +42,6 @@ grub_normal_print_device_info (const char *name)
grub_printf ("Filesystem cannot be accessed");
else if (dev->disk)
{
char *label;
grub_fs_t fs;
fs = grub_fs_probe (dev);
@ -50,23 +49,38 @@ grub_normal_print_device_info (const char *name)
grub_errno = 0;
if (fs)
grub_printf ("Filesystem type %s", fs->name);
{
grub_printf ("Filesystem type %s", fs->name);
if (fs->label)
{
char *label;
(fs->label) (dev, &label);
if (grub_errno == GRUB_ERR_NONE)
{
if (label && grub_strlen (label))
grub_printf (", Label %s", label);
grub_free (label);
}
grub_errno = GRUB_ERR_NONE;
}
if (fs->uuid)
{
char *uuid;
(fs->uuid) (dev, &uuid);
if (grub_errno == GRUB_ERR_NONE)
{
if (uuid && grub_strlen (uuid))
grub_printf (", UUID %s", uuid);
grub_free (uuid);
}
grub_errno = GRUB_ERR_NONE;
}
}
else if (! dev->disk->has_partitions || dev->disk->partition)
grub_printf ("Unknown filesystem");
else
grub_printf ("Partition table");
if (fs && fs->label)
{
(fs->label) (dev, &label);
if (grub_errno == GRUB_ERR_NONE)
{
if (label && grub_strlen (label))
grub_printf (", Label %s", label);
grub_free (label);
}
grub_errno = GRUB_ERR_NONE;
}
grub_device_close (dev);
}