parted/parted-1.9.0-lo-as-file-rh546622.patch

21 lines
964 B
Diff
Raw Normal View History

diff -up parted-1.9.0/libparted/arch/linux.c.orig parted-1.9.0/libparted/arch/linux.c
--- parted-1.9.0/libparted/arch/linux.c.orig 2009-12-14 22:44:18.000000000 +0100
+++ parted-1.9.0/libparted/arch/linux.c 2009-12-15 10:25:38.000000000 +0100
@@ -259,6 +259,7 @@ struct blkdev_ioctl_param {
#define SX8_MAJOR2 161
#define XVD_MAJOR 202
#define SDMMC_MAJOR 179
+#define LOOP_MAJOR 7
#define SCSI_BLK_MAJOR(M) ( \
(M) == SCSI_DISK0_MAJOR \
@@ -561,6 +562,8 @@ _device_probe_type (PedDevice* dev)
dev->type = PED_DEVICE_SDMMC;
} else if (_is_virtblk_major(dev_major)) {
dev->type = PED_DEVICE_VIRTBLK;
+ } else if (dev_major == LOOP_MAJOR) {
+ dev->type = PED_DEVICE_FILE;
} else {
dev->type = PED_DEVICE_UNKNOWN;
}