170522c
mount: fix for libmount from util-linux >= 2.20
170522c
170522c
The function mnt_fs_set_fs_options() has been removed from the final
170522c
version of the libmount API.
170522c
170522c
Signed-off-by: Karel Zak <kzak@redhat.com>
170522c
---
170522c
 utils/mount/mount_libmount.c |   15 ++++++++++++---
170522c
 1 files changed, 12 insertions(+), 3 deletions(-)
170522c
170522c
diff --git a/utils/mount/mount_libmount.c b/utils/mount/mount_libmount.c
170522c
index 6dd6484..cf6e58c 100644
170522c
--- a/utils/mount/mount_libmount.c
170522c
+++ b/utils/mount/mount_libmount.c
170522c
@@ -61,10 +61,19 @@ int nomtab;
170522c
  * managed by libmount at all. We have to use "mount attributes" that are
170522c
  * private for mount.<type> helpers.
170522c
  */
170522c
-static void store_mount_options(struct libmnt_fs *fs, const char *opts)
170522c
+static void store_mount_options(struct libmnt_fs *fs, const char *nfs_opts)
170522c
 {
170522c
-	mnt_fs_set_fs_options(fs, opts);	/* for mtab */
170522c
-	mnt_fs_set_attributes(fs, opts);	/* for non-mtab systems */
170522c
+	char *o = NULL;
170522c
+
170522c
+	mnt_fs_set_attributes(fs, nfs_opts);	/* for non-mtab systems */
170522c
+
170522c
+	/* for mtab create a new options list */
170522c
+	mnt_optstr_append_option(&o, mnt_fs_get_vfs_options(fs), NULL);
170522c
+	mnt_optstr_append_option(&o, nfs_opts, NULL);
170522c
+	mnt_optstr_append_option(&o, mnt_fs_get_user_options(fs), NULL);
170522c
+
170522c
+	mnt_fs_set_options(fs, o);
170522c
+	free(o);
170522c
 }
170522c
 
170522c
 /*