1
0
forked from pool/util-linux
util-linux/util-linux-2.12r-nfs_remount_options.patch

19 lines
595 B
Diff
Raw Normal View History

Index: util-linux-2.12r/mount/nfsmount.c
===================================================================
--- util-linux-2.12r.orig/mount/nfsmount.c
+++ util-linux-2.12r/mount/nfsmount.c
@@ -305,8 +305,11 @@ int nfsmount(const char *spec, const cha
"excessively long option argument\n"));
goto fail;
}
- sprintf(new_opts, "%s%saddr=%s",
- old_opts, *old_opts ? "," : "", s);
+ if (*flags & MS_REMOUNT)
+ strcpy(new_opts, old_opts);
+ else
+ sprintf(new_opts, "%s%saddr=%s",
+ old_opts, *old_opts ? "," : "", s);
*extra_opts = xstrdup(new_opts);
/* Set default options.