* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Change pointer
arithmetic to conserve alignment invariants.
This commit is contained in:
parent
9b40df20c4
commit
564840dc3d
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2011-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Change pointer
|
||||||
|
arithmetic to conserve alignment invariants.
|
||||||
|
|
||||||
2011-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
2011-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* include/grub/efiemu/efiemu.h (grub_efiemu_get_memory_map): Remove
|
* include/grub/efiemu/efiemu.h (grub_efiemu_get_memory_map): Remove
|
||||||
|
|
|
@ -216,11 +216,11 @@ grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array,
|
||||||
array->chunk_size = grub_le_to_cpu32 (sb.chunk_size) >> 9;
|
array->chunk_size = grub_le_to_cpu32 (sb.chunk_size) >> 9;
|
||||||
array->index = grub_le_to_cpu32 (sb.this_disk.number);
|
array->index = grub_le_to_cpu32 (sb.this_disk.number);
|
||||||
array->uuid_len = 16;
|
array->uuid_len = 16;
|
||||||
array->uuid = grub_malloc (16);
|
uuid = grub_malloc (16);
|
||||||
|
array->uuid = (char *) uuid;
|
||||||
if (!array->uuid)
|
if (!array->uuid)
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
uuid = (grub_uint32_t *) array->uuid;
|
|
||||||
uuid[0] = grub_swap_bytes32 (sb.set_uuid0);
|
uuid[0] = grub_swap_bytes32 (sb.set_uuid0);
|
||||||
uuid[1] = grub_swap_bytes32 (sb.set_uuid1);
|
uuid[1] = grub_swap_bytes32 (sb.set_uuid1);
|
||||||
uuid[2] = grub_swap_bytes32 (sb.set_uuid2);
|
uuid[2] = grub_swap_bytes32 (sb.set_uuid2);
|
||||||
|
|
Loading…
Reference in a new issue