fix: store PartitionName when on NVMe disk

Fixes #978

Signed-off-by: Seán C McCord <ulexus@gmail.com>
This commit is contained in:
Seán C McCord 2019-08-10 19:42:58 -04:00 committed by Andrew Rynhard
parent 620efe52ef
commit 6d22744eca

View File

@ -194,6 +194,7 @@ func (t *Target) Partition(bd *blockdevice.BlockDevice) (err error) {
// multiple places.
switch dev := t.Device; {
case strings.HasPrefix(dev, "/dev/nvme"):
fallthrough
case strings.HasPrefix(dev, "/dev/loop"):
t.PartitionName = t.Device + "p" + strconv.Itoa(int(part.No()))
default: