diff options
author | Sebastian Parschauer <sparschauer@suse.de> | 2017-10-24 10:22:21 +0200 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2017-12-19 09:55:14 -0800 |
commit | 71885c5f493f3a5d950adbb3e8d17eff7e023053 (patch) | |
tree | c438847604ed33bba53bac50aa33fccf2892d2c1 /parted | |
parent | 571293e3f9ee45f37867578899c6a8a9cd35afd4 (diff) | |
download | parted-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 'parted')
-rw-r--r-- | parted/parted.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/parted/parted.c b/parted/parted.c index c471d49..b5e3b97 100644 --- a/parted/parted.c +++ b/parted/parted.c @@ -987,7 +987,8 @@ _print_disk_info (const PedDevice *dev, const PedDisk *diskp) "cpqarray", "file", "ataraid", "i2o", "ubd", "dasd", "viodasd", "sx8", "dm", "xvd", "sd/mmc", "virtblk", "aoe", - "md", "loopback", "nvme", "brd"}; + "md", "loopback", "nvme", "brd", + "pmem"}; char* start = ped_unit_format (dev, 0); PedUnit default_unit = ped_unit_get_default (); |