summaryrefslogtreecommitdiffstats
path: root/libmount/src/libmount.h.in
Commit message (Collapse)AuthorAgeFilesLines
...
* libmount: umount crashes when trying to umount a non-mountpointKarel Zak2013-03-251-1/+1
| | | | | Reported-by: Mantas MikulÄ—nas <grawity@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: clean up header fileKarel Zak2013-03-151-185/+132Star
| | | | | | | | | | | * 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>
* libmount: export umount mountpoint look up codeKarel Zak2013-02-261-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add missing MNT_ERR_AMBIFSKarel Zak2013-02-141-0/+1
| | | | | | | Sorry, the last commit into libmount has been incomplete. Reported-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: allow to use propagation flags in fstabKarel Zak2013-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux kernel does not allow to change more than one propagation flag by one mount(2) syscall. The flags also cannot be mixed with another mount options. It means that the propagation flags cannot be stored in /etc/fstab, manual "mount --make-* <mountpoint>" is always necessary after successful mount. Painful... This patch implements additional mount(2) after previous successful mount(2) (or exec /sbin/mount.<type>). For example: mount /dev/sda1 /A -o private,unbindable,ro or fstab entry: /dev/sda1 /A auto ro,private,unbindable is implemented by three mount(2) calls: - 1st mounts /dev/sda1 with MS_RDONLY - 2nd sets MS_PRIVATE flag - 3rd sets MS_UNBINDABLE flag. It's the same as as to manually call: mount /dev/sda1 /A -o ro mount --make-private /A mount --make-unbindable /A This solution is not atomic, and umount(2) is not called if propagation flags are not successfully applied, only error is returned. This change does not affect libmount API, so one beautiful day when mount(2) syscall will be improved we can drop this nasty patch. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_fs_get_propagation()Karel Zak2013-01-101-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: read optional mountinfo fieldsOndrej Oprala2013-01-101-0/+3
| | | | | | | | | | [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>
* libmount: clean nonnull attribute usageKarel Zak2012-12-041-211/+104Star
| | | | | | | | | | - use __attribute__((nonnull) for functions where we not able to return an return code ("is", "has" and some "get" functions). - use __attribute__((nonnull) for small functions where we always modify any of the function argument (some mnt_optstr_* functions) Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add function attributes to public APIOndrej Oprala2012-11-301-243/+584
| | | | | | | | [kzak@redhat.com: - use __ul prefix in public API, - define minimal requirement gcc 3.4] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_optstr_deduplicate_option()Karel Zak2012-08-011-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: allow to disable swap between source and targetKarel Zak2012-07-171-0/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* libmount: rename mnt_context_fstab_applied to mnt_context_tab_appliedKarel Zak2012-07-121-1/+1
| | | | | | | The function is also usable in umount to detect is mtab has been applied. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: save task ID for mountinfo tilesKarel Zak2012-06-281-0/+1
| | | | | | Add new function mnt_fs_get_tid() to get task ID for the given filesystem. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add MNT_ERR_MOUNTOPTKarel Zak2012-05-281-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add MNT_ERR_LOOPDEVKarel Zak2012-05-281-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: expose mnt_get_mountpoint as external APIDave Reisner2012-04-261-0/+1
|
* libmount: add mnt_table_find_devno()Karel Zak2012-04-251-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add special MNT_ERR_ codesKarel Zak2012-04-241-0/+12
| | | | | | ... to detect some situations where standard -errno is too generic. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_context_get_options()Karel Zak2012-04-181-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_context_fstab_applied()Karel Zak2012-04-171-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add support to parse /proc/swapsKarel Zak2012-04-031-0/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: cleanup flags usageKarel Zak2012-03-071-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_fs_streq_target() and export all mnt_fs_streq_*Karel Zak2012-03-021-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: corrections to FSF license files, and postal addressSami Kerola2012-02-241-3/+3
| | | | | | | | | | | | | | The COPYING and Documentation/licenses/COPYING* files are being replaced by files from GNU web site. http://www.gnu.org/licenses/gpl-2.0.txt http://www.gnu.org/licenses/lgpl-2.1.txt Postal addresses to FSF in other files are updated to match with the address in license files. Reference: http://lists.gnu.org/archive/html/freefont-announce/2005-04/msg00001.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libmount: remove teaser proto for mnt_table_get_nameDave Reisner2012-02-221-1/+0Star
| | | | | | | | | | 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>
* libmount: don't pass comments=/x-* to mount.<type> helpersKarel Zak2012-01-251-0/+1
| | | | | | | This patch add a new flag MNT_NOHLPS for mount options map, options with this flag will not be passed to /sbin/mount.<type> helpers. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: support dirs for mnt_table_parse_fstab(), add mnt_table_parse_dir()Karel Zak2012-01-231-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: export info about library featuresKarel Zak2012-01-231-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add MNT_OMODE_NOTABKarel Zak2012-01-161-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add functions to export syscall/helpers statusKarel Zak2012-01-131-0/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add support for encrypted loopdevsKarel Zak2012-01-111-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: consolidate MNT_FS_* codeKarel Zak2012-01-021-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: don't use "new" in header fileKarel Zak2011-12-191-2/+2
| | | | | Reported-by: ben <benscott@nwlink.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add support for mount -a --forkKarel Zak2011-12-021-0/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_context_umount_next()Karel Zak2011-12-011-0/+3
| | | | | | This is "umount -a" backend. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove unnecessary includes, mask API as stableKarel Zak2011-07-251-4/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: clean up docsKarel Zak2011-07-251-1/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: allow to convert /dev/loopN to backing filenameKarel Zak2011-06-231-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add support for mount -aKarel Zak2011-06-231-1/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add generic function to read table for contextKarel Zak2011-06-221-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: allow to set parser callback to contextKarel Zak2011-06-211-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mount support for loopdevsKarel Zak2011-06-101-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: use top-level directory for libmount rather than shlibs/mountKarel Zak2011-06-091-0/+562
Signed-off-by: Karel Zak <kzak@redhat.com>