summaryrefslogtreecommitdiff
path: root/include/parted/device.in.h
diff options
context:
space:
mode:
authorSebastian Parschauer <sparschauer@suse.de>2017-10-24 10:22:21 +0200
committerBrian C. Lane <bcl@redhat.com>2017-12-19 09:55:14 -0800
commit71885c5f493f3a5d950adbb3e8d17eff7e023053 (patch)
treec438847604ed33bba53bac50aa33fccf2892d2c1 /include/parted/device.in.h
parent571293e3f9ee45f37867578899c6a8a9cd35afd4 (diff)
downloadparted-71885c5f493f3a5d950adbb3e8d17eff7e023053.tar.gz
Add support for NVDIMM devices
Recognize NVDIMM devices, so that "parted -s /dev/pmem7 p" now prints "Model: NVDIMM Device (pmem)" instead of "Model: Unknown (unknown)". In order for a device to be recognized as NVDIMM, it has to have a 'blkext' major number. But since this major can be used also by other device types, we also check that the device path contains 'pmem' as a substring. * NEWS: Mention the change * include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_PMEM * libparted/arch/linux.c(_device_probe_type): Recognize NVDIMM devices. * libparted/arch/linux.c(linux_new): Handle NVDIMM devices. * parted/parted.c(do_print): Add "pmem" to list of transports. Signed-off-by: Sebastian Parschauer <sparschauer@suse.de>
Diffstat (limited to 'include/parted/device.in.h')
-rw-r--r--include/parted/device.in.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/parted/device.in.h b/include/parted/device.in.h
index 1b6e7b8..d3af6bb 100644
--- a/include/parted/device.in.h
+++ b/include/parted/device.in.h
@@ -51,7 +51,8 @@ typedef enum {
PED_DEVICE_MD = 17,
PED_DEVICE_LOOP = 18,
PED_DEVICE_NVME = 19,
- PED_DEVICE_RAM = 20
+ PED_DEVICE_RAM = 20,
+ PED_DEVICE_PMEM = 21
} PedDeviceType;
typedef struct _PedDevice PedDevice;