From owner-p4-projects Sat Oct 19 20:58:45 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E8F1637B404; Sat, 19 Oct 2002 20:58:40 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68FA637B401 for ; Sat, 19 Oct 2002 20:58:40 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3D0B43E97 for ; Sat, 19 Oct 2002 20:58:39 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9K3wImV013090 for ; Sat, 19 Oct 2002 20:58:18 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id g9K3wIIk013087 for perforce@freebsd.org; Sat, 19 Oct 2002 20:58:18 -0700 (PDT) Date: Sat, 19 Oct 2002 20:58:18 -0700 (PDT) Message-Id: <200210200358.g9K3wIIk013087@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 19674 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=19674 Change 19674 by rwatson@rwatson_tislabs on 2002/10/19 20:57:29 Now that we have the multilabel tunefs flag, we currently don't need the loader multilabel mount flag. The infrastructure here may be useful to grab at some point in the future but in the mean time it's a divergence from the main tree we'll have to maintain. Merge it out for now. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/vfs_mount.c#10 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/vfs_mount.c#10 (text+ko) ==== @@ -97,8 +97,8 @@ static void checkdirs(struct vnode *olddp, struct vnode *newdp); static int vfs_nmount(struct thread *td, int, struct uio *); -static int vfs_mountroot_try(char *mountfrom, int rootmntflags); -static int vfs_mountroot_ask(int rootmntflags); +static int vfs_mountroot_try(char *mountfrom); +static int vfs_mountroot_ask(void); static void gets(char *cp); static int usermount = 0; /* if 1, non-root can mount fs. */ @@ -1402,19 +1402,15 @@ vfs_mountroot(void) { char *cp; - int i, rootmntflags, error; + int i, error; - if (getenv("vfs.root.multilabel") != NULL) - rootmntflags = MNT_MULTILABEL; - else - rootmntflags = 0; /* * The root filesystem information is compiled in, and we are * booted with instructions to use it. */ #ifdef ROOTDEVNAME if ((boothowto & RB_DFLTROOT) && - !vfs_mountroot_try(ROOTDEVNAME, rootmntflags)) + !vfs_mountroot_try(ROOTDEVNAME)) return; #endif /* @@ -1422,7 +1418,7 @@ * or to use the compiled-in default when it doesn't exist. */ if (boothowto & (RB_DFLTROOT | RB_ASKNAME)) { - if (!vfs_mountroot_ask(rootmntflags)) + if (!vfs_mountroot_ask()) return; } @@ -1433,8 +1429,7 @@ */ if (boothowto & RB_CDROM) { for (i = 0; cdrom_rootdevnames[i] != NULL; i++) { - if (!vfs_mountroot_try(cdrom_rootdevnames[i], - rootmntflags)) + if (!vfs_mountroot_try(cdrom_rootdevnames[i])) return; } } @@ -1445,7 +1440,7 @@ * mechanism. */ if ((cp = getenv("vfs.root.mountfrom")) != NULL) { - error = vfs_mountroot_try(cp, rootmntflags); + error = vfs_mountroot_try(cp); freeenv(cp); if (!error) return; @@ -1455,9 +1450,9 @@ * Try values that may have been computed by the machine-dependant * legacy code. */ - if (!vfs_mountroot_try(rootdevnames[0], rootmntflags)) + if (!vfs_mountroot_try(rootdevnames[0])) return; - if (!vfs_mountroot_try(rootdevnames[1], rootmntflags)) + if (!vfs_mountroot_try(rootdevnames[1])) return; /* @@ -1466,7 +1461,7 @@ */ #ifdef ROOTDEVNAME if (!(boothowto & RB_DFLTROOT)) - if (!vfs_mountroot_try(ROOTDEVNAME, rootmntflags)) + if (!vfs_mountroot_try(ROOTDEVNAME)) return; #endif @@ -1474,8 +1469,7 @@ * Everything so far has failed, prompt on the console if we haven't * already tried that. */ - if (!(boothowto & (RB_DFLTROOT | RB_ASKNAME)) && - !vfs_mountroot_ask(rootmntflags)) + if (!(boothowto & (RB_DFLTROOT | RB_ASKNAME)) && !vfs_mountroot_ask()) return; panic("Root mount failed, startup aborted."); } @@ -1484,7 +1478,7 @@ * Mount (mountfrom) as the root filesystem. */ static int -vfs_mountroot_try(char *mountfrom, int rootmntflags) +vfs_mountroot_try(char *mountfrom) { struct mount *mp; char *vfsname, *path; @@ -1520,7 +1514,7 @@ vfsname, error); goto done; } - mp->mnt_flag |= MNT_ROOTFS | rootmntflags; + mp->mnt_flag |= MNT_ROOTFS; /* do our best to set rootdev */ if ((path[0] != 0) && setrootbyname(path)) @@ -1574,7 +1568,7 @@ * Spin prompting on the console for a suitable root filesystem */ static int -vfs_mountroot_ask(int rootmntflags) +vfs_mountroot_ask(void) { char name[128]; int i; @@ -1604,7 +1598,7 @@ printf("\n"); continue; } - if (!vfs_mountroot_try(name, rootmntflags)) + if (!vfs_mountroot_try(name)) return(0); } } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message