From 9a30c6ef921245534f93586603cca3ee1c37d7a0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 31 Aug 2010 12:24:00 +0200 Subject: [PATCH] findmnt: don't swap source and target if the source is a tag Signed-off-by: Karel Zak --- misc-utils/findmnt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index 4138480f..21a3566c 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 { -- 2.39.5