diff options
Diffstat (limited to 'sys/fs/devfs')
-rw-r--r-- | sys/fs/devfs/devfs.h | 2 | ||||
-rw-r--r-- | sys/fs/devfs/devfs_devs.c | 22 | ||||
-rw-r--r-- | sys/fs/devfs/devfs_rule.c | 20 | ||||
-rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 6 |
4 files changed, 25 insertions, 25 deletions
diff --git a/sys/fs/devfs/devfs.h b/sys/fs/devfs/devfs.h index c12a4d6..ba8bbf0 100644 --- a/sys/fs/devfs/devfs.h +++ b/sys/fs/devfs/devfs.h @@ -190,7 +190,7 @@ void devfs_rules_apply(struct devfs_mount *dm, struct devfs_dirent *de); int devfs_rules_ioctl(struct mount *mp, u_long cmd, caddr_t data, struct thread *td); void devfs_rules_newmount(struct devfs_mount *dm, struct thread *td); int devfs_allocv (struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, struct thread *td); -dev_t *devfs_itod (int inode); +struct cdev **devfs_itod (int inode); struct devfs_dirent **devfs_itode (struct devfs_mount *dm, int inode); int devfs_populate (struct devfs_mount *dm); struct devfs_dirent *devfs_newdirent (char *name, int namelen); diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index eb394d8..732a23d 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -47,8 +47,8 @@ #include <fs/devfs/devfs.h> -static dev_t devfs_inot[NDEVFSINO]; -static dev_t *devfs_overflow; +static struct cdev *devfs_inot[NDEVFSINO]; +static struct cdev **devfs_overflow; static int devfs_ref[NDEVFSINO]; static int *devfs_refoverflow; static int devfs_nextino = 3; @@ -95,7 +95,7 @@ static int devfs_getref(int inode) { int *ip, i, j; - dev_t *dp; + struct cdev **dp; ip = devfs_itor(inode); dp = devfs_itod(inode); @@ -124,7 +124,7 @@ devfs_itode (struct devfs_mount *dm, int inode) return (NULL); } -dev_t * +struct cdev ** devfs_itod (int inode) { @@ -140,7 +140,7 @@ devfs_itod (int inode) static void devfs_attemptoverflow(int insist) { - dev_t **ot; + struct cdev ***ot; int *or; int n, nb; @@ -150,8 +150,8 @@ devfs_attemptoverflow(int insist) ot = NULL; or = NULL; n = devfs_noverflowwant; - nb = sizeof (dev_t *) * n; - MALLOC(ot, dev_t **, nb, M_DEVFS, (insist ? M_WAITOK : M_NOWAIT) | M_ZERO); + nb = sizeof (struct cdev **) * n; + MALLOC(ot, struct cdev ***, nb, M_DEVFS, (insist ? M_WAITOK : M_NOWAIT) | M_ZERO); if (ot == NULL) goto bail; nb = sizeof (int) * n; @@ -282,7 +282,7 @@ int devfs_populate(struct devfs_mount *dm) { int i, j; - dev_t dev, pdev; + struct cdev *dev, *pdev; struct devfs_dirent *dd; struct devfs_dirent *de, **dep; char *q, *s; @@ -377,10 +377,10 @@ devfs_populate(struct devfs_mount *dm) } void -devfs_create(dev_t dev) +devfs_create(struct cdev *dev) { int ino, i, *ip; - dev_t *dp; + struct cdev **dp; for (;;) { /* Grab the next inode number */ @@ -426,7 +426,7 @@ devfs_create(dev_t dev) } void -devfs_destroy(dev_t dev) +devfs_destroy(struct cdev *dev) { int ino, i; diff --git a/sys/fs/devfs/devfs_rule.c b/sys/fs/devfs/devfs_rule.c index 366fd84..b73ac77 100644 --- a/sys/fs/devfs/devfs_rule.c +++ b/sys/fs/devfs/devfs_rule.c @@ -108,7 +108,7 @@ static void devfs_rule_applydm(struct devfs_krule *dk, struct devfs_mount *dm); static int devfs_rule_autonumber(struct devfs_ruleset *ds, devfs_rnum *rnp); static struct devfs_krule *devfs_rule_byid(devfs_rid rid); static int devfs_rule_delete(struct devfs_krule **dkp); -static dev_t devfs_rule_getdev(struct devfs_dirent *de); +static struct cdev *devfs_rule_getdev(struct devfs_dirent *de); static int devfs_rule_input(struct devfs_rule *dr, struct devfs_mount *dm); static int devfs_rule_insert(struct devfs_rule *dr); static int devfs_rule_match(struct devfs_krule *dk, struct devfs_dirent *de); @@ -480,26 +480,26 @@ devfs_rule_delete(struct devfs_krule **dkp) } /* - * Get a dev_t corresponding to de so we can try to match rules based - * on it. If this routine returns NULL, there is no dev_t associated + * Get a struct cdev *corresponding to de so we can try to match rules based + * on it. If this routine returns NULL, there is no struct cdev *associated * with the dirent (symlinks and directories don't have dev_ts), and * the caller should assume that any critera dependent on a dev_t * don't match. */ -static dev_t +static struct cdev * devfs_rule_getdev(struct devfs_dirent *de) { - dev_t *devp, dev; + struct cdev **devp, *dev; devp = devfs_itod(de->de_inode); if (devp != NULL) dev = *devp; else dev = NULL; - /* If we think this dirent should have a dev_t, alert the user. */ + /* If we think this dirent should have a struct cdev *, alert the user. */ if (dev == NULL && de->de_dirent->d_type != DT_LNK && de->de_dirent->d_type != DT_DIR) - printf("Warning: no dev_t for %s\n", de->de_dirent->d_name); + printf("Warning: no struct cdev *for %s\n", de->de_dirent->d_name); return (dev); } @@ -590,7 +590,7 @@ static int devfs_rule_match(struct devfs_krule *dk, struct devfs_dirent *de) { struct devfs_rule *dr = &dk->dk_rule; - dev_t dev; + struct cdev *dev; dev = devfs_rule_getdev(de); /* @@ -598,7 +598,7 @@ devfs_rule_match(struct devfs_krule *dk, struct devfs_dirent *de) * criteria that depend on it don't match. We should *not* * just ignore them (i.e., act like they weren't specified), * since that makes a rule that only has criteria dependent on - * the dev_t match all symlinks and directories. + * the struct cdev *match all symlinks and directories. * * Note also that the following tests are somewhat reversed: * They're actually testing to see whether the condition does @@ -630,7 +630,7 @@ devfs_rule_matchpath(struct devfs_krule *dk, struct devfs_dirent *de) { struct devfs_rule *dr = &dk->dk_rule; char *pname; - dev_t dev; + struct cdev *dev; dev = devfs_rule_getdev(de); if (dev != NULL) diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index e0f192f..cbc836a 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -123,7 +123,7 @@ devfs_allocv(struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, stru { int error; struct vnode *vp; - dev_t dev; + struct cdev *dev; if (td == NULL) td = curthread; /* XXX */ @@ -213,7 +213,7 @@ devfs_getattr(ap) struct vattr *vap = ap->a_vap; int error = 0; struct devfs_dirent *de; - dev_t dev; + struct cdev *dev; de = vp->v_data; if (vp->v_type == VDIR) @@ -304,7 +304,7 @@ devfs_lookupx(ap) struct devfs_dirent *de, *dd; struct devfs_dirent **dde; struct devfs_mount *dmp; - dev_t cdev; + struct cdev *cdev; int error, flags, nameiop; char specname[SPECNAMELEN + 1], *pname; |