[parted-devel] [PATCH] Add support for NVMe devices
Brian C. Lane
bcl at redhat.com
Tue Jun 14 16:47:27 UTC 2016
On Tue, Jun 14, 2016 at 01:17:00PM +0200, Petr Uzel wrote:
> Recognize NVMe Devices, so "parted -s /dev/nvme0n1" now prints
> "NVMe Device (nvme)" instead of "Model: Unknown (unknown)".
>
> In order for a device to be recognized as NVMe, it has to
> have a 'blkext' major number. But since this major can be
> used also by other device types, we also check the device
> path contains 'nvme' as a substring.
>
> * NEWS: Mention the change
> * include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_NVME
> * libparted/arch/linux.c(BLKEXT_MAJOR): New define.
> * libparted/arch/linux.c(_is_blkext_major): New function.
> * libparted/arch/linux.c(_device_probe_type): Recognize NVMe devices.
> * libparted/arch/linux.c(linux_new): Handle NVMe devices.
> * parted/parted.c(do_print): Add "nvme" to list of transports.
> ---
> NEWS | 2 ++
> include/parted/device.in.h | 3 ++-
> libparted/arch/linux.c | 14 ++++++++++++++
> parted/parted.c | 2 +-
> 4 files changed, 19 insertions(+), 2 deletions(-)
Looks good to me, thanks!
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the parted-devel
mailing list