summaryrefslogtreecommitdiffstats
path: root/libmount/src/tab_parse.c
diff options
context:
space:
mode:
authorKarel Zak2012-03-02 15:53:55 +0100
committerKarel Zak2012-03-02 15:53:55 +0100
commit6699e742f238d4bc15ac396dd56f0df1480bd36c (patch)
tree97461a5025b8e3dfda498a79b26367ca89ffcef6 /libmount/src/tab_parse.c
parentblkid: add DEVNAME= to export output format (diff)
downloadkernel-qcow2-util-linux-6699e742f238d4bc15ac396dd56f0df1480bd36c.tar.gz
kernel-qcow2-util-linux-6699e742f238d4bc15ac396dd56f0df1480bd36c.tar.xz
kernel-qcow2-util-linux-6699e742f238d4bc15ac396dd56f0df1480bd36c.zip
libmount: add mnt_fs_streq_target() and export all mnt_fs_streq_*
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/tab_parse.c')
-rw-r--r--libmount/src/tab_parse.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c
index 4d581c31e..28c8536af 100644
--- a/libmount/src/tab_parse.c
+++ b/libmount/src/tab_parse.c
@@ -728,21 +728,14 @@ static struct libmnt_fs *mnt_table_merge_user_fs(struct libmnt_table *tb, struct
mnt_reset_iter(&itr, MNT_ITER_BACKWARD);
while(mnt_table_next_fs(tb, &itr, &fs) == 0) {
- const char *s = mnt_fs_get_srcpath(fs),
- *t = mnt_fs_get_target(fs),
- *r = mnt_fs_get_root(fs);
+ const char *r = mnt_fs_get_root(fs);
if (fs->flags & MNT_FS_MERGED)
continue;
- /*
- * Note that kernel can add tailing slash to the network
- * filesystem source path
- */
- if (s && t && r &&
- strcmp(t, target) == 0 &&
- mnt_fs_streq_srcpath(fs, src) &&
- strcmp(r, root) == 0)
+ if (r && strcmp(r, root) == 0
+ && mnt_fs_streq_target(fs, target)
+ && mnt_fs_streq_srcpath(fs, src))
break;
}