Fix spurious warning.
* grub-core/partmap/acorn.c (grub_acorn_boot_block): Make a union. (acorn_partition_map_find): Use .bin member.
This commit is contained in:
parent
e2d1dba0ae
commit
a199a8cd1a
2 changed files with 20 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
2011-06-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Fix spurious warning.
|
||||
|
||||
* grub-core/partmap/acorn.c (grub_acorn_boot_block): Make a union.
|
||||
(acorn_partition_map_find): Use .bin member.
|
||||
|
||||
2011-06-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/kern/emu/getroot.c (grub_guess_root_device): Don't accept
|
||||
|
|
|
@ -34,11 +34,18 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
|||
|
||||
struct grub_acorn_boot_block
|
||||
{
|
||||
grub_uint8_t misc[0x1C0];
|
||||
struct grub_filecore_disc_record disc_record;
|
||||
grub_uint8_t flags;
|
||||
grub_uint16_t start_cylinder;
|
||||
grub_uint8_t checksum;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
grub_uint8_t misc[0x1C0];
|
||||
struct grub_filecore_disc_record disc_record;
|
||||
grub_uint8_t flags;
|
||||
grub_uint16_t start_cylinder;
|
||||
grub_uint8_t checksum;
|
||||
} __attribute__ ((packed, aligned));
|
||||
grub_uint8_t bin[0x200];
|
||||
};
|
||||
} __attribute__ ((packed, aligned));
|
||||
|
||||
struct linux_part
|
||||
|
@ -71,7 +78,7 @@ acorn_partition_map_find (grub_disk_t disk, struct linux_part *m,
|
|||
goto fail;
|
||||
|
||||
for (i = 0; i != 0x1ff; ++i)
|
||||
checksum = (checksum & 0xff) + (checksum >> 8) + boot.misc[i];
|
||||
checksum = ((checksum & 0xff) + (checksum >> 8) + boot.bin[i]);
|
||||
|
||||
if ((grub_uint8_t) checksum != boot.checksum)
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in a new issue