summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2008-08-23 01:21:10 +0000
committerrodrigc <rodrigc@FreeBSD.org>2008-08-23 01:21:10 +0000
commit88d03d8d09de22d526c80031adfd75fd1746f086 (patch)
tree42d13129b919d761d47ad2bd18fe185828139df0 /sbin
parent40d2569e4748d0f26e2acac70a90a07cac7ea736 (diff)
downloadFreeBSD-src-88d03d8d09de22d526c80031adfd75fd1746f086.zip
FreeBSD-src-88d03d8d09de22d526c80031adfd75fd1746f086.tar.gz
Instead of passing MNT_UPDATE, MNT_SNAPSHOT, MNT_RELOAD from
userspace to kernel via nmount(), pass in the strings "update", "snapshot", "reload". We want to move away from passing MNT_ flags from userspace -> kernel via nmount(), and instead favor passing the string options.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsck_ffs/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c
index 859f340..9e926aa 100644
--- a/sbin/fsck_ffs/main.c
+++ b/sbin/fsck_ffs/main.c
@@ -344,7 +344,6 @@ checkfilesys(char *filesys)
snprintf(snapname, sizeof snapname,
"%s/.snap/fsck_snapshot", mntp->f_mntonname);
fflags = mntp->f_flags;
- fflags = fflags | MNT_UPDATE | MNT_SNAPSHOT;
build_iovec(&iov, &iovlen, "fstype", "ffs", 4);
build_iovec(&iov, &iovlen, "from", snapname,
(size_t)-1);
@@ -352,6 +351,8 @@ checkfilesys(char *filesys)
(size_t)-1);
build_iovec(&iov, &iovlen, "errmsg", errmsg,
sizeof(errmsg));
+ build_iovec(&iov, &iovlen, "update", NULL, 0);
+ build_iovec(&iov, &iovlen, "snapshot", NULL, 0);
while (nmount(iov, iovlen, fflags) < 0) {
if (errno == EEXIST && unlink(snapname) == 0)
@@ -537,7 +538,6 @@ chkdoreload(struct statfs *mntp)
* as safely as possible.
*/
if (mntp->f_flags & MNT_RDONLY) {
- fflags = fflags | MNT_RELOAD;
build_iovec(&iov, &iovlen, "fstype", "ffs", 4);
build_iovec(&iov, &iovlen, "from", mntp->f_mntfromname,
(size_t)-1);
@@ -546,6 +546,7 @@ chkdoreload(struct statfs *mntp)
build_iovec(&iov, &iovlen, "errmsg", errmsg,
sizeof(errmsg));
build_iovec(&iov, &iovlen, "update", NULL, 0);
+ build_iovec(&iov, &iovlen, "reload", NULL, 0);
/*
* XX: We need the following line until we clean up
* nmount parsing of root mounts and NFS root mounts.
OpenPOWER on IntegriCloud