From 9d26b532abfd04bc97f9b922ddb7c14e545a0073 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 20 Jul 2012 15:03:58 -0400 Subject: 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. --- Utility/DiskFree.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Utility') 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) -- cgit v1.2.3