Deleted Added
full compact
vfs_mount.c (72200) vfs_mount.c (73286)
1/*-
2 * Copyright (c) 1999 Michael Smith
3 * All rights reserved.
4 * Copyright (c) 1999 Poul-Henning Kamp
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1999 Michael Smith
3 * All rights reserved.
4 * Copyright (c) 1999 Poul-Henning Kamp
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/kern/vfs_mount.c 72200 2001-02-09 06:11:45Z bmilekic $
28 * $FreeBSD: head/sys/kern/vfs_mount.c 73286 2001-03-01 21:00:17Z adrian $
29 */
30
31/*
32 * Locate and mount the root filesystem.
33 *
34 * The root filesystem is detailed in the kernel environment variable
35 * vfs.root.mountfrom, which is expected to be in the general format
36 *

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

209 if ((path[0] != 0) && setrootbyname(path))
210 printf("setrootbyname failed\n");
211
212 /* If the root device is a type "memory disk", mount RW */
213 if (rootdev != NODEV && devsw(rootdev) &&
214 (devsw(rootdev)->d_flags & D_MEMDISK))
215 mp->mnt_flag &= ~MNT_RDONLY;
216
29 */
30
31/*
32 * Locate and mount the root filesystem.
33 *
34 * The root filesystem is detailed in the kernel environment variable
35 * vfs.root.mountfrom, which is expected to be in the general format
36 *

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

209 if ((path[0] != 0) && setrootbyname(path))
210 printf("setrootbyname failed\n");
211
212 /* If the root device is a type "memory disk", mount RW */
213 if (rootdev != NODEV && devsw(rootdev) &&
214 (devsw(rootdev)->d_flags & D_MEMDISK))
215 mp->mnt_flag &= ~MNT_RDONLY;
216
217 /*
218 * Set the mount path to be something useful, because the
219 * filesystem code isn't responsible now for initialising
220 * f_mntonname unless they want to override the default
221 * (which is `path'.)
222 */
223 strncpy(mp->mnt_stat.f_mntonname, "/", MNAMELEN);
224
217 error = VFS_MOUNT(mp, NULL, NULL, NULL, curproc);
218
219done:
220 if (vfsname != NULL)
221 free(vfsname, M_MOUNT);
222 if (path != NULL)
223 free(path, M_MOUNT);
224 if (error != 0) {

--- 144 unchanged lines hidden ---
225 error = VFS_MOUNT(mp, NULL, NULL, NULL, curproc);
226
227done:
228 if (vfsname != NULL)
229 free(vfsname, M_MOUNT);
230 if (path != NULL)
231 free(path, M_MOUNT);
232 if (error != 0) {

--- 144 unchanged lines hidden ---