diff options
author | mux <mux@FreeBSD.org> | 2002-05-02 20:52:04 +0000 |
---|---|---|
committer | mux <mux@FreeBSD.org> | 2002-05-02 20:52:04 +0000 |
commit | 0cca4360890ee025afec23ec5a12edcf62cbda1d (patch) | |
tree | 3a0eeef2778c1cc4de08e856c7031ff3eceb290d | |
parent | 85b0c22bf2395ebfad953cd4ba6add044c1ca45d (diff) | |
download | FreeBSD-src-0cca4360890ee025afec23ec5a12edcf62cbda1d.zip FreeBSD-src-0cca4360890ee025afec23ec5a12edcf62cbda1d.tar.gz |
Swap the order of mount and nmount calls. We now call nmount
first, since all the consumers of mount_std in the tree have
been converted to nmount.
-rw-r--r-- | sbin/mount_std/mount_std.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sbin/mount_std/mount_std.c b/sbin/mount_std/mount_std.c index 225c197..3c182f7 100644 --- a/sbin/mount_std/mount_std.c +++ b/sbin/mount_std/mount_std.c @@ -124,23 +124,23 @@ main(argc, argv) /* resolve the mountpoint with realpath(3) */ (void)checkpath(argv[1], mntpath); - error = mount(vfc.vfc_name, mntpath, mntflags, NULL); + iov[0].iov_base = "fstype"; + iov[0].iov_len = sizeof("fstype"); + iov[1].iov_base = vfc.vfc_name; + iov[1].iov_len = strlen(vfc.vfc_name) + 1; + iov[2].iov_base = "fspath"; + iov[2].iov_len = sizeof("fstype"); + iov[3].iov_base = mntpath; + iov[3].iov_len = strlen(mntpath) + 1; + error = nmount(iov, 4, mntflags); /* - * Try with the new mount syscall in the case - * this filesystem has been converted. + * Try with the old mount syscall in the case + * this filesystem has not been converted yet, + * or the user didn't recompile his kernel. */ - if (error && errno == EOPNOTSUPP) { - iov[0].iov_base = "fstype"; - iov[0].iov_len = sizeof("fstype"); - iov[1].iov_base = vfc.vfc_name; - iov[1].iov_len = strlen(vfc.vfc_name) + 1; - iov[2].iov_base = "fspath"; - iov[2].iov_len = sizeof("fstype"); - iov[3].iov_base = mntpath; - iov[3].iov_len = strlen(mntpath) + 1; - error = nmount(iov, 4, mntflags); - } + if (error && errno == EOPNOTSUPP) + error = mount(vfc.vfc_name, mntpath, mntflags, NULL); if (error) err(EX_OSERR, NULL); |