Commit Graph

762 Commits

Author SHA1 Message Date
Karel Zak 3fcf5e1b79 docs: update copyright years
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-22 13:07:14 +01:00
Karel Zak ee3140752f libmount: cleanup docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-22 13:02:17 +01:00
Dave Reisner a33df88c45 libmount: remove teaser proto for mnt_table_get_name
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>
2012-02-22 11:52:44 +01:00
Karel Zak 178537eda9 libmount: use #ifdef fr selinux specific variables
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-03 12:35:36 +01:00
Karel Zak a9ddf316c8 libmount: don't ignore chmod/own errors
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-02 14:39:02 +01:00
Karel Zak 383e7a2720 libmount: remove dead assigment
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-02 14:27:48 +01:00
Karel Zak 2af0a8390d libmount: consolidate sysconf() usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31 14:31:09 +01:00
Karel Zak 0113a20e93 libmount: make iter reset more robust [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30 23:55:26 +01:00
Karel Zak 801401447b libmount: fix resource leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30 23:38:18 +01:00
Karel Zak 4f69189fe7 libmount: fix resource leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30 23:27:23 +01:00
Karel Zak ff7eba4d5e libmount: fix possible null dereferencing [coverity scan]
... let's keep Coverity analyzer happy.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30 23:22:53 +01:00
Karel Zak b47b7b3afb libmount: fix negative returns [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30 23:17:53 +01:00
Karel Zak 314f252226 libmount: fix checked-return [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30 23:17:47 +01:00
Karel Zak d89670b515 libmount: fix context test logic
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-26 15:01:01 +01:00
Karel Zak 9bf51834fd libmount: fix leak in tabdiff test
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-26 14:47:48 +01:00
Karel Zak 53d911347d libmount: fix leak in tab parsing error code
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-26 14:42:35 +01:00
Karel Zak 8dece03615 libmount: fix leak in tab_update.c test 2012-01-26 14:28:08 +01:00
Karel Zak 258ca2b241 libmount: fix buffer overflow and leaks in tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-26 14:17:28 +01:00
Karel Zak 5810d87097 libmount: don't pass comments=/x-* to mount.<type> helpers
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>
2012-01-25 17:14:24 +01:00
Karel Zak b82590ad46 blkid: move cache to /run on new systems
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>
2012-01-25 13:20:37 +01:00
Karel Zak 9354fea342 libmount: remove fstab.d support
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>
2012-01-24 11:16:53 +01:00
Karel Zak 52f8362841 libmount: support dirs for mnt_table_parse_fstab(), add mnt_table_parse_dir()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-23 20:20:36 +01:00
Masatake YAMATO b28890b041 libmount: fix a potential memory leak at mnt_table_parse_dir
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>
2012-01-23 13:54:03 +01:00
Masatake YAMATO 9deeef8e47 libmount: Use filter arg of scandir* to pickup /etc/fstab.d/*.fstab files
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>
2012-01-23 13:53:40 +01:00
Masatake YAMATO 485a8bfa98 libmount: scandirat based mnt_table_parse_dir implementation
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>
2012-01-23 13:52:51 +01:00
Karel Zak df51de6b37 libmount: export info about library features
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-23 12:27:01 +01:00
Karel Zak 0208ae2e0c libmount: fix bugs detected by [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 17:16:57 +01:00
Karel Zak b2ddfb59c1 libmount: fix compiler warnings [-Wuninitialized -Wformat]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:33:19 +01:00
Karel Zak 94283c9a77 libmount: fix compiler warnings [-Wsign-compare]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:31:45 +01:00
Karel Zak c1f3576e0a libmount: ignore "defaults" mount option
... thanks to regression test!

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:12:04 +01:00
Karel Zak 374fd21add libmount: add MNT_OMODE_NOTAB
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-16 14:35:10 +01:00
Karel Zak 98b1302ecf libmount: cleanup post-umount operations
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-16 13:15:01 +01:00
Karel Zak 07a67e6805 libmount: fix MS_BIND|MS_REC usage, improve some bitwise operations
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-16 12:29:27 +01:00
Karel Zak f9906424d4 libmount: add post-mount checks to detect ro/rw
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-16 12:09:36 +01:00
Karel Zak 8b470b20d7 libmount: avoid duplicate loopdevs
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-16 11:28:05 +01:00
Karel Zak dc4dbbf188 libmount: allow to toggle ro/rw and mount again
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-13 16:27:50 +01:00
Karel Zak be3df3838a libmount: allow to use UUID and LABEL for owner/group mount options in fstab
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-13 14:37:09 +01:00
Karel Zak 8ab6accf01 libmount: add functions to export syscall/helpers status
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-13 13:01:18 +01:00
Karel Zak c851223602 libmount: fix auto-loopdev
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-12 21:51:00 +01:00
Karel Zak a10d6ad6f4 libmount: support umount /path/file.img
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-12 21:30:58 +01:00
Karel Zak 1e8c936978 libmount: make options in fstab optional
.. to be compatible with old mount(8).

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-12 16:52:32 +01:00
Karel Zak ecdba5ddfc build-sys: add --enable-new-mount
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>
2012-01-11 17:05:08 +01:00
Karel Zak dbae36fe40 libmount: add --pass-fd to samples/mount
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-11 16:17:06 +01:00
Karel Zak 1a7a421ed7 libmount: add support for encrypted loopdevs
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-11 16:16:00 +01:00
s.p@orbitalfox.com b631e4d801 libmount: fixed a small typo 2012-01-04 11:37:49 +01:00
Dave Reisner b928ab01e0 libmount: fix typo in function name
Build broken in c70d9d7.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-02 16:56:12 +01:00
Karel Zak c70d9d768b libmount: consolidate MNT_FS_* code
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-02 15:00:27 +01:00
Dave Reisner ee83edede1 libmount: avoid resolving pseudofs source on update
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>
2012-01-02 14:27:09 +01:00
Karel Zak 16b8db49fe libmount; fix possible mem-leak
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-02 14:16:15 +01:00
Dave Reisner 14f66ad69a libmount: always trust the source of a pseudofs
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>
2012-01-02 13:59:35 +01:00
Karel Zak 937266598f libmount: don't use "new" in header file
Reported-by: ben <benscott@nwlink.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-19 22:51:38 +01:00
Karel Zak d2c97887fe libmount: add support for mount -a --fork
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-02 18:20:34 +01:00
Karel Zak ede8a60e05 libmount: add "+" prefix for options pattern (e.g findmnt -O)
Examples:

 * findmnt --fstab -O noauto
   Returns all entries where is not "auto" option (including entries
   with "noauto" option.

 * findmnt --fstab -O +noauto
   Returns all entries where is literally "noauto" option.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=758457
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-01 18:28:42 +01:00
Karel Zak 190c342a83 libmount: add -a to umount(8) sample
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-01 16:47:26 +01:00
Karel Zak 085f163b52 libmount: add mnt_context_umount_next()
This is "umount -a" backend.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-01 16:45:53 +01:00
Karel Zak b3f7a0ec3e libmount: improve verbose message
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-01 16:42:42 +01:00
Karel Zak db216e68fa libmount: add new exprimental umount(8)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-29 19:02:27 +01:00
Karel Zak 732a631126 include,optutils: add option_to_longopt()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-29 18:21:49 +01:00
Karel Zak e4c92d0617 libmount: use USAGE_* from mount(8) sample
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-29 18:06:21 +01:00
Karel Zak 6189ace369 libmount: add sanitize_env() to mount(8) sample
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-29 17:36:39 +01:00
Karel Zak 2492f71341 libmount: remove magic constatnt from mount(8)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-29 16:58:44 +01:00
Karel Zak b483debb64 libmount: fix compiler warning [-Wimplicit-function-declaration]
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-28 10:19:32 +01:00
Karel Zak 1208915521 lib,match: split match_fstype() from libmount
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-15 15:17:19 +01:00
Petr Uzel 26e42d8123 libmount: fix trivial typos in debugging output
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-11-09 10:23:59 +01:00
Karel Zak 6107377322 libmount: fix chdir to parent for restricted (user) umounts
Reported-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-08 21:47:23 +01:00
Petr Uzel b106d05238 libmount: ignore tailing slash in netfs source paths
Addresses: https://bugzilla.novell.com/show_bug.cgi?id=728480
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-08 16:25:01 +01:00
Karel Zak ff4c00f94a libmount: unable to umount nfs shares using the force option
Reported-by: Federico Simoncelli <fsimonce@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=745746
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-17 13:27:21 +02:00
Karel Zak 640fc1b819 build-sys: check scanf %ms modifier
Without the check libmount builds on systems that has older than 2.7
glibc are silently unsuccessful.  The missing %ms modifier will, at
least, result on such system missing output of findmnt and lsblk
commands.  If either %ms or %as modifiers are present the libmount
build is disabled.

Based on patch from: Sami Kerola <kerolasa@iki.fi>

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-10 14:42:40 +02:00
Karel Zak f0d3ff0a6f libmount: support -o loop=<devname>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-30 01:38:38 +02:00
Karel Zak 365e5a7c54 libmount: use loopdev debug facility
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-29 23:29:46 +02:00
Karel Zak b9fd334035 libmount: support {offset,sizelimit}= foor loopdevs
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-29 20:50:08 +02:00
Karel Zak fd1eb7a729 libmount: add function to parse offsets/sizes 2011-09-29 17:48:03 +02:00
Petr Uzel 960cf5737e misc: use %m in format string instead of %s and strerror(errno)
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-09-27 15:46:07 +02:00
Francesco Cosoleto a03fd94b57 libmount: fix use of logical '&&' with constant operand
Found by clang.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2011-09-27 15:04:23 +02:00
Karel Zak 96bc8588b2 libmount: previously assumed null pointer [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-12 16:01:42 +02:00
Karel Zak 8726371fb8 libmount: variable dereferenced before check [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-12 15:33:04 +02:00
Karel Zak ad84aaaa6c libmount: redundant null check on calling free() [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-12 15:32:35 +02:00
Karel Zak 88d7d36ff2 libmount: use unsigned int for bitfields [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-12 15:28:56 +02:00
Karel Zak da9629917d docs: use .LGPL extension for file with GNU Lesser License
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-31 11:12:17 +02:00
Karel Zak fa25f2289c Merge branch 'docs-dir' of https://github.com/kerolasa/lelux-utiliteetit
* 'docs-dir' of https://github.com/kerolasa/lelux-utiliteetit:
  docs: remove duplicated text
  docs: require kernel support before accepting use of it
  docs: note about independent super block structs
  docs: add libmount & libblkid debug instructions
  Documentation: add debugging doc
  arch: start using arch as a usage() example
  docs: new file Documentation/release-schedule.txt
  docs: move setuid information from reame to hwclock.8
  docs: clean up old readme files
  docs: copy contributors from legacy files to AUTHORS
  docs: new file Documentation/howto-man-page.txt
  docs: new file Documentation/source-code-management.txt
  docs: new file Documentation/howto-contribute.txt
  docs: new file Documentation/howto-compilation.txt
  docs: tell what the Documentation/ is about
  docs: add usage() howto for contributors
  docs: Documentation directory added
  docs: remove README.clear
2011-08-31 11:04:15 +02:00
Sami Kerola ce0efc40a1 docs: remove duplicated text
Duplicate text is dealt by referring to license files. The `pg'
command does not need separated license file because the source
file has same text at top of it.

http://www.spinics.net/lists/util-linux-ng/msg05069.html

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-08-30 19:50:34 +02:00
Karel Zak 581a4ad92a libmount: fix debug message
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-26 10:49:38 +02:00
Benno Schulenberg eaca47f7c6 libmount: cut up mount's help text into manageable chunks
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-16 10:16:35 +02:00
Davidlohr Bueso 19f411cbc6 grammar fixes
Correct grammar from "cannot found" to "cannot find".

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2011-08-15 14:28:21 +02:00
Sami Kerola f98d4f766e docs: Documentation directory added
Move readme, licence, change log, relese notes and other
supplementary files to a Documentation directory. This commit
does not change contents of any other but few Makefile.am files.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-08-12 20:19:52 +02:00
Davidlohr Bueso ad2d0d8587 lib: [loopdev.c] correct trivial typo
Should say "failed to find" instead of "failed to found".

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2011-08-08 13:53:59 +02:00
Davidlohr Bueso ff62fc46b4 libmount: fix undefined sources
The path resolving function breaks when handling undefined sources
("none") used by pseudo-filesystems. The assertion is causing the
samples/mount program to abort:

dave@offbook:~/projects/util-linux-good/libmount/samples$ ./mount
/dev/sda3 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
lt-mount: cache.c:464: mnt_resolve_path: Assertion `path' failed.
Aborted

/etc/mtab:

/dev/sda3 / ext4 rw,errors=remount-ro,commit=0 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
none /sys sysfs rw,noexec,nosuid,nodev 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
...

Instead of this assert on NULL we can simply return NULL and let mnt_pretty_path do the work.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2011-08-08 13:53:46 +02:00
Karel Zak 854fa6d99f libmount: update list of pseudo-filesystems
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-08 13:10:34 +02:00
Karel Zak 7fc6d2b8f8 libmount: fix compiler warnings [-Wunused-parameter -Wsign-compare]
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-02 11:21:16 +02:00
Karel Zak 58ca4ed1b4 build-sys: remove and ignore generated files
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-28 13:47:56 +02:00
Karel Zak 3fe1b06aba build-sys: fix gtk-doc distclean
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-27 14:22:36 +02:00
Karel Zak de60d08e93 libmount: remove 'seclabel' on remount, improve for 2.6.39
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-25 15:54:16 +02:00
Karel Zak 9267c0991d libmount: improve apply_fstab debugging
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-25 15:36:44 +02:00
Karel Zak 799b96d957 libmount: add MOUNT_2.20 version to the API
The API is officially stable since 2.20.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-25 12:23:58 +02:00
Karel Zak 486d397297 libmount: remove unnecessary includes, mask API as stable
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-25 11:57:28 +02:00
Karel Zak e6ecd606ae libmount: clean up docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-25 10:42:08 +02:00
Karel Zak 63de90d44f libmount: cleanup docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-23 01:27:39 +02:00
Karel Zak b5962110d2 libmount: fix mtab update for "none" source
tab_parse.c:mnt_parse_mountinfo_line parses "none" in src as NULL,

tab_update.c:fprintf_mtab_fs sets m1 to NULL instead of "none" and
returns -ENOMEM
tab_update.c:update_table says "write entry failed: Success", as errno
hasn't been set, and gotos to leave, leaving mtab not updated.

Addresses-debian-bug: 634871
Reported-by: Tomas Janousek <tomi@nomi.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-20 21:24:20 +02:00
Karel Zak 5af0769de6 libmount: cleanup code for "none" source and fstype, fix mem leak
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-20 21:15:43 +02:00
Karel Zak 5dfc984392 libmount: minor fixes
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-27 13:31:48 +02:00
Karel Zak 2576b4e782 libmount: allow to convert /dev/loopN to backing filename
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-23 16:06:27 +02:00
Karel Zak 117545721a libmount: cleanup return codes in mount sample
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-23 15:19:37 +02:00
Karel Zak 9f7472b0b8 libmount: add support for mount -a
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-23 15:07:55 +02:00
Karel Zak 679f59dde2 libmount: fix fstype caching
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-23 12:29:00 +02:00
Karel Zak 171b0fb491 libmount: rename in cache.c
* don't use mnt_ prefix for static functions

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-23 12:24:02 +02:00
Karel Zak 8eef6df790 libmount: clean up cache.c
* rename fields in the cache entry to be more readable...

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-23 12:19:30 +02:00
Karel Zak e5c5abaee3 libmount: add generic function to read table for context
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-22 13:34:47 +02:00
Karel Zak d84508cfbd libmount: allow to set parser callback to context
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-21 14:58:37 +02:00
Karel Zak 0164c24595 mountpoint: add new command
This is libmount based re-implementation of the mountpoint(1) command.
The original implementation is maintained in sysvinit suite.

The mountpoint(1) in util-linux is not enabled by default (for now) --
use --enable-mountpoint to enable the util.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-21 11:46:36 +02:00
Karel Zak 7f8b2bf3be libmount: add mount support for loopdevs
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-10 15:39:56 +02:00
Karel Zak a9ae3955fe libmount: minor changes in sample program
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-09 22:43:51 +02:00
Karel Zak 2aefc0a8f2 build-sys: use top-level directory for libmount rather than shlibs/mount
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-09 21:59:52 +02:00