From 994871c59faece5d9ac772e91e6d911ce2441cd6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 18 Jul 2012 22:09:24 +0200 Subject: 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 --- libmount/src/tab_diff.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libmount/src/tab_diff.c') 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); } } -- cgit v1.2.3-55-g7522