This is more robust implementation of mnt_get_mountpoint() that does
not ignore bind mountpoints (mount --bind /mnt /mnt) as it does not
depend on st_dev numbers.
Signed-off-by: Karel Zak <kzak@redhat.com>
* don't teach people C by header files, so use warn_unused_result
attribute only on places where we return allocated memory (to avoid
leaks in applications).
* merge multiple function attributes to the one list to make it
usable with gtk-doc
Signed-off-by: Karel Zak <kzak@redhat.com>
[kzak@redhat.com: - rename struct member and functions from
"propagation" to "optional fields"
- split the original patch
- fix parser]
Signed-off-by: Ondrej Oprala <ondrej.oprala@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
In some cases (for example if only one mount argument is given) may be
mount request ambivalent:
# mount /foo
and fstab:
/dev/sda5 /foo rw 0 0
/foo /bar bind 0 0
The libmount allows to swap between source and target (if
source is not LABEL or UUID) by default. The new function
mnt_context_disable_swapmatch()
allows to disable this feature.
Signed-off-by: Karel Zak <kzak@redhat.com>
This function was never implemented, but the proto has existed since the
inception of the library. As the libmnt_table struct doesn't include a
member necessary to carry the name of the table, simply discard this
prototype. If ever a need to break ABI comes up, perhaps this could be
revisited.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>