[Glibc-bsd-commits] r3881 - in trunk/kfreebsd-10/debian: . patches
Robert Millan
rmh at alioth.debian.org
Mon Nov 21 17:42:45 UTC 2011
Author: rmh
Date: 2011-11-21 17:42:43 +0000 (Mon, 21 Nov 2011)
New Revision: 3881
Modified:
trunk/kfreebsd-10/debian/changelog
trunk/kfreebsd-10/debian/patches/107_mount_update.diff
trunk/kfreebsd-10/debian/patches/series
Log:
* Rewrite 107_mount_update.diff to fix the new problem with same symptoms
(this time, a regression introduced by upstream rev 220937).
(Closes: #646957)
Modified: trunk/kfreebsd-10/debian/changelog
===================================================================
--- trunk/kfreebsd-10/debian/changelog 2011-11-20 11:24:53 UTC (rev 3880)
+++ trunk/kfreebsd-10/debian/changelog 2011-11-21 17:42:43 UTC (rev 3881)
@@ -3,8 +3,11 @@
* Mark kfreebsd-headers- at version@- at abiname@ as kfreebsd-any.
* Depend on package providing devd.
* Fix installability problem on non-kfreebsd platforms.
+ * Rewrite 107_mount_update.diff to fix the new problem with same symptoms
+ (this time, a regression introduced by upstream rev 220937).
+ (Closes: #646957)
- -- Robert Millan <rmh at debian.org> Thu, 17 Nov 2011 21:24:41 +0100
+ -- Robert Millan <rmh at debian.org> Mon, 21 Nov 2011 18:42:05 +0100
kfreebsd-10 (10.0~svn227111-2) experimental; urgency=low
Modified: trunk/kfreebsd-10/debian/patches/107_mount_update.diff
===================================================================
--- trunk/kfreebsd-10/debian/patches/107_mount_update.diff 2011-11-20 11:24:53 UTC (rev 3880)
+++ trunk/kfreebsd-10/debian/patches/107_mount_update.diff 2011-11-21 17:42:43 UTC (rev 3881)
@@ -1,36 +1,32 @@
+
+Revision 220937 in upstream removed a similar kludge, which had become
+unnecessary in some cases but not in the one that concerns us (see
+comment below).
+
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
-@@ -559,10 +559,10 @@
- struct vfsopt *opt, *noro_opt, *tmp_opt;
- char *fstype, *fspath, *errmsg;
- int error, fstypelen, fspathlen, errmsg_len, errmsg_pos;
-- int has_rw, has_noro;
-+ int has_noro;
+@@ -639,6 +639,24 @@
+ }
- errmsg = fspath = NULL;
-- errmsg_len = has_noro = has_rw = fspathlen = 0;
-+ errmsg_len = has_noro = fspathlen = 0;
- errmsg_pos = -1;
-
- error = vfs_buildopts(fsoptions, &optlist);
-@@ -659,10 +659,8 @@
- fsflags &= ~MNT_RDONLY;
- has_noro = 1;
- }
-- else if (strcmp(opt->name, "rw") == 0) {
-+ else if (strcmp(opt->name, "rw") == 0)
- fsflags &= ~MNT_RDONLY;
-- has_rw = 1;
-- }
- else if (strcmp(opt->name, "ro") == 0)
- fsflags |= MNT_RDONLY;
- else if (strcmp(opt->name, "rdonly") == 0) {
-@@ -684,7 +682,7 @@
- * we need a mount option "noro", since in vfs_mergeopts(),
- * "noro" will cancel "ro", but "rw" will not do anything.
- */
-- if (has_rw && !has_noro) {
-+ if (!(fsflags & MNT_RDONLY) && !has_noro) {
- noro_opt = malloc(sizeof(struct vfsopt), M_MOUNT, M_WAITOK);
- noro_opt->name = strdup("noro", M_MOUNT);
- noro_opt->value = NULL;
+ /*
++ * If MNT_RDONLY was not specified as a mount option, and we
++ * are trying to update a mount-point from "ro", it means
++ * read-write mode is desired by userland even if "rw" or
++ * "noro" weren't specified explicitly. Add "noro" here to
++ * make that happen.
++ */
++ if (!(fsflags & MNT_RDONLY)) {
++ struct vfsopt *noro_opt;
++ noro_opt = malloc(sizeof(struct vfsopt), M_MOUNT, M_WAITOK);
++ noro_opt->name = strdup("noro", M_MOUNT);
++ noro_opt->value = NULL;
++ noro_opt->len = 0;
++ noro_opt->pos = -1;
++ noro_opt->seen = 1;
++ TAILQ_INSERT_TAIL(optlist, noro_opt, link);
++ }
++
++ /*
+ * Be ultra-paranoid about making sure the type and fspath
+ * variables will fit in our mp buffers, including the
+ * terminating NUL.
Modified: trunk/kfreebsd-10/debian/patches/series
===================================================================
--- trunk/kfreebsd-10/debian/patches/series 2011-11-20 11:24:53 UTC (rev 3880)
+++ trunk/kfreebsd-10/debian/patches/series 2011-11-21 17:42:43 UTC (rev 3881)
@@ -6,7 +6,7 @@
#007_clone_signals.diff
008_verioned_freebsd_macro.diff
#009_disable_duped_modules.diff
-#107_mount_update.diff
+107_mount_update.diff
109_linprocfs_non_x86.diff
110_disable_trampoline_flavour.diff
901_disable_optimization_2.diff
More information about the Glibc-bsd-commits
mailing list