summaryrefslogtreecommitdiffstats
path: root/libmount/src/optmap.c
Commit message (Collapse)AuthorAgeFilesLines
* libmount: cleanup licenses sections in the filesKarel Zak2018-08-161-3/+8
| | | | | | | | | * add SPDX-License-Identifier (see https://spdx.org/licenses/) * add "This file part of libmount from util-linux project." * use proper text for LGPL-2.1-or-later * use the same texts everywhere Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: revert X-* and x-* meaningKarel Zak2016-12-091-9/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's hope this is last change necessary to cleanup x-* usage: x-* persistent option, stored in utab, available for umount, etc. X-* fstab comment only mount(8) supports x-mount.mkdir= as well as newly recommended X-mount.mkdir= Advantages: * less invasive * does not require exception for x-systemd * does not require rename x-initrd to X-initrd The systemd and dracut users will get the new (=fixed) functionality without a change in fstab configuration. This is the primary goal. Disadvantages: * not 100% compatible libmount behavior, x-* options have not been previously stored in utab. The API is the same, options will be still available, but on x-* libmount will write to /run/mount/utab. For now it seems only systemd uses x-*, and they like this behavior, so... Addresses: https://github.com/systemd/systemd/pull/4515 Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: use x-systemd options as X-*Karel Zak2016-12-081-0/+7
| | | | | | | | | | | | | | | | The previous patch introduces X-* options namespace for options that have to be maintained in user space. Unfortunately, systemd users already use mount options that are necessary by umount or another operations. The conclusion from discussion with systemd guys is to store all the systemd options in userspace. It seems better to add one line exception to libmount than force all fstab users to rename x-systemd to X-systemd. Addresses: https://github.com/systemd/systemd/pull/3904 Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: introduce X-* commentsKarel Zak2016-12-081-1/+3
| | | | | | | | | | | | | x-* are fstab only and not stored in userspace (utab). In some cases it's not optional solution because the option is also necessary for umount or another operations. The X-* is exactly the same as x-*, but stored to utab (or mtab on old systems). It's usually bad idea to store mount options in userspace, but it's better to provide any solution that force users to bypass mount(8) (and friends) and implement 3rd-party incompatible solutions. Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: Fix various typosSebastian Rasmussen2016-05-311-2/+2
| | | | | | | Fix various typos in error messages, warnings, debug strings, comments and names of static functions. Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
* libmount: add support for MS_LAZYTIMEKarel Zak2015-03-301-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/strutils: move *swith() functions to private librarySami Kerola2013-08-291-0/+1
| | | | | | | | Avoid code dublication in libmount and time-util. Proposed-by: Karel Zak <kzak@redhat.com> Reference: http://markmail.org/message/h7zexvqsieqngtmx Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libmount: fix typosOndrej Oprala2013-08-051-4/+4
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* libmount: allow to use propagation flags in fstabKarel Zak2013-01-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* mount: distinguish between MS_COMMENT flags (netdev, nofail, ...)Karel Zak2012-02-231-0/+4
| | | | | | | | | | Since util-linux 2.12h (year 2004) there is only one flag for all dummy options like _netdev or nofail. Unfortunately it means that when mount(8) composes the final mount options string for mtab (or for mount.<type> helpers) the string is generated incorrectly. Reported-by: Dave Reisner <d@falconindy.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: don't pass comments=/x-* to mount.<type> helpersKarel Zak2012-01-251-11/+9Star
| | | | | | | 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: add support for encrypted loopdevsKarel Zak2012-01-111-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove unnecessary includes, mask API as stableKarel Zak2011-07-251-6/+0Star
| | | | 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/+234
Signed-off-by: Karel Zak <kzak@redhat.com>