Commit Graph

10102 Commits

Author SHA1 Message Date
Ruediger Meier 7231fb2a5b misc: fix some printf format strings
Fix the warnings below for OSX clang and add a few more
casts for timeval:

lib/at.c:131:27: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'off_t' (aka 'long long') [-Wformat]

                        printf("%16jd bytes ", st.st_size);

                                ~~~~~          ^~~~~~~~~~

lib/strutils.c:522:52: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]

                snprintf(buf, sizeof(buf), "%d%s%jd%s", dec, dp, frac, suffix);

                                                ~~~              ^~~~

lib/sysfs.c:468:42: warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]

        len = snprintf(buf, sizeof(buf), "%ju", num);

                                          ~~~   ^~~

libuuid/src/gen_uuid.c:316:34: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t' (aka 'int') [-Wformat]

                              clock_seq, last.tv_sec, last.tv_usec, adjustment);

                                                      ^~~~~~~~~~~~

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-11 13:39:56 +01:00
Ruediger Meier 948d1f3114 include: add missing includes
lib/pager.c: signal.h ... raise(3p)
lib/sysfs.c: libgen.h ... basename(3p)
lib/exec_shell.c: libgen.h ... basename(3p)

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-11 12:31:04 +01:00
Ruediger Meier 8fe76cd171 ipcs: ulong -> unsigned long
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-11 12:31:03 +01:00
Ruediger Meier 930a566207 libcommon: don't include sysinfo.h
It was added in 929f939e but should have been removed again
in 08ca3e26.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-11 12:31:03 +01:00
Karel Zak 79c101427f colcrt: minor cosmetic changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-11 12:21:22 +01:00
Karel Zak eac478dcfd swapon: drop perms if setuid before call mkswap
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-11 12:07:34 +01:00
Karel Zak 8292273fde Merge branch 'colcrt' of git://github.com/kerolasa/lelux-utiliteetit
* 'colcrt' of git://github.com/kerolasa/lelux-utiliteetit:
  tests: update colcrt test expectations
  colcrt: reimplementation
  tests: add colcrt functional tests
2016-02-11 11:59:58 +01:00
Karel Zak a125123f8b swapon: simplify ctl->device usage
* use and initialize ctl->{label,uuid,device} by do_swapon() only
* remove ctl->canonic, function arguments are good enough for this

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-11 11:39:16 +01:00
Sami Kerola 8843aa41a7 swapon: do not run execvp() calls when swapon is setuid binary
swapon(8) is not expected to be setuid binary, but if it is try to avoid
obvious security vulnerability of executing user preferred mkswap file as
someone else, such as root.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-02-11 10:52:18 +01:00
Sami Kerola 2dd3ba2c85 swapon: move function arguments to control structure
This makes reading what the code does easier.  This change also makes error
messages to prefer none-canonical device path, e.g., the one user supplied
rather than the canonical path needed internally.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-02-11 10:52:18 +01:00
Sami Kerola 9eeba70eed swapon: add control struct
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-02-11 10:52:18 +01:00
Karel Zak a7f160f9e1 build-sys: remove AM_CONDITIONAL from UL_CHECK_SYSCALL
Unused, unnecessary, wrong.

Reported-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-10 16:59:41 +01:00
Karel Zak 20759a42ec libsmartcols: rewrite ./sample-scols-wrap
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-10 15:37:30 +01:00
Karel Zak d94c519877 libsmartcols: support multi-line cells
The initial implementation has been introduced by SCOLS_FL_WRAP columns,
but this patch clean ups all and makes things more elegant.

Note that use SCOLS_FL_TREE | SCOLS_FL_WRAP for a column is bad idea
and I don't think we need to fix it.

References: https://github.com/karelzak/util-linux/issues/269
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-10 15:34:21 +01:00
Karel Zak e865838d6d libsmartcols: use libscols_cell for title
References: https://github.com/karelzak/util-linux/issues/270
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-09 11:21:21 +01:00
Karel Zak f4a1d26609 libfdisk: add missing break
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-09 10:04:36 +01:00
Karel Zak c78f4d0a4a Merge branch 'pylibmount_dependency' of https://github.com/filbranden/util-linux 2016-02-09 09:57:48 +01:00
Karel Zak 300e24a8ea sfdisk: add ESP shortcut also for Legacy MBR
References: https://github.com/karelzak/util-linux/issues/267
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-08 16:37:03 +01:00
Filipe Brandenburger 324330aca6 build-sys: Properly order install dependencies of pylibmount
Introduce a dependency so that libmount.so is installed before
pylibmount.so, so that when libtool tries to relink it, it can find
libmount.so in the destdir.

