From 88d03d8d09de22d526c80031adfd75fd1746f086 Mon Sep 17 00:00:00 2001 From: rodrigc Date: Sat, 23 Aug 2008 01:21:10 +0000 Subject: 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. --- sbin/fsck_ffs/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sbin/fsck_ffs') 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. -- cgit v1.1