restore BLKRRPART semantics
PATCH 1/1 restore BLKRRPART semantics
In 2.6.8 the code for the BLKRRPART ioctl was changed to return EIO when no partitions were found, such as on an empty disk. This breaks some partitioning programs and is also confusing: "Input/Output error" while in fact nothing was wrong with this brand new all blank disk.
This restores old behaviour.
Andries
fs/partitions/check.c +1 -1
@@ -378,7 +378,7 @@ int rescan_partitions(struct gendisk *diif (disk->fops->revalidate_disk) disk->fops->revalidate_disk (disk);if (!get_capacity (disk) || !(state =check_partition (disk, bdev))) -return -EIO ; +return 0 ;for (p =1 ; p < state->limit; p++) {sector_t size = state->parts[p].size;sector_t from = state->parts[p].from;