We introduce this additional make rule through an AC_SUBST variable, to
prevent automake from trying to interpret that.  This trick has been
suggested in http://stackoverflow.com/a/8643550.

This fixes a failure of `make install DESTDIR=...` when trying to relink
pylibmount against libmount.la.  libtool will look for libmount.so under
${DESTDIR}/${libdir} in that case, but if it is not yet present there,
libtool assumes it is a system installed library and use -lmount
instead, which causes the following failure if libmount is not installed
on the base system yet:

  libtool: install: warning: relinking `pylibmount.la'
  libtool: install: (... libtool --mode=relink gcc -o pylibmount.la \
        -rpath /usr/lib/python2.7/dist-packages/libmount \
        libmount/python/*.lo libmount.la ... -lpython2.7 \
        -inst-prefix-dir /path/to/destdir)
  /usr/bin/ld: cannot find -lmount
  collect2: error: ld returned 1 exit status
  libtool: install: error: relink `pylibmount.la' ...
  make[3]: *** [install-pylibmountexecLTLIBRARIES] Error 1

This seems to be a previously encountered issue, since automake includes
a hack to insert such a dependency rule to install all libLTLIBRARIES
before attempting to install binPROGRAMS, initially introduced in the
commit below:
http://git.savannah.gnu.org/cgit/automake.git/commit/?id=bd4a1d5ad1a72fa780a8b7fd6c365a5dad2e6220

Also related bug from Ubuntu tracker:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1442076

Tested that `make install` starts working again after this commit, even
when libmount-dev is not installed on the system.  Also confirmed that
`make distcheck` is now functional.

Confirmed that the all the files expected in the Python directory (both
__init__.py and pylibmount.so) are present after an install.

Tested that parallel install works, the dependency is always respected
since it's explicit.

Inspected the generated Makefile and confirmed that the definition of
install-pylibmountexecLTLIBRARIES (generated by automake) and the
explicit dependency we introduced are both present.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2016-02-05 11:03:09 -08:00
Filipe Brandenburger d54eb46646 Revert "build-sys: Order pylibmount after usrlib on install"
This reverts commit e61f406913.
2016-02-05 10:08:50 -08:00
Karel Zak b1d31d03de Merge branch 'master' of https://github.com/rudimeier/util-linux
* 'master' of https://github.com/rudimeier/util-linux:
  script: fix misspelling
  docs: fix typos found by codespell
2016-02-04 16:02:17 +01:00
Ruediger Meier 23e35eca15 script: fix misspelling 2016-02-03 16:34:12 +01:00
Ruediger Meier 3fd1f7711e docs: fix typos found by codespell
Using "codespell" from https://github.com/lucasdemarchi/codespell

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-03 15:10:08 +01:00
Karel Zak 4afb337e00 fdisk: make 'f' command more verbose
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-03 13:40:25 +01:00
Sami Kerola c1ca4fc108
tests: update colcrt test expectations
The reimplementation caused output to change in some corner cases, such as
how binary inputs, long lines with underscores, and white space trimming,
are handled.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-02-02 17:27:28 +00:00
Sami Kerola ea4ccc9ea1
colcrt: reimplementation
This implementation aims to be easier to read, more robust dealing all sorts
of unexpected inputs, and possibly even more correct.  The correctness
refers to last line handling this implementation does differently than the
previous.  With the previous last line that ended to EOF without \n was not
printed.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-02-02 17:27:28 +00:00
Sami Kerola 5abd5d8aec
tests: add colcrt functional tests
Output formats are based on colcrt before recent asan fixes and magic
constant replace, that are the commits ee24ab6f1..70e3fcf29.  It seems the
fixes caused unintentional, and not detected change to output format - which
to me means colcrt has a regression that got to be part of release v2.27.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-02-02 17:27:28 +00:00
Karel Zak c809b20aa4 sfdisk: make --quiet really quiet
References: https://github.com/karelzak/util-linux/issues/268
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-01 14:30:31 +01:00
Karel Zak d09c06baf4 sfdisk: add 'U' shortcut for ESP
echo -e ',512M,U\n,,L' | sfdisk --label gpt /dev/foo

to make ESP system partition.

