3
0
forked from pool/util-linux
util-linux/util-linux-2.12r-mount_nfs_remount_options.patch

21 lines
690 B
Diff

do not append addr option with each nfs remount [#130625]
Index: util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c
===================================================================
--- util-linux-ng-2.12r+2.13pre7.orig/mount/nfsmount.c
+++ util-linux-ng-2.12r+2.13pre7/mount/nfsmount.c
@@ -303,8 +303,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.