merge mainline into filesys
This commit is contained in:
commit
abafac997c
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2010-12-31 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/partmap/amiga.c (GRUB_AMIGA_PART_MAGIC): New define.
|
||||||
|
(amiga_partition_map_iterate): Check "PART" magic to avoid a very long
|
||||||
|
loop in case of incorrect amiga partmap.
|
||||||
|
|
||||||
2010-12-31 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-12-31 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/partmap/amiga.c (GRUB_AMIGA_RDSK_MAGIC): New define.
|
* grub-core/partmap/amiga.c (GRUB_AMIGA_RDSK_MAGIC): New define.
|
||||||
|
|
|
@ -44,6 +44,7 @@ struct grub_amiga_partition
|
||||||
{
|
{
|
||||||
/* "PART". */
|
/* "PART". */
|
||||||
grub_uint8_t magic[4];
|
grub_uint8_t magic[4];
|
||||||
|
#define GRUB_AMIGA_PART_MAGIC "PART"
|
||||||
grub_int32_t size;
|
grub_int32_t size;
|
||||||
grub_int32_t checksum;
|
grub_int32_t checksum;
|
||||||
grub_uint32_t scsihost;
|
grub_uint32_t scsihost;
|
||||||
|
@ -110,6 +111,9 @@ amiga_partition_map_iterate (grub_disk_t disk,
|
||||||
if (grub_disk_read (disk, next, 0, sizeof (apart), &apart))
|
if (grub_disk_read (disk, next, 0, sizeof (apart), &apart))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
|
if (grub_memcmp (apart.magic, GRUB_AMIGA_PART_MAGIC,
|
||||||
|
sizeof (apart.magic)) == 0)
|
||||||
|
|
||||||
/* Calculate the first block and the size of the partition. */
|
/* Calculate the first block and the size of the partition. */
|
||||||
part.start = (grub_be_to_cpu32 (apart.lowcyl)
|
part.start = (grub_be_to_cpu32 (apart.lowcyl)
|
||||||
* grub_be_to_cpu32 (apart.heads)
|
* grub_be_to_cpu32 (apart.heads)
|
||||||
|
|
Loading…
Reference in a new issue