left unsafe imports here; added a comment with a rationalle

This commit is contained in:
Joey Hess 2012-07-20 15:07:48 -04:00
parent 9d26b532ab
commit f6d4786b86

View file

@ -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