From 4bf95542a83ca1acaf627da547fa85c57583e4c2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 24 Mar 2017 09:31:16 -0400 Subject: Property.Partition: Improve loop device detection code used with kpartx when building disk images. /dev/mapper/loop* symlinks are now detected as block devices. --- src/Propellor/Property/Partition.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Partition.hs b/src/Propellor/Property/Partition.hs index 2bf5b927..756e2b6b 100644 --- a/src/Propellor/Property/Partition.hs +++ b/src/Propellor/Property/Partition.hs @@ -58,7 +58,7 @@ isLoopDev l = isLoopDev' (partitionLoopDev l) <&&> isLoopDev' (wholeDiskLoopDev isLoopDev' :: FilePath -> IO Bool isLoopDev' f | "loop" `isInfixOf` f = catchBoolIO $ - isBlockDevice <$> getFileStatus f + isBlockDevice <$> getSymbolicLinkStatus f | otherwise = return False -- | Uses the kpartx utility to create device maps for partitions contained -- cgit v1.2.3