FreeBSD Bugzilla – Attachment 109224 Details for
Bug 150206
[patch] nmount(2): can't switch root partition to rw using mount flags
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.txt
file.txt (text/plain), 1.09 KB, created by
Aurelien Jarno
on 2010-09-01 23:50:01 UTC
(
hide
)
Description:
file.txt
Filename:
MIME Type:
Creator:
Aurelien Jarno
Created:
2010-09-01 23:50:01 UTC
Size:
1.09 KB
patch
obsolete
>--- 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; > > 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;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 150206
: 109224