2016-02-15 15:13:26 +00:00
|
|
|
{- portability shim for System.MountPoints
|
|
|
|
-
|
|
|
|
- Copyright 2016 Joey Hess <id@joeyh.name>
|
|
|
|
-
|
|
|
|
- License: BSD-2-clause
|
|
|
|
-}
|
|
|
|
|
|
|
|
{-# OPTIONS_GHC -fno-warn-tabs #-}
|
|
|
|
|
|
|
|
module Utility.Mounts (getMounts, Mntent(..)) where
|
|
|
|
|
|
|
|
import qualified System.MountPoints
|
|
|
|
import System.MountPoints (Mntent(..))
|
|
|
|
|
2018-04-25 21:42:27 +00:00
|
|
|
import Utility.Exception
|
|
|
|
|
2016-02-15 15:13:26 +00:00
|
|
|
getMounts :: IO [Mntent]
|
|
|
|
getMounts = System.MountPoints.getMounts
|
2018-09-05 15:22:27 +00:00
|
|
|
-- That will crash when the linux build is running on Android,
|
|
|
|
-- so fall back to this.
|
2018-04-25 21:42:27 +00:00
|
|
|
`catchNonAsync` const System.MountPoints.getProcMounts
|