From: Karel Zak Date: Tue, 31 Aug 2010 10:24:00 +0000 (+0200) Subject: findmnt: don't swap source and target if the source is a tag X-Git-Tag: v2.19-rc1~347 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a30c6ef921245534f93586603cca3ee1c37d7a0;p=thirdparty%2Futil-linux.git findmnt: don't swap source and target if the source is a tag Signed-off-by: Karel Zak --- diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index 4138480f1c..21a3566c80 100644 --- a/misc-utils/findmnt.c +++ b/misc-utils/findmnt.c @@ -417,7 +417,8 @@ static mnt_fs *get_next_fs(mnt_tab *tb, mnt_iter *itr) */ fs = mnt_tab_find_source(tb, get_match(COL_SOURCE), mnt_iter_get_direction(itr)); - if (!fs) + + if (!fs && !(flags & FL_NOSWAPMATCH)) fs = mnt_tab_find_target(tb, get_match(COL_SOURCE), mnt_iter_get_direction(itr)); } else {