aboutsummaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Mounts.hsc6
1 files changed, 4 insertions, 2 deletions
diff --git a/Utility/Mounts.hsc b/Utility/Mounts.hsc
index 4994c5e18..6b69e844a 100644
--- a/Utility/Mounts.hsc
+++ b/Utility/Mounts.hsc
@@ -57,11 +57,13 @@ getMounts = do
}
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;
+ - while getmntent only accesses a file in /etc (or /proc) that should not
+ - block. -}
foreign import ccall unsafe "libmounts.h mounts_start" c_mounts_start
:: IO (Ptr ())
-
foreign import ccall unsafe "libmounts.h mounts_next" c_mounts_next
:: Ptr () -> IO (Ptr ())
-
foreign import ccall unsafe "libmounts.h mounts_end" c_mounts_end
:: Ptr () -> IO CInt