]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/partitions/check.c
x86: work around gcc 3.4.x bug
[linux-2.6-omap-h63xx.git] / fs / partitions / check.c
index 2e6413fbd2d877c3aaa2cfb7c801e5b2a899110d..7d6b34e201db4a8ba08525f942399eb742a57731 100644 (file)
@@ -499,10 +499,16 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
                if (!size)
                        continue;
                if (from + size > get_capacity(disk)) {
-                       printk(" %s: p%d exceeds device capacity\n",
+                       printk(KERN_ERR " %s: p%d exceeds device capacity\n",
                                disk->disk_name, p);
+                       continue;
+               }
+               res = add_partition(disk, p, from, size, state->parts[p].flags);
+               if (res) {
+                       printk(KERN_ERR " %s: p%d could not be added: %d\n",
+                               disk->disk_name, p, -res);
+                       continue;
                }
-               add_partition(disk, p, from, size, state->parts[p].flags);
 #ifdef CONFIG_BLK_DEV_MD
                if (state->parts[p].flags & ADDPART_FLAG_RAID)
                        md_autodetect_dev(bdev->bd_dev+p);