--- proc_partitions.c.orig 2015-09-09 13:42:18.405459404 -0700 +++ proc_partitions.c 2015-09-09 13:48:13.982442827 -0700 @@ -74,6 +74,20 @@ return (strchr(dname + 6, 'p') == NULL); } +static int +_pm_isnvmedrive(char *dname) +{ + if (strncmp(dname, "nvme", 4) != 0) + return 0; + /* + * Are we a disk or a partition of the disk? If there is a "p" + * assume it is a partition - e.g. nvme0n1p1. + */ + return (strchr(dname + 4, 'p') == NULL); +} + + + /* * return true if arg is a device-mapper device */ @@ -120,6 +134,7 @@ !_pm_isloop(dname) && !_pm_isramdisk(dname) && !_pm_ismmcdisk(dname) && + !_pm_isnvmedrive(dname) && !_pm_isdm(dname); } }