Feature #170 » dyson-statvfs.patch
| xmobar-0.20.1/src/StatFS.hsc 2014-05-12 20:45:53.600578106 +0400 | ||
|---|---|---|
| 61 | 61 |
toI :: CULong -> Integer |
| 62 | 62 |
toI = toInteger |
| 63 | 63 | |
| 64 | ||
| 65 |
/* On illumos/solaris we need struct statvfs */ |
|
| 66 |
#ifdef __sun__ |
|
| 67 |
#define statfs statvfs |
|
| 68 |
#endif |
|
| 69 | ||
| 64 | 70 |
getFileSystemStats :: String -> IO (Maybe FileSystemStats) |
| 65 | 71 |
getFileSystemStats path = |
| 66 | 72 |
allocaBytes (#size struct statfs) $ \vfs -> |