Support NVME device naming.
This commit is contained in:
parent
4271cfda1f
commit
5a6bc95859
@ -73,7 +73,7 @@ def disk_name_for_partition(partition):
|
||||
"""
|
||||
name = os.path.basename(partition["device"])
|
||||
|
||||
if name.startswith("/dev/mmcblk"):
|
||||
if name.startswith("/dev/mmcblk") or name.startswith("/dev/nvme"):
|
||||
return re.sub("p[0-9]+$", "", name)
|
||||
|
||||
return re.sub("[0-9]+$", "", name)
|
||||
|
Loading…
Reference in New Issue
Block a user