PERFORCE change 19674 for review
Robert Watson
rwatson at freebsd.org
Sun Oct 20 03:58:18 GMT 2002
http://perforce.freebsd.org/chv.cgi?CH=19674
Change 19674 by rwatson at 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list