Deleted Added
full compact
vfs_mount.c (107850) vfs_mount.c (107855)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 47 unchanged lines hidden (view full) ---

56 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
57 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
58 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
59 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
60 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
61 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
62 * SUCH DAMAGE.
63 *
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 47 unchanged lines hidden (view full) ---

56 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
57 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
58 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
59 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
60 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
61 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
62 * SUCH DAMAGE.
63 *
64 * $FreeBSD: head/sys/kern/vfs_mount.c 107850 2002-12-14 02:07:32Z alfred $
64 * $FreeBSD: head/sys/kern/vfs_mount.c 107855 2002-12-14 08:18:06Z alfred $
65 */
66
67#include <sys/param.h>
68#include <sys/conf.h>
69#include <sys/cons.h>
70#include <sys/kernel.h>
71#include <sys/linker.h>
72#include <sys/mac.h>

--- 737 unchanged lines hidden (view full) ---

810 /*
811 * vfs_mount() actually takes a kernel string for `type' and
812 * `path' now, so extract them.
813 */
814 error = copyinstr(uap->type, fstype, MFSNAMELEN, NULL);
815 if (error == 0)
816 error = copyinstr(uap->path, fspath, MNAMELEN, NULL);
817 if (error == 0)
65 */
66
67#include <sys/param.h>
68#include <sys/conf.h>
69#include <sys/cons.h>
70#include <sys/kernel.h>
71#include <sys/linker.h>
72#include <sys/mac.h>

--- 737 unchanged lines hidden (view full) ---

810 /*
811 * vfs_mount() actually takes a kernel string for `type' and
812 * `path' now, so extract them.
813 */
814 error = copyinstr(uap->type, fstype, MFSNAMELEN, NULL);
815 if (error == 0)
816 error = copyinstr(uap->path, fspath, MNAMELEN, NULL);
817 if (error == 0)
818 error = vfs_mount(td, fstype, fspath, uap->flags,
819 uap->data);
818 error = vfs_mount(td, fstype, fspath, uap->flags, uap->data);
820 free(fstype, M_TEMP);
821 free(fspath, M_TEMP);
822 return (error);
823}
824
825/*
826 * vfs_mount(): actually attempt a filesystem mount.
827 *

--- 365 unchanged lines hidden (view full) ---

1193 int flags;
1194 } */ *uap;
1195{
1196 register struct vnode *vp;
1197 struct mount *mp;
1198 int error;
1199 struct nameidata nd;
1200
819 free(fstype, M_TEMP);
820 free(fspath, M_TEMP);
821 return (error);
822}
823
824/*
825 * vfs_mount(): actually attempt a filesystem mount.
826 *

--- 365 unchanged lines hidden (view full) ---

1192 int flags;
1193 } */ *uap;
1194{
1195 register struct vnode *vp;
1196 struct mount *mp;
1197 int error;
1198 struct nameidata nd;
1199
1201 NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
1202 uap->path, td);
1200 NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, uap->path, td);
1203 if ((error = namei(&nd)) != 0)
1204 return (error);
1205 vp = nd.ni_vp;
1206 NDFREE(&nd, NDF_ONLY_PNBUF);
1207 mp = vp->v_mount;
1208
1209 /*
1210 * Only root, or the user that did the original mount is

--- 546 unchanged lines hidden ---
1201 if ((error = namei(&nd)) != 0)
1202 return (error);
1203 vp = nd.ni_vp;
1204 NDFREE(&nd, NDF_ONLY_PNBUF);
1205 mp = vp->v_mount;
1206
1207 /*
1208 * Only root, or the user that did the original mount is

--- 546 unchanged lines hidden ---