mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-09-19 07:51:43 +00:00
Recognise NVME devices (#755022)
Add a pattern to recognise Non-Volatile Memory Express devices as valid devices to work with. Devices are named by the Linux kernel device driver like /dev/nvme0n1 [1] with partitions named like /dev/nvme0n1p1 [2]. [1] linux 3.3 drivers/block/nvme.c nvme_alloc_ns() https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/block/nvme.c?id=v3.3#n1351 [2] Contents of /proc/partitions for a partitioned NVME device $ grep nvme /proc/partitions 259 0 390711384 nvme0n1 259 1 977 nvme0n1p1 259 2 31250000 nvme0n1p2 259 3 328209496 nvme0n1p3 259 4 31249408 nvme0n1p4 Bug 755022 - gparted doesn't recognize nvme devices
This commit is contained in:
parent
b4fe2f608e
commit
66bb88abf7
|
@ -99,6 +99,14 @@ void Proc_Partitions_Info::load_proc_partitions_info_cache()
|
|||
//E.g., device = /dev/mmcblk0, partition = /dev/mmcblk0p1
|
||||
if ( device == "" )
|
||||
device = Utils::regexp_label(line, "^[\t ]+[0-9]+[\t ]+[0-9]+[\t ]+[0-9]+[\t ]+(mmcblk[0-9]+)$") ;
|
||||
|
||||
// Recognise /dev/nvme*n* devices
|
||||
// (Non-Volatile Memory Express devices. SSD type devices which
|
||||
// plug directly into PCIe sockets).
|
||||
// E.g., device = /dev/nvme0n1, partition = /dev/nvme0n1p1
|
||||
if ( device == "" )
|
||||
device = Utils::regexp_label(line, "^[\t ]+[0-9]+[\t ]+[0-9]+[\t ]+[0-9]+[\t ]+(nvme[0-9]+n[0-9]+)$");
|
||||
|
||||
//Device names that end with a #[^p]# are HP Smart Array Devices (disks)
|
||||
// E.g., device = /dev/cciss/c0d0, partition = /dev/cciss/c0d0p1
|
||||
// (linux-x.y.z/Documentation/blockdev/cciss.txt)
|
||||
|
|
Loading…
Reference in a new issue