ext4: avoid hangs in ext4_da_should_update_i_disksize()
[linux-2.6.git] / fs / partitions / sgi.c
index 6fa4ff8..ea8a86d 100644 (file)
@@ -27,7 +27,7 @@ struct sgi_disklabel {
        __be32 _unused1;                        /* Padding */
 };
 
-int sgi_partition(struct parsed_partitions *state, struct block_device *bdev)
+int sgi_partition(struct parsed_partitions *state)
 {
        int i, csum;
        __be32 magic;
@@ -39,7 +39,7 @@ int sgi_partition(struct parsed_partitions *state, struct block_device *bdev)
        struct sgi_partition *p;
        char b[BDEVNAME_SIZE];
 
-       label = (struct sgi_disklabel *) read_dev_sector(bdev, 0, &sect);
+       label = read_part_sector(state, 0, &sect);
        if (!label)
                return -1;
        p = &label->partitions[0];
@@ -57,7 +57,7 @@ int sgi_partition(struct parsed_partitions *state, struct block_device *bdev)
        }
        if(csum) {
                printk(KERN_WARNING "Dev %s SGI disklabel: csum bad, label corrupted\n",
-                      bdevname(bdev, b));
+                      bdevname(state->bdev, b));
                put_dev_sector(sect);
                return 0;
        }
@@ -72,11 +72,11 @@ int sgi_partition(struct parsed_partitions *state, struct block_device *bdev)
                if (blocks) {
                        put_partition(state, slot, start, blocks);
                        if (be32_to_cpu(p->type) == LINUX_RAID_PARTITION)
-                               state->parts[slot].flags = 1;
+                               state->parts[slot].flags = ADDPART_FLAG_RAID;
                }
                slot++;
        }
-       printk("\n");
+       strlcat(state->pp_buf, "\n", PAGE_SIZE);
        put_dev_sector(sect);
        return 1;
 }