References: https://github.com/karelzak/util-linux/issues/267
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-01 14:08:04 +01:00
Karel Zak ea7f53cdc5 hwclock: remove extra space from --show output
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-01 13:43:22 +01:00
Karel Zak 6fc24cc211 Merge branch 'master' of https://github.com/annajonna/util-linux 2016-02-01 13:39:48 +01:00
Karel Zak 9aa3173bab libmount: move btrfs subvol code refactoring
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-01 13:10:33 +01:00
Karel Zak 7dca35b2be libmount: fix target resolving for btrfs stuff
and make the code more verbose.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-01 12:36:07 +01:00
Stanislav Brabec c6f9f229c5 libmount: code re-indentation
For easier review, the fix of libmount comes in two patches:
PATCH 1/2: libmount: run btrfs subvol checks for "subvolid" option
PATCH 2/2: code re-indentation

No code change is present in this patch.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
2016-02-01 12:23:18 +01:00
Stanislav Brabec 618a88140e libmount: run btrfs subvol checks for "subvolid" option
It is possible to identify btrfs subvolume with "subvolid" instead of "subvol".
In such case, btrfs specific check mistakenly assumes that the default subvolume
is going to be mounted, even if subvolid specifies id of non-default subvolume.

Implement a code for "subvolid" option.

For easier review, this fix comes in two patches:
PATCH 1/2: libmount: run btrfs subvol checks for "subvolid" option
PATCH 2/2: code re-indentation

How to reproduce:
	truncate -s1G btrfs_test.img
	mkdir -p btrfs_mnt
	/sbin/mkfs.btrfs -f -d single -m single ./btrfs_test.img
	mount -o loop btrfs_test.img btrfs_mnt
	pushd .
	cd btrfs_mnt
	mkdir -p d0/dd0/ddd0
	cd d0/dd0/ddd0
	touch file{1..5}
	btrfs subvol create s1
	cd s1
	touch file{1..5}
	mkdir -p d1/dd1/ddd1
	cd d1/dd1/ddd1
	btrfs subvol create s2
	rid=$(btrfs inspect rootid s2)
	echo new default $rid
	btrfs subvol get-default .
	btrfs subvol set-default $rid .
	popd
	DEFAULT_SUBVOLID=`btrfs subvolume get-default btrfs_mnt | while read dummy id rest ; do echo $id ; done`
	NON_DEFAULT_SUBVOLID=`btrfs subvolume list btrfs_mnt | while read dummy id rest ; do if test $id = $DEFAULT_SUBVOLID ; then continue ; fi ; echo $id ; done`
	umount btrfs_mnt
	losetup /dev/loop0 $PWD/btrfs_test.img
	echo "/dev/loop0 $PWD/btrfs_mnt btrfs subvolid=$NON_DEFAULT_SUBVOLID 0 0" >>/etc/fstab
	./mount -a
	./mount -a
	umount btrfs_mnt
	sed -i "/\/dev\/loop0/d" /etc/fstab
	losetup -d /dev/loop0
	rm btrfs_test.img
	rmdir btrfs_mnt

Current behavior of second "mount -a":
    mount: /dev/loop0 is already mounted or /root/btrfs_mnt busy
           /dev/loop0 is already mounted on /root/btrfs_mnt

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
2016-02-01 12:23:18 +01:00
Stanislav Brabec d2f8267847 libmount: run btrfs subvol checks for "auto" fs type
It is possible to mount btrfs using "auto" keyword in fstab. In such
case, btrfs specific checks are skipped. Run them for "auto" as well.

Looking at the code, it is a safe approach. In case of btrfs, it will do
what is needed, in case of no btrfs, btrfs_get_default_subvol_id() will
fail, and the rest of the code is skipped.

How to reproduce:
See reproducer in 2cd28fc and replace fstab line by
	echo "/dev/loop0 $PWD/btrfs_mnt btrfs auto 0 0" >>/etc/fstab

Current behavior of second "mount -a":
	mount: /dev/loop0 is already mounted or /root/btrfs_mnt busy
	       /dev/loop0 is already mounted on /root/btrfs_mnt

