diff options
author | Karel Zak | 2011-04-27 18:09:16 +0200 |
---|---|---|
committer | Karel Zak | 2011-04-27 18:09:41 +0200 |
commit | 77a1c5f7c9c6ff3f73940967a173ba24ca0e8eda (patch) | |
tree | c22944f61c69c8e2a58a969d7c5c72479f453855 /misc-utils/findmnt.c | |
parent | findmnt: add --poll and --timeout to the man page (diff) | |
download | kernel-qcow2-util-linux-77a1c5f7c9c6ff3f73940967a173ba24ca0e8eda.tar.gz kernel-qcow2-util-linux-77a1c5f7c9c6ff3f73940967a173ba24ca0e8eda.tar.xz kernel-qcow2-util-linux-77a1c5f7c9c6ff3f73940967a173ba24ca0e8eda.zip |
findmnt: print OLD-* columns only when necessary
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/findmnt.c')
-rw-r--r-- | misc-utils/findmnt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index 16827f192..71a44f001 100644 --- a/misc-utils/findmnt.c +++ b/misc-utils/findmnt.c @@ -337,11 +337,13 @@ static const char *get_tabdiff_data(struct libmnt_fs *old_fs, } break; case COL_OLD_OPTIONS: - if (old_fs) + if (old_fs && (change == MNT_TABDIFF_REMOUNT || + change == MNT_TABDIFF_UMOUNT)) str = mnt_fs_get_options(old_fs); break; case COL_OLD_TARGET: - if (old_fs) + if (old_fs && (change == MNT_TABDIFF_MOVE || + change == MNT_TABDIFF_UMOUNT)) str = mnt_fs_get_target(old_fs); break; default: @@ -975,7 +977,7 @@ int main(int argc, char *argv[]) fl &= ~TT_FL_TREE; if (!(flags & FL_POLL) && is_tabdiff_column(id)) { - warn(_("%s column is requested, but --poll " + warnx(_("%s column is requested, but --poll " "is not enabled"), get_column_name(i)); goto leave; } |