diff options
author | Karel Zak | 2010-08-31 12:24:00 +0200 |
---|---|---|
committer | Karel Zak | 2010-08-31 12:24:00 +0200 |
commit | 9a30c6ef921245534f93586603cca3ee1c37d7a0 (patch) | |
tree | fcb3cea0b08d60ac8b35d254a036aa859d87ec2d /misc-utils/findmnt.c | |
parent | mount: clean up fstab.5 (diff) | |
download | kernel-qcow2-util-linux-9a30c6ef921245534f93586603cca3ee1c37d7a0.tar.gz kernel-qcow2-util-linux-9a30c6ef921245534f93586603cca3ee1c37d7a0.tar.xz kernel-qcow2-util-linux-9a30c6ef921245534f93586603cca3ee1c37d7a0.zip |
findmnt: don't swap source and target if the source is a tag
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/findmnt.c')
-rw-r--r-- | misc-utils/findmnt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index 4138480f1..21a3566c8 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 { |