Crate libmount [−] [src]
libmount
This library has two major goals:
- Add type-safe interface for mount() system call
- Add very good explanation of what's wrong when the call fails
So we have two error types:
- Holds mount info and errno
- Other that is returned by
.explain()
from the first.
Note: you need to explain as fast as possible, because during explain library makes some probes for different things in filesystem, and if anything changes it may give incorrect results.
You should always explain()
the errors, unless you are trying lots of
mounts for bruteforcing or other similar thing and you are concerned of
performance. Usually library does stat()
and similar things which are
much faster than mount anyway. Also explaining is zero-cost in the success
path.
Structs
BindMount |
A mount bind definition |
Error | |
OSError |