diff options
author | phk <phk@FreeBSD.org> | 2004-06-17 17:16:53 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-06-17 17:16:53 +0000 |
commit | 40dd98a3bd2049465e7644b361b60da41a46efa0 (patch) | |
tree | fe8b297144afd6d6f7db41275c72cb5eb663ec02 /sys/fs | |
parent | 9acfe1e733142ca875624a3acbf96c4ff27b36a4 (diff) | |
download | FreeBSD-src-40dd98a3bd2049465e7644b361b60da41a46efa0.zip FreeBSD-src-40dd98a3bd2049465e7644b361b60da41a46efa0.tar.gz |
Second half of the dev_t cleanup.
The big lines are:
NODEV -> NULL
NOUDEV -> NODEV
udev_t -> dev_t
udev2dev() -> findcdev()
Various minor adjustments including handling of userland access to kernel
space struct cdev etc.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/cd9660/cd9660_node.h | 2 | ||||
-rw-r--r-- | sys/fs/cd9660/cd9660_rrip.c | 4 | ||||
-rw-r--r-- | sys/fs/coda/coda.h | 2 | ||||
-rw-r--r-- | sys/fs/coda/coda_fbsd.c | 2 | ||||
-rw-r--r-- | sys/fs/coda/coda_venus.c | 2 | ||||
-rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 8 | ||||
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/sys/fs/cd9660/cd9660_node.h b/sys/fs/cd9660/cd9660_node.h index a5b228c..fb74f39 100644 --- a/sys/fs/cd9660/cd9660_node.h +++ b/sys/fs/cd9660/cd9660_node.h @@ -52,7 +52,7 @@ typedef struct { uid_t iso_uid; /* owner user id */ gid_t iso_gid; /* owner group id */ short iso_links; /* links of file */ - udev_t iso_rdev; /* Major/Minor number for special */ + dev_t iso_rdev; /* Major/Minor number for special */ } ISO_RRIP_INODE; diff --git a/sys/fs/cd9660/cd9660_rrip.c b/sys/fs/cd9660/cd9660_rrip.c index 48eac6d..f20b4db 100644 --- a/sys/fs/cd9660/cd9660_rrip.c +++ b/sys/fs/cd9660/cd9660_rrip.c @@ -413,9 +413,9 @@ cd9660_rrip_device(p,ana) low = isonum_733(p->dev_t_low); if (high == 0) - ana->inop->inode.iso_rdev = makeudev(umajor(low), uminor(low)); + ana->inop->inode.iso_rdev = makedev(umajor(low), uminor(low)); else - ana->inop->inode.iso_rdev = makeudev(high, uminor(low)); + ana->inop->inode.iso_rdev = makedev(high, uminor(low)); ana->fields &= ~ISO_SUSP_DEVICE; return ISO_SUSP_DEVICE; } diff --git a/sys/fs/coda/coda.h b/sys/fs/coda/coda.h index 90e7e2a..5fb352e 100644 --- a/sys/fs/coda/coda.h +++ b/sys/fs/coda/coda.h @@ -87,7 +87,7 @@ typedef unsigned long long u_quad_t; typedef unsigned long long u_quad_t; #endif #else -#define cdev_t udev_t +#define cdev_t dev_t #endif #ifdef __CYGWIN32__ diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c index 0ce6e46..89d4de0 100644 --- a/sys/fs/coda/coda_fbsd.c +++ b/sys/fs/coda/coda_fbsd.c @@ -186,7 +186,7 @@ static void coda_fbsd_clone(arg, name, namelen, dev) { int u; - if (*dev != NODEV) + if (*dev != NULL) return; if (dev_stdclone(name,NULL,"cfs",&u) != 1) return; diff --git a/sys/fs/coda/coda_venus.c b/sys/fs/coda/coda_venus.c index f0bc3c2..7e4d321 100644 --- a/sys/fs/coda/coda_venus.c +++ b/sys/fs/coda/coda_venus.c @@ -212,7 +212,7 @@ venus_open(void *mdp, CodaFid *fid, int flag, error = coda_call(mdp, Isize, &Osize, (char *)inp); if (!error) { - *dev = udev2dev(outp->dev); + *dev = findcdev(outp->dev); *inode = outp->inode; } diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index cbc836a..2d7468a 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -140,7 +140,7 @@ loop: if (dev == NULL) return (ENOENT); } else { - dev = NODEV; + dev = NULL; } error = getnewvnode("devfs", mp, devfs_vnodeop_p, &vp); if (error != 0) { @@ -382,9 +382,9 @@ devfs_lookupx(ap) if (pname == NULL) goto notfound; - cdev = NODEV; + cdev = NULL; EVENTHANDLER_INVOKE(dev_clone, pname, strlen(pname), &cdev); - if (cdev == NODEV) + if (cdev == NULL) goto notfound; devfs_populate(dmp); @@ -660,7 +660,7 @@ devfs_reclaim(ap) if (de != NULL) de->de_vnode = NULL; vp->v_data = NULL; - if (vp->v_rdev != NODEV && vp->v_rdev != NULL) { + if (vp->v_rdev != NULL && vp->v_rdev != NULL) { i = vcount(vp); if ((vp->v_rdev->si_flags & SI_CHEAPCLONE) && i == 0 && (vp->v_rdev->si_flags & SI_NAMED)) diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 7d12a58..ec58af6 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -144,7 +144,7 @@ spec_open(ap) if (vp->v_mount && (vp->v_mount->mnt_flag & MNT_NODEV)) return (ENXIO); - if (dev == NODEV) + if (dev == NULL) return (ENXIO); dsw = devsw(dev); |