summaryrefslogtreecommitdiffstats
path: root/shlibs/mount/src/tab.c
diff options
context:
space:
mode:
authorKarel Zak2011-06-02 13:25:19 +0200
committerKarel Zak2011-06-02 13:25:19 +0200
commitc4c6635582fb7ae9f68a58492e4bfb1f382ddd06 (patch)
tree109d8cae6e4da274c59534038e37968ecc429af3 /shlibs/mount/src/tab.c
parentdocs: colcrt manual update (diff)
downloadkernel-qcow2-util-linux-c4c6635582fb7ae9f68a58492e4bfb1f382ddd06.tar.gz
kernel-qcow2-util-linux-c4c6635582fb7ae9f68a58492e4bfb1f382ddd06.tar.xz
kernel-qcow2-util-linux-c4c6635582fb7ae9f68a58492e4bfb1f382ddd06.zip
libmount: use mnt_table_get_fs_root() in utab code
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/tab.c')
-rw-r--r--shlibs/mount/src/tab.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/shlibs/mount/src/tab.c b/shlibs/mount/src/tab.c
index 38a5d5b12..227c5aa43 100644
--- a/shlibs/mount/src/tab.c
+++ b/shlibs/mount/src/tab.c
@@ -733,7 +733,6 @@ struct libmnt_fs *mnt_table_get_fs_root(struct libmnt_table *tb,
const char *fstype;
struct libmnt_fs *src_fs = NULL;
- assert(tb);
assert(fs);
assert(fsroot);
@@ -741,7 +740,7 @@ struct libmnt_fs *mnt_table_get_fs_root(struct libmnt_table *tb,
fstype = mnt_fs_get_fstype(fs);
- if (mountflags & MS_BIND) {
+ if (tb && (mountflags & MS_BIND)) {
const char *src, *src_root;
DBG(TAB, mnt_debug("fs-root for bind"));
@@ -828,7 +827,7 @@ err:
* @fstab_fs: /etc/fstab entry
*
* Checks if the @fstab_fs entry is already in the @tb table. The "swap"
- * is ignored.
+ * is ignored.
*
* TODO: check for loopdev (see mount/mount.c is_fstab_entry_mounted().
*