diff options
author | Joey Hess <joey@kitenet.net> | 2012-12-13 00:24:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-12-13 00:24:19 -0400 |
commit | 94554782894ec6c26da3b46312d5d1d16d596458 (patch) | |
tree | 78746106bfb153945ccbfd2bbae536081c005e91 /Utility/Mounts.hsc | |
parent | 55bd61d8c42aaf36a3c57f8444c493f6b045f4cd (diff) |
finished where indentation changes
Diffstat (limited to 'Utility/Mounts.hsc')
-rw-r--r-- | Utility/Mounts.hsc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Utility/Mounts.hsc b/Utility/Mounts.hsc index 0b1468521..c21a68032 100644 --- a/Utility/Mounts.hsc +++ b/Utility/Mounts.hsc @@ -41,21 +41,21 @@ getMounts = do _ <- c_mounts_end h return mntent - where - getmntent h c = do - ptr <- c_mounts_next h - if (ptr == nullPtr) - then return $ reverse c - else do - mnt_fsname_str <- #{peek struct mntent, mnt_fsname} ptr >>= peekCString - mnt_dir_str <- #{peek struct mntent, mnt_dir} ptr >>= peekCString - mnt_type_str <- #{peek struct mntent, mnt_type} ptr >>= peekCString - let ent = Mntent - { mnt_fsname = mnt_fsname_str - , mnt_dir = mnt_dir_str - , mnt_type = mnt_type_str - } - getmntent h (ent:c) + where + getmntent h c = do + ptr <- c_mounts_next h + if (ptr == nullPtr) + then return $ reverse c + else do + mnt_fsname_str <- #{peek struct mntent, mnt_fsname} ptr >>= peekCString + mnt_dir_str <- #{peek struct mntent, mnt_dir} ptr >>= peekCString + mnt_type_str <- #{peek struct mntent, mnt_type} ptr >>= peekCString + let ent = Mntent + { mnt_fsname = mnt_fsname_str + , mnt_dir = mnt_dir_str + , mnt_type = mnt_type_str + } + getmntent h (ent:c) {- Using unsafe imports because the C functions are belived to never block. - Note that getmntinfo is called with MNT_NOWAIT to avoid possibly blocking; |