mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
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:
1 parent
e2d1dba0ae
commit
a199a8cd1a
2 files changed
+20
-6
No files matched your search
@@ -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>
|
2011-06-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/kern/emu/getroot.c (grub_guess_root_device): Don't accept
|
* 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
|
struct grub_acorn_boot_block
|
||||||
{
|
{
|
||||||
grub_uint8_t misc[0x1C0];
|
union
|
||||||
struct grub_filecore_disc_record disc_record;
|
{
|
||||||
grub_uint8_t flags;
|
struct
|
||||||
grub_uint16_t start_cylinder;
|
{
|
||||||
grub_uint8_t checksum;
|
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));
|
} __attribute__ ((packed, aligned));
|
||||||
|
|
||||||
struct linux_part
|
struct linux_part
|
||||||
@@ -71,7 +78,7 @@ acorn_partition_map_find (grub_disk_t disk, struct linux_part *m,
|
|||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
for (i = 0; i != 0x1ff; ++i)
|
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)
|
if ((grub_uint8_t) checksum != boot.checksum)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|||||||
Reference in new issue
Block a user