Get information about mounted filesystems on GNU/linux

cage b332f7507b Added link to new repository. 2 months ago
src 2024f5037a - used 'when-let' to make code cleaner. 3 years ago
COPYING 74a753aa7e - initial commit. 4 years ago
COPYING.LESSER 74a753aa7e - initial commit. 4 years ago
README.org b332f7507b Added link to new repository. 2 months ago
README.txt 998c04feea - fixed typo. 4 years ago
cl-mount-info.asd 7523406d96 - raise condition 'open-file-failed' when a file can not be opened. 3 years ago

README.org

moved to https://codeberg.org/cage/cl-mount-info/

Introduction

cl-mount-info is a (thin) wrapper around getmntent(3) and related C functions.

This library, on GNU/Linux allow to get information about the mounted filesystem on your computer. See getmntent(3) for details.

Install

Just clone the repo where can be reached by ASDF.

The wrapper

The file src/cffi.lisp Contains the low levels wrapper, whilst the file api.lisp allow the filesystem information query with a simpler interface.

The simple API

#+BEGIN_SRC common-lisp

(mountpoint->device "/") ; -> the device where "/" is mounted

(mountpoint->fstype "/") ; the filesystem of the device where "/" is mounted

(mountpoint->mnt-options "/") ; -> mount option as list

#+END_SRC

The above functions use an optional arguments to specify the file where mounted filesystem information are stored: default is /etc/mtab.

The low level API

See getmntent(3)

Issues

Note that the whole library is in an alpha stage, testing is still in progress, please see section below

This library works on GNU/Linux only.

BUGS

Please file bug report on the issue tracker

License

© 2020 cage, puercopop This library is released under Lisp Lesser General Public license (see COPYING.LESSER file)

Examples are released under GPL version 3 or later

NO WARRANTY

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.