![]() lsblk reports FSTYPE of devices with partition tables as empty string "", which is indistinguishable from empty devices. We must look for dependent devices (i.e. partitions) to see that the device is really empty and report error otherwise. I checked that LVM, LUKS and MD RAID have their own FSTYPE in lsblk output, so it should be only a partition table that has empty FSTYPE. The main point of this patch is to run lsblk without "-n", i.e. print all dependent devices and check if they're there. |
||
---|---|---|
.. | ||
BUILD | ||
doc.go | ||
fake.go | ||
mount_linux_test.go | ||
mount_linux.go | ||
mount_unsupported.go | ||
mount.go | ||
nsenter_mount_unsupported.go | ||
nsenter_mount.go | ||
OWNERS | ||
safe_format_and_mount_test.go |