summaryrefslogtreecommitdiff
path: root/Utility/DiskFree.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-20 15:03:58 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-20 15:03:58 -0400
commit9d26b532abfd04bc97f9b922ddb7c14e545a0073 (patch)
tree710304c212e17908ef07b7e0a0ec22564aeef472 /Utility/DiskFree.hs
parentda4c506d61115236f3e43dd0bd17f30cd54df950 (diff)
use safe FFI imports for diskfree
There's a minor performance overhead to doing this, but this way I don't have to worry about a situation where statfs might block for a long time. For example, when it's on a network filesystem.
Diffstat (limited to 'Utility/DiskFree.hs')
-rw-r--r--Utility/DiskFree.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Utility/DiskFree.hs b/Utility/DiskFree.hs
index ff7070562..18c7f2ee6 100644
--- a/Utility/DiskFree.hs
+++ b/Utility/DiskFree.hs
@@ -15,7 +15,7 @@ import Foreign.C.Types
import Foreign.C.String
import Foreign.C.Error
-foreign import ccall unsafe "libdiskfree.h diskfree" c_diskfree
+foreign import ccall safe "libdiskfree.h diskfree" c_diskfree
:: CString -> IO CULLong
getDiskFree :: FilePath -> IO (Maybe Integer)