Testcases for btrfs and ext4:
	truncate -s1G btrfs_test.img
	truncate -s1G ext4_test.img
	mkdir -p btrfs_mnt
	mkdir -p ext4_mnt
	/sbin/mkfs.btrfs -f -d single -m single ./btrfs_test.img
	/sbin/mkfs.ext4 ./ext4_test.img
	losetup /dev/loop0 $PWD/btrfs_test.img
	losetup /dev/loop1 $PWD/ext4_test.img
	echo "/dev/loop0 $PWD/btrfs_mnt auto defaults 0 0" >>/etc/fstab
	echo "/dev/loop1 $PWD/ext4_mnt auto defaults 0 0" >>/etc/fstab
	./mount -a
	./mount -a
	umount btrfs_mnt
	umount ext4_mnt
	sed -i "/\/dev\/loop[01]/d" /etc/fstab
	losetup -d /dev/loop0
	losetup -d /dev/loop1
	rm btrfs_test.img
	rm ext4_test.img
	rmdir btrfs_mnt
	rmdir ext4_mnt

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
2016-02-01 11:59:31 +01:00
Karel Zak 314c3358d5 libmount: add 'force-mountinfo' to features list, improve debug
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-01 11:01:44 +01:00
Anna Jonna Ármannsdóttir dadaad0187 Change of output format and documentation. 2016-01-28 19:03:20 +00:00
Karel Zak 4c01c98ca2 Merge branch 'fix_pylibmount_install' of https://github.com/filbranden/util-linux
* 'fix_pylibmount_install' of https://github.com/filbranden/util-linux:
  build-sys: Order pylibmount after usrlib on install
2016-01-27 13:00:13 +01:00
Karel Zak 71a77ca1dd Merge branch 'fix-static-configuration-and-building' of https://github.com/ladatrimasova/util-linux
* 'fix-static-configuration-and-building' of https://github.com/ladatrimasova/util-linux:
  buildsys: fix static configuration and building
2016-01-27 12:52:02 +01:00
Filipe Brandenburger e61f406913 build-sys: Order pylibmount after usrlib on install
This fixes a failure of `make install DESTDIR=...` when trying to relink
pylibmount against libmount.la.

libtool will look for libmount.so under ${DESTDIR}/${libdir}, but if it
is not yet present, it will assume it is a system installed library and
use -lmount instead.

This makes the install order significant.

Automake lists the install entries in alphabetical order, and as
install-pylibmountexecLTLIBRARIES < install-usrlib_execLTLIBRARIES,
make will try to install pylibmount.so before libmount.so is present
in the DESTDIR, which will then cause libtool to fallback to -lmount
when relinking. This causes the error below:

  libtool: install: warning: relinking `pylibmount.la'
  libtool: install: (... libtool --mode=relink gcc -o pylibmount.la \
        -rpath /usr/lib/python2.7/dist-packages/libmount \
        libmount/python/*.lo libmount.la ... -lpython2.7 \
        -inst-prefix-dir /path/to/destdir)
  /usr/bin/ld: cannot find -lmount
  collect2: error: ld returned 1 exit status
  libtool: install: error: relink `pylibmount.la' ...
  make[3]: *** [install-pylibmountexecLTLIBRARIES] Error 1

Work around this issue by using a zz_ prefix for the pylibmount exec
dir, in order to install it last.

This does not work if parallel make is used for the install step, but
that should be a minor issue (parallel install is probably not that
useful for util-linux, which is not that large a package to actually
benefit from it.) The proper fix should be to introduce a make
dependency of target install-pylibmountexecLTLIBRARIES on target
install-usrlib_execLTLIBRARIES, but unfortunately there is no good way
to accomplish that in automake without overriding it completely.

This issue seems to be previously encountered in automake context, since
automake includes a hack to insert such a dependency rule to install all
libLTLIBRARIES before attempting to install binPROGRAMS, initially
introduced in the commit below:
http://git.savannah.gnu.org/cgit/automake.git/commit/?id=bd4a1d5ad1a72fa780a8b7fd6c365a5dad2e6220

Also, a related bug from Ubuntu tracker:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1442076

Tested that `make install` starts working again after this commit, even
when libmount-dev is not installed on the system. Also confirmed that
`make distcheck` is now functional.

Confirmed that both __init__.py and the .so library are still installed
in the Python directory.

Tested that it still works without python-devel installed, also
inspected Makefile.in which looks correct.

Tested that `make install pylibmountexecdir=...` still works to override
destination directory at `make install` time.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2016-01-26 13:24:25 -08:00
Karel Zak 7ed6a6a00d tests: make swaplabel test more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-26 16:49:39 +01:00
Lada Trimasova bf6be9f523 buildsys: fix static configuration and building
In case of uClibc librt depends on libpthread. In particular
timer_create() function uses pthread_XXX(). That means in case of static
builds it's required to link not librt alone but together with libpthread. So
if checking timer_create function in librt fails, it is necessary to check if
timer_create function successfully links with "-lpthread".

That issues was spotted in Buldroot autobuilder failures:
http://autobuild.buildroot.net/results/759/75960db671807091fe9155aee9e46a6245e32590/
http://autobuild.buildroot.org/results/112/112e8b85783f5aaba42a937a6eb064317615a21b/

