diff options
-rw-r--r-- | include/parted/device.h | 3 | ||||
-rw-r--r-- | libparted/arch/linux.c | 7 | ||||
-rw-r--r-- | parted/parted.c | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/include/parted/device.h b/include/parted/device.h index 0634465..b94765c 100644 --- a/include/parted/device.h +++ b/include/parted/device.h @@ -48,7 +48,8 @@ typedef enum { PED_DEVICE_SDMMC = 14, PED_DEVICE_VIRTBLK = 15, PED_DEVICE_AOE = 16, - PED_DEVICE_MD = 17 + PED_DEVICE_MD = 17, + PED_DEVICE_LOOP = 18 } PedDeviceType; typedef struct _PedDevice PedDevice; diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c index 3792b19..5452f30 100644 --- a/libparted/arch/linux.c +++ b/libparted/arch/linux.c @@ -594,7 +594,7 @@ _device_probe_type (PedDevice* dev) } else if (_is_virtblk_major(dev_major)) { dev->type = PED_DEVICE_VIRTBLK; } else if (dev_major == LOOP_MAJOR) { - dev->type = PED_DEVICE_FILE; + dev->type = PED_DEVICE_LOOP; } else if (dev_major == MD_MAJOR) { dev->type = PED_DEVICE_MD; } else { @@ -1385,6 +1385,11 @@ linux_new (const char* path) goto error_free_arch_specific; break; + case PED_DEVICE_LOOP: + if (!init_generic (dev, _("Loopback device"))) + goto error_free_arch_specific; + break; + case PED_DEVICE_DM: { char* type; diff --git a/parted/parted.c b/parted/parted.c index 32c2fcc..51ecdaf 100644 --- a/parted/parted.c +++ b/parted/parted.c @@ -853,7 +853,7 @@ _print_disk_info (const PedDevice *dev, const PedDisk *disk) "cpqarray", "file", "ataraid", "i2o", "ubd", "dasd", "viodasd", "sx8", "dm", "xvd", "sd/mmc", "virtblk", "aoe", - "md"}; + "md", "loopback"}; char* start = ped_unit_format (dev, 0); PedUnit default_unit = ped_unit_get_default (); |