diff options
author | Karel Zak | 2012-07-18 22:09:24 +0200 |
---|---|---|
committer | Karel Zak | 2012-07-18 22:09:24 +0200 |
commit | 994871c59faece5d9ac772e91e6d911ce2441cd6 (patch) | |
tree | f74f1b80843424338b5c8a3122821feef5402513 /libmount/src/tab_diff.c | |
parent | docs: update TODO (diff) | |
download | kernel-qcow2-util-linux-994871c59faece5d9ac772e91e6d911ce2441cd6.tar.gz kernel-qcow2-util-linux-994871c59faece5d9ac772e91e6d911ce2441cd6.tar.xz kernel-qcow2-util-linux-994871c59faece5d9ac772e91e6d911ce2441cd6.zip |
libmount: check VFS mount options in mnt_diff_tables()
after "-o remount,ro" in unshared namespace is the original VFS entry
still read-write:
original:
42 21 8:2 / /boot rw,relatime - ext4 /dev/sda2 ro,user_xattr,acl,barrier=1,data=ordered
unshared + ro remount:
78 51 8:2 / /boot ro,relatime - ext4 /dev/sda2 ro,user_xattr,acl,barrier=1,data=ordered
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/tab_diff.c')
-rw-r--r-- | libmount/src/tab_diff.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libmount/src/tab_diff.c b/libmount/src/tab_diff.c index c94bcfaa0..f01f889f8 100644 --- a/libmount/src/tab_diff.c +++ b/libmount/src/tab_diff.c @@ -259,10 +259,12 @@ int mnt_diff_tables(struct libmnt_tabdiff *df, struct libmnt_table *old_tab, tabdiff_add_entry(df, NULL, fs, MNT_TABDIFF_MOUNT); else { /* is modified? */ - const char *o1 = mnt_fs_get_options(o_fs), - *o2 = mnt_fs_get_options(fs); + const char *v1 = mnt_fs_get_vfs_options(o_fs), + *v2 = mnt_fs_get_vfs_options(fs), + *f1 = mnt_fs_get_fs_options(o_fs), + *f2 = mnt_fs_get_fs_options(fs); - if (o1 && o2 && strcmp(o1, o2)) + if ((v1 && v2 && strcmp(v1, v2)) || (f1 && f2 && strcmp(f1, f2))) tabdiff_add_entry(df, o_fs, fs, MNT_TABDIFF_REMOUNT); } } |