From 6699e742f238d4bc15ac396dd56f0df1480bd36c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 2 Mar 2012 15:53:55 +0100 Subject: libmount: add mnt_fs_streq_target() and export all mnt_fs_streq_* Signed-off-by: Karel Zak --- libmount/src/tab_parse.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'libmount/src/tab_parse.c') 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; } -- cgit v1.2.3-55-g7522