summaryrefslogtreecommitdiffstats
path: root/libmount
Commit message (Collapse)AuthorAgeFilesLines
* docs: update copyright yearsKarel Zak2012-02-221-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: cleanup docsKarel Zak2012-02-228-32/+55
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove teaser proto for mnt_table_get_nameDave Reisner2012-02-223-3/+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: use #ifdef fr selinux specific variablesKarel Zak2012-02-031-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: don't ignore chmod/own errorsKarel Zak2012-02-021-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove dead assigmentKarel Zak2012-02-022-2/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: consolidate sysconf() usageKarel Zak2012-01-311-16/+13Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: make iter reset more robust [coverity scan]Karel Zak2012-01-301-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix resource leak [coverity scan]Karel Zak2012-01-301-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix resource leak [coverity scan]Karel Zak2012-01-301-3/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix possible null dereferencing [coverity scan]Karel Zak2012-01-301-1/+3
| | | | | | ... let's keep Coverity analyzer happy. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix negative returns [coverity scan]Karel Zak2012-01-301-6/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix checked-return [coverity scan]Karel Zak2012-01-301-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix context test logicKarel Zak2012-01-261-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix leak in tabdiff testKarel Zak2012-01-261-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix leak in tab parsing error codeKarel Zak2012-01-261-3/+19
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix leak in tab_update.c testKarel Zak2012-01-261-0/+1
|
* libmount: fix buffer overflow and leaks in testsKarel Zak2012-01-261-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: don't pass comments=/x-* to mount.<type> helpersKarel Zak2012-01-253-15/+38
| | | | | | | 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>
* blkid: move cache to /run on new systemsKarel Zak2012-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | Why? * read-only root * /etc is pretty bad place for caches * all is usually cached by udev in /dev/disk/by-* and libblkid is able to use these symlinks * boot persistent cache is attractive for very small subset of Linux machines (and they already need extra udev tunning otherwise udev will probe all block devices during boot) * the default is possible to override in /etc/blkid.conf The systems without /run directory will not be affected by this change. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove fstab.d supportKarel Zak2012-01-242-5/+1Star
| | | | | | | | If you really need to store your configuration to a alternative files then you have to explicitly specify the files or directories on mount(8) command line by --fstab option. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: support dirs for mnt_table_parse_fstab(), add mnt_table_parse_dir()Karel Zak2012-01-233-26/+40
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix a potential memory leak at mnt_table_parse_dirMasatake YAMATO2012-01-231-4/+7
| | | | | | | | mnt_table_parse_dir in libmount/src/tab_parse.c calls scandir, and then opendir. When the latter one, opendir is failed, buffers allocated in scandir are not released. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* libmount: Use filter arg of scandir* to pickup /etc/fstab.d/*.fstab filesMasatake YAMATO2012-01-231-36/+27Star
| | | | | | | | | | | | | | | | | | | This patch is based on my last patch: [PATCH 1/2] scandirat based mnt_table_parse_dir implementation scandir* used in `mnt_table_parse_dir in libmount/src/tab_parse.c can take filter function as an argument. `mnt_table_parse_dir' picks up fstab files from namelist returned from scandir* for itself. However, some parts of picking-up job can be done in the filter function. This patch introduces a new function `mnt_table_parse_dir_filter' to share the code for picking-up job between two implementations of `mnt_table_parse_dir_filter', scandir based and scandirat based. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* libmount: scandirat based mnt_table_parse_dir implementationMasatake YAMATO2012-01-231-2/+63
| | | | | | | | | | | | In comment of `mnt_table_parse_dir' of libmount/src/tab_parse.c: /* TODO: it would be nice to have a scandir() implementation that * is able to use already opened directory */ Nowadays glibc provides `scandirat'. This patch implements `scandirat' based `mnt_table_parse_dir'. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* libmount: export info about library featuresKarel Zak2012-01-233-1/+43
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix bugs detected by [smatch scan]Karel Zak2012-01-172-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix compiler warnings [-Wuninitialized -Wformat]Karel Zak2012-01-172-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix compiler warnings [-Wsign-compare]Karel Zak2012-01-171-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: ignore "defaults" mount optionKarel Zak2012-01-171-1/+3
| | | | | | ... thanks to regression test! Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add MNT_OMODE_NOTABKarel Zak2012-01-162-9/+40
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: cleanup post-umount operationsKarel Zak2012-01-161-32/+30Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix MS_BIND|MS_REC usage, improve some bitwise operationsKarel Zak2012-01-162-5/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add post-mount checks to detect ro/rwKarel Zak2012-01-164-8/+72
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: avoid duplicate loopdevsKarel Zak2012-01-161-0/+67
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: allow to toggle ro/rw and mount againKarel Zak2012-01-134-2/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: allow to use UUID and LABEL for owner/group mount options in fstabKarel Zak2012-01-132-6/+26
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add functions to export syscall/helpers statusKarel Zak2012-01-134-10/+110
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix auto-loopdevKarel Zak2012-01-121-7/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: support umount /path/file.imgKarel Zak2012-01-122-14/+43
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: make options in fstab optionalKarel Zak2012-01-121-8/+15
| | | | | | .. to be compatible with old mount(8). Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add --enable-new-mountKarel Zak2012-01-115-846/+1Star
| | | | | | | | | | | | | | | | | Now we have three versions of the mount(8) utility * old mount(8) --enable-mount [default] * old mount(8) linked with libmount This is this is necessary for systems without mtab file. --enable-libmount-mount - new mount(8) This is completely new pure-libmount based mount(8). --enable-new-mount Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add --pass-fd to samples/mountKarel Zak2012-01-112-5/+45
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add support for encrypted loopdevsKarel Zak2012-01-116-2/+54
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fixed a small typos.p@orbitalfox.com2012-01-041-1/+1
|
* libmount: fix typo in function nameDave Reisner2012-01-021-1/+1
| | | | | | Build broken in c70d9d7. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* libmount: consolidate MNT_FS_* codeKarel Zak2012-01-029-29/+57
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: avoid resolving pseudofs source on updateDave Reisner2012-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | Similar to the previous commit, when mounting a pseudofs, trust the source of the fs, as it cannot be matched to backing device on the filesystem. Similar situation, but slightly different bug: # mkdir /foo /root/foo # echo 'foo /foo tmpfs defaults 0 0' >> /etc/fstab # cd /root # mount -a # mount | grep /foo /root/foo on /foo type tmpfs (rw,relatime) This fixes the pure libmount based mount utility, but the legacy mount tool will still fail to handle this properly. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount; fix possible mem-leakKarel Zak2012-01-022-9/+20
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: always trust the source of a pseudofsDave Reisner2012-01-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Since nodev FSs have no backing block device, it's unreasonable to try and resolve the source back to a path on the filesystem. Always trust the source of the FS given in /etc/fstab to avoid remounting the device when a directory of the same name exists in the current working directory. Example reproduction: # mkdir /foo # echo 'foo /foo tmpfs defaults 0 0' >> /etc/fstab # mount -a # cd /root; mkdir foo # mount -a # mount | grep /foo foo on /foo type tmpfs (rw,relatime) /root/foo on /foo type tmpfs (rw,relatime) [kzak@redhat.com: - use fs->flags to detect pseudo FS] Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Karel Zak <kzak@redhat.com>