summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/DiskImage.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Property/DiskImage.hs')
-rw-r--r--src/Propellor/Property/DiskImage.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Propellor/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs
index 3c2b2200..8b74f478 100644
--- a/src/Propellor/Property/DiskImage.hs
+++ b/src/Propellor/Property/DiskImage.hs
@@ -130,14 +130,14 @@ imageBuiltFrom img chrootdir tabletype partspec final = mkimg <!> rmimg
kpartx img (partitionsPopulated chrootdir mnts)
rmimg = File.notPresent img
-partitionsPopulated :: FilePath -> [MountPoint] -> [FilePath] -> Property NoInfo
+partitionsPopulated :: FilePath -> [MountPoint] -> [LoopDev] -> Property NoInfo
partitionsPopulated chrootdir mnts devs = property desc $ mconcat $ zipWith go mnts devs
where
desc = "partitions populated from " ++ chrootdir
go Nothing _ = noChange
- go (Just mnt) dev = withTmpDir "mnt" $ \tmpdir -> bracket
- (liftIO $ mount "auto" dev tmpdir)
+ go (Just mnt) loopdev = withTmpDir "mnt" $ \tmpdir -> bracket
+ (liftIO $ mount "auto" (partitionLoopDev loopdev) tmpdir)
(const $ liftIO $ umountLazy tmpdir)
$ \mounted -> if mounted
then ensureProperty $