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

*  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
        before dereferencing it.

        * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
        union with fat12/fat16-specific ones.  Add some new fields, including
        `num_serial' for both versions.
        (struct grub_fat_data): Add `uuid' member.
        (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
        names.  Initialize `data->uuid' using `num_serial'.
        (grub_fat_uuid): New function.
        (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.

        * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
        (grub_reiserfs_uuid): New function.
        (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
        member.

        * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
        (grub_xfs_uuid): New function.
        (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
This commit is contained in:
robertmh 2008-06-01 13:30:00 +00:00
parent 1385c5bb3d
commit 00c108a446
5 changed files with 169 additions and 19 deletions

View file

@ -117,7 +117,7 @@ get_drive (const char *name)
if (name)
{
for (i = 0; i < sizeof (map) / sizeof (map[0]); i++)
if (! strcmp (map[i].drive, name))
if (map[i].drive && ! strcmp (map[i].drive, name))
return i;
}
else