diff options
author | 2012-07-19 21:25:26 -0400 | |
---|---|---|
committer | 2012-07-19 21:25:26 -0400 | |
commit | 0496a3971d4679e6a482a5eb277091980383f831 (patch) | |
tree | df526c22a4a8e6ff4578fbad8f0f2129684fc44e /Assistant | |
parent | 7298507cf2d92d47a5c3a5ad2ee149ce803b9d15 (diff) |
store whole Mntents
This way, if a mount point was already mounted, but something else
gets mounted there, it'll be seen as a new mount.
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/Threads/MountWatcher.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Assistant/Threads/MountWatcher.hs b/Assistant/Threads/MountWatcher.hs index cc62c294d..b55e3284b 100644 --- a/Assistant/Threads/MountWatcher.hs +++ b/Assistant/Threads/MountWatcher.hs @@ -74,15 +74,15 @@ handleMounts :: ThreadState -> DaemonStatusHandle -> MountPoints -> MountPoints handleMounts st handle wasmounted nowmounted = mapM_ (handleMount st handle) $ S.toList $ newMountPoints wasmounted nowmounted -handleMount :: ThreadState -> DaemonStatusHandle -> FilePath -> IO () -handleMount st handle mountpoint = do - putStrLn $ "mounted: " ++ mountpoint +handleMount :: ThreadState -> DaemonStatusHandle -> Mntent -> IO () +handleMount st handle mntent = do + putStrLn $ "mounted: " ++ mnt_dir mntent -type MountPoints = S.Set FilePath +type MountPoints = S.Set Mntent {- Reads mtab, getting the current set of mount points. -} currentMountPoints :: IO MountPoints -currentMountPoints = S.fromList . map mnt_dir <$> getMounts +currentMountPoints = S.fromList <$> getMounts {- Finds new mount points, given an old and a new set. -} newMountPoints :: MountPoints -> MountPoints -> MountPoints |