monky-2.2.1.0: A system state collecting library and application

Maintainerongy
Stabilityexperimental
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

Monky.Disk.Device

Description

This module allows to read generic information about a block device and its file system.

It only works if the file system is mounted when the handle is created since it needs to *find* the mount point to get information about the file system

Synopsis

Documentation

getBlockHandle :: String -> IO (Maybe (BlockHandle, Dev)) Source #

Get a fs handle for normal devices

This uses fsStat to get file system information.

fsStat takes the mount point of the file system, so we need to find the mount point.

In case of mapper devices, this is done by going through the chain of slaves.

getBlockHandleTag :: String -> String -> IO (Maybe (BlockHandle, Dev)) Source #

Same as getBlockHandle but allow to pass the tag for libblkid

devToMount :: Dev -> IO (Maybe String) Source #

Get "the" mountpoint of a device.

Returns a mointpoint of a device. If there are multiple mountpoints, this will return the first one found. First one is mostly determined by order in procmounts and should be the one that was mounted first (time since boot).