Project

General

Profile

Feature #170 » dyson-statvfs.patch

Igor Pashev, 2014-05-12 06:16 PM

View differences:

xmobar-0.20.1/src/StatFS.hsc 2014-05-12 20:45:53.600578106 +0400
toI :: CULong -> Integer
toI = toInteger
/* On illumos/solaris we need struct statvfs */
#ifdef __sun__
#define statfs statvfs
#endif
getFileSystemStats :: String -> IO (Maybe FileSystemStats)
getFileSystemStats path =
allocaBytes (#size struct statfs) $ \vfs ->
    (1-1/1)