From edda9f8a15d25a6c208a444c41e994421b73c0a3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 19 Nov 2014 11:10:55 +0100 Subject: [PATCH] libmount: fix utab entry on remount mount(8) command does not set ROOT= field to utab entry on remount, for example: mount -oremount,_netdev /mnt Reported-by: Chris Leech Signed-off-by: Karel Zak --- libmount/src/context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmount/src/context.c b/libmount/src/context.c index 1620e9c8e9..a320b3e6b6 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -1993,6 +1993,9 @@ static int apply_table(struct libmnt_context *cxt, struct libmnt_table *tb, if (!rc && !mnt_fs_get_fstype(cxt->fs)) rc = mnt_fs_set_fstype(cxt->fs, mnt_fs_get_fstype(fs)); + if (!rc && !mnt_fs_get_root(cxt->fs) && mnt_fs_get_root(fs)) + rc = mnt_fs_set_root(cxt->fs, mnt_fs_get_root(fs)); + if (rc) return rc; -- 2.47.2