Signed-off-by: Lada Trimasova <ltrimas@synopsys.com>
2016-01-26 18:34:50 +03:00
Karel Zak b35831b755 tests: update swapfile output
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-26 16:02:54 +01:00
Karel Zak 7ccc2989dd libmount: cleanup btrfs.c header
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-26 15:57:24 +01:00
Karel Zak 5a9713293d libmount: consolidate btrfs stuff, make it more portable
- add --with-btrfs (enabled by default)
- check for linux/btrfs.h
- add "btrfs" to libmount features list (see mount -V)
- #ifdef HAVE_BTRFS_SUPPORT for all btrfs stuff in libmount

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-26 14:39:13 +01:00
Karel Zak bb7803e971 more: remove unnecessary compatibility layer
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-26 11:51:04 +01:00
Sami Kerola b4566a8a8d build-sys: remove libtermcap support
It is unlikely anyone is going to build this project on system where
libtermcap is available.  Fedora project obsoleted libtermcap 2007-12-12 in
favour of ncurses.  Debian made same move 2005.

Reference: https://fedoraproject.org/wiki/Deprecated_packages
Reference: https://www.debian.org/doc/manuals/debian-faq/ch-compat.en.html#s-termcap
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-01-26 11:45:14 +01:00
Wayne R. Roth cc706d9f09 mkswap: add warnings for insecure device permissions/owners
Logic modified from sys-utils/swapon.c

Signed-off-by: Wayne R. Roth <wayneroth42@gmail.com>
2016-01-26 11:26:00 +01:00
Stanislav Brabec 2cd28fc82d libmount: handle btrfs default subvolume mount
When mounting btrfs volume without subvol= and subvolid=, and the
btrfs volume has default subvolume defined, mount() mounts the default
subvolume and not the volume root as other filesystems do.

To handle this situation correctly (for example for "mount -a"),
libmount has to be capable to detect default subvolume.

Add btrfs.c and btrfs.h that implement needed functions.

This patch adds mnt_table_find_target_with_option() to the library API.

Known problems not covered by this patch:

- Use of subvolid= in fstab is not yet handled.

- Use of type auto in combination with subvol= in fstab is not yet
  handled.

- Use of btrfs in loop devices, where image file is specified in fstab is
  not yet handled (use of /dev/loop0 in fstab works).

- If fstab uses subvol=, and subvol path changes since last "mount -a",
  subsequent "mount -a" will not recognize that it is already mounted,
  and it will attempt to mount it second time. To fix it, libmount should
  remember subvolid in time of mount (subvolid is unique for the
  subvolume, subvol is not).

- mountinfo contains subvol and subvolid since kernel 4.2. Before kernel
  4.2, there is no reasonable way to solve this situation. (One would
  create temporary mount point, mount the default, call needed ioctl() to
  determine what was mounted, deduce the default subvolume, compare it
  with subvolume of mounted volume, unmount and return result.)

How to reproduce:
	truncate -s1G btrfs_test.img
	mkdir -p btrfs_mnt
	/sbin/mkfs.btrfs -f -d single -m single ./btrfs_test.img
	mount -o loop btrfs_test.img btrfs_mnt
	pushd .
	cd btrfs_mnt
	mkdir -p d0/dd0/ddd0
	cd d0/dd0/ddd0
	touch file{1..5}
	btrfs subvol create s1
	cd s1
	touch file{1..5}
	mkdir -p d1/dd1/ddd1
	cd d1/dd1/ddd1
	btrfs subvol create s2
	rid=$(btrfs inspect rootid s2)
	echo new default $rid
	btrfs subvol get-default .
	btrfs subvol set-default $rid .
	popd
	umount btrfs_mnt
	losetup /dev/loop0 $PWD/btrfs_test.img
	echo "/dev/loop0 $PWD/btrfs_mnt btrfs defaults 0 0" >>/etc/fstab
	mount -a
	mount -a
	umount btrfs_mnt
	sed -i "/\/dev\/loop0/d" /etc/fstab
	losetup -d /dev/loop0
	rm btrfs_test.img
	rmdir btrfs_mnt

Current behavior:
	mount: /dev/loop0 is already mounted or /root/btrfs_mnt busy
	       /dev/loop0 is already mounted on /root/btrfs_mnt

Expected behavior is to ignore already mounted FS.

[kzak@redhat.com: - make 'var' optional for mnt_table_find_target_with_option(),
                  - add mnt_table_find_target_with_option() to symbols table and docs
                  - add "btrfs" string between supported debug modes
                  - minor coding style changes]

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: David Štěrba <dsterba@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-26 11:14:25 +01:00