Commit b3884646 authored by Russell King's avatar Russell King Committed by Linus Torvalds

[PATCH] Fix Acorn Eesox partition handling build

parent 443848af
...@@ -517,7 +517,7 @@ adfspart_check_EESOX(struct parsed_partitions *state, struct block_device *bdev) ...@@ -517,7 +517,7 @@ adfspart_check_EESOX(struct parsed_partitions *state, struct block_device *bdev)
const unsigned char *data; const unsigned char *data;
unsigned char buffer[256]; unsigned char buffer[256];
struct eesox_part *p; struct eesox_part *p;
u32 start = 0; sector_t start = 0;
int i, slot = 1; int i, slot = 1;
data = read_dev_sector(bdev, 7, &sect); data = read_dev_sector(bdev, 7, &sect);
...@@ -533,22 +533,22 @@ adfspart_check_EESOX(struct parsed_partitions *state, struct block_device *bdev) ...@@ -533,22 +533,22 @@ adfspart_check_EESOX(struct parsed_partitions *state, struct block_device *bdev)
put_dev_sector(sect); put_dev_sector(sect);
for (i = 0, p = (struct eesox_part *)buffer; i < 8; i++, p++) { for (i = 0, p = (struct eesox_part *)buffer; i < 8; i++, p++) {
u32 next; sector_t next;
if (memcmp(p->magic, "Eesox", 6)) if (memcmp(p->magic, "Eesox", 6))
break; break;
next = le32_to_cpu(p->start) + first_sector; next = le32_to_cpu(p->start);
if (i) if (i)
put_partition(state, slot++, start, next - start); put_partition(state, slot++, start, next - start);
start = next; start = next;
} }
if (i != 0) { if (i != 0) {
unsigned long size; sector_t size;
size = hd->part[minor(to_kdev_t(bdev->bd_dev))].nr_sects; size = get_capacity(bdev->bd_disk);
add_gd_partition(hd, minor++, start, size - start); put_partition(state, slot++, start, size - start);
printk("\n"); printk("\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment