* grub-core/fs/reiserfs.c (grub_reiserfs_uuid): Reject 0-uuid as
created when no uuid support is compiled into mkfs.reiser.
This commit is contained in:
parent
76df2068c4
commit
8502fbca04
2 changed files with 20 additions and 11 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-01-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/reiserfs.c (grub_reiserfs_uuid): Reject 0-uuid as
|
||||
created when no uuid support is compiled into mkfs.reiser.
|
||||
|
||||
2012-01-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/hfs.c (macroman_to_utf8): Convert / to :.
|
||||
|
|
|
@ -1351,21 +1351,25 @@ grub_reiserfs_uuid (grub_device_t device, char **uuid)
|
|||
|
||||
grub_dl_ref (my_mod);
|
||||
|
||||
*uuid = NULL;
|
||||
data = grub_reiserfs_mount (disk);
|
||||
if (data)
|
||||
{
|
||||
*uuid = grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
|
||||
grub_be_to_cpu16 (data->superblock.uuid[0]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[1]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[2]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[3]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[4]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[5]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[6]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[7]));
|
||||
unsigned i;
|
||||
for (i = 0; i < ARRAY_SIZE (data->superblock.uuid); i++)
|
||||
if (data->superblock.uuid[i])
|
||||
break;
|
||||
if (i < ARRAY_SIZE (data->superblock.uuid))
|
||||
*uuid = grub_xasprintf ("%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
|
||||
grub_be_to_cpu16 (data->superblock.uuid[0]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[1]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[2]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[3]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[4]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[5]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[6]),
|
||||
grub_be_to_cpu16 (data->superblock.uuid[7]));
|
||||
}
|
||||
else
|
||||
*uuid = NULL;
|
||||
|
||||
grub_dl_unref (my_mod);
|
||||
|
||||
|
|
Loading…
Reference in a new issue