Eliminate effectively unused dm_basedir field from devfs_mount.

This commit is contained in:
Poul-Henning Kamp 2005-08-15 19:40:53 +00:00
parent ef3af583d2
commit d785dfefa4
5 changed files with 3 additions and 5 deletions

View File

@ -169,7 +169,6 @@ struct devfs_dirent {
struct devfs_mount {
struct mount *dm_mount;
struct devfs_dirent *dm_rootdir;
struct devfs_dirent *dm_basedir;
unsigned dm_generation;
struct devfs_dirent **dm_dirent;
struct devfs_dirent **dm_overflow;

View File

@ -284,7 +284,7 @@ devfs_populate(struct devfs_mount *dm)
continue;
if (!devfs_getref(i))
continue;
dd = dm->dm_basedir;
dd = dm->dm_rootdir;
s = dev->si_name;
for (;;) {
for (q = s; *q != '/' && *q != '\0'; q++)

View File

@ -404,7 +404,7 @@ static void
devfs_rule_applydm(struct devfs_krule *dk, struct devfs_mount *dm)
{
devfs_rule_applyde_recursive(dk, dm->dm_basedir);
devfs_rule_applyde_recursive(dk, dm->dm_rootdir);
}
/*

View File

@ -93,7 +93,6 @@ devfs_mount(struct mount *mp, struct thread *td)
#ifdef MAC
mac_create_devfs_directory(mp, "", 0, fmp->dm_rootdir);
#endif
fmp->dm_basedir = fmp->dm_rootdir;
devfs_rules_newmount(fmp, td);
error = devfs_root(mp, LK_EXCLUSIVE, &rvp, td);

View File

@ -222,7 +222,7 @@ devfs_fqpn(char *buf, struct vnode *dvp, struct componentname *cnp)
return (NULL);
bcopy(cnp->cn_nameptr, buf + i, cnp->cn_namelen);
de = dd;
while (de != dmp->dm_basedir) {
while (de != dmp->dm_rootdir) {
i--;
if (i < 0)
return (NULL);