]> err.no Git - util-linux/commitdiff
findmnt: don't swap source and target if the source is a tag
authorKarel Zak <kzak@redhat.com>
Tue, 31 Aug 2010 10:24:00 +0000 (12:24 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 31 Aug 2010 10:24:00 +0000 (12:24 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/findmnt.c

index 4138480f1cdc03cd65493cdb0a0ab87418ef1772..21a3566c80e18a999779cdfb3dc46ddfc91df10d 100644 (file)
@@ -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 {