summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-06-16 09:47:26 +0000
committerphk <phk@FreeBSD.org>2004-06-16 09:47:26 +0000
commitdfd1f7fd50fffaf75541921fcf86454cd8eb3614 (patch)
tree624c885995e84df6decddd3291c60a15e50e3c85 /sys/fs
parentcafb94bcea1cdf048e81b7eb2d24808e1a8c5280 (diff)
downloadFreeBSD-src-dfd1f7fd50fffaf75541921fcf86454cd8eb3614.zip
FreeBSD-src-dfd1f7fd50fffaf75541921fcf86454cd8eb3614.tar.gz
Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/cd9660/cd9660_node.c2
-rw-r--r--sys/fs/cd9660/cd9660_node.h2
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c8
-rw-r--r--sys/fs/cd9660/iso.h2
-rw-r--r--sys/fs/coda/cnode.h6
-rw-r--r--sys/fs/coda/coda.h2
-rw-r--r--sys/fs/coda/coda_fbsd.c4
-rw-r--r--sys/fs/coda/coda_psdev.c12
-rw-r--r--sys/fs/coda/coda_psdev.h12
-rw-r--r--sys/fs/coda/coda_venus.c2
-rw-r--r--sys/fs/coda/coda_venus.h2
-rw-r--r--sys/fs/coda/coda_vfsops.c6
-rw-r--r--sys/fs/coda/coda_vnops.c4
-rw-r--r--sys/fs/coda/coda_vnops.h2
-rw-r--r--sys/fs/devfs/devfs.h2
-rw-r--r--sys/fs/devfs/devfs_devs.c22
-rw-r--r--sys/fs/devfs/devfs_rule.c20
-rw-r--r--sys/fs/devfs/devfs_vnops.c6
-rw-r--r--sys/fs/hpfs/hpfs.h10
-rw-r--r--sys/fs/hpfs/hpfs_hash.c6
-rw-r--r--sys/fs/hpfs/hpfs_vfsops.c2
-rw-r--r--sys/fs/msdosfs/msdosfs_denode.c6
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c2
-rw-r--r--sys/fs/msdosfs/msdosfsmount.h2
-rw-r--r--sys/fs/ntfs/ntfs.h2
-rw-r--r--sys/fs/ntfs/ntfs_ihash.c2
-rw-r--r--sys/fs/ntfs/ntfs_ihash.h4
-rw-r--r--sys/fs/ntfs/ntfs_inode.h2
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c2
-rw-r--r--sys/fs/specfs/spec_vnops.c26
-rw-r--r--sys/fs/udf/udf.h4
31 files changed, 93 insertions, 93 deletions
diff --git a/sys/fs/cd9660/cd9660_node.c b/sys/fs/cd9660/cd9660_node.c
index b51f15d..687ec66 100644
--- a/sys/fs/cd9660/cd9660_node.c
+++ b/sys/fs/cd9660/cd9660_node.c
@@ -92,7 +92,7 @@ cd9660_uninit(vfsp)
*/
int
cd9660_ihashget(dev, inum, flags, vpp)
- dev_t dev;
+ struct cdev *dev;
ino_t inum;
int flags;
struct vnode **vpp;
diff --git a/sys/fs/cd9660/cd9660_node.h b/sys/fs/cd9660/cd9660_node.h
index 8e7d6c1..a5b228c 100644
--- a/sys/fs/cd9660/cd9660_node.h
+++ b/sys/fs/cd9660/cd9660_node.h
@@ -113,7 +113,7 @@ void cd9660_defattr(struct iso_directory_record *,
struct iso_node *, struct buf *, enum ISO_FTYPE);
void cd9660_deftstamp(struct iso_directory_record *,
struct iso_node *, struct buf *, enum ISO_FTYPE);
-int cd9660_ihashget(dev_t, ino_t, int, struct vnode **);
+int cd9660_ihashget(struct cdev *, ino_t, int, struct vnode **);
void cd9660_ihashins(struct iso_node *);
int cd9660_tstamp_conv7(u_char *, struct timespec *, enum ISO_FTYPE);
int cd9660_tstamp_conv17(u_char *, struct timespec *);
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index ceb60f9..dc0b240 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -92,7 +92,7 @@ MODULE_VERSION(cd9660, 1);
* Called by vfs_mountroot when iso is going to be mounted as root.
*/
-static int iso_get_ssector(dev_t dev, struct thread *td);
+static int iso_get_ssector(struct cdev *dev, struct thread *td);
static int iso_mountfs(struct vnode *devvp, struct mount *mp,
struct thread *td, struct iso_args *argp);
@@ -103,7 +103,7 @@ static int iso_mountfs(struct vnode *devvp, struct mount *mp,
*/
static int
iso_get_ssector(dev, td)
- dev_t dev;
+ struct cdev *dev;
struct thread *td;
{
struct ioc_toc_header h;
@@ -272,7 +272,7 @@ iso_mountfs(devvp, mp, td, argp)
register struct iso_mnt *isomp = (struct iso_mnt *)0;
struct buf *bp = NULL;
struct buf *pribp = NULL, *supbp = NULL;
- dev_t dev = devvp->v_rdev;
+ struct cdev *dev = devvp->v_rdev;
int error = EINVAL;
int needclose = 0;
int high_sierra = 0;
@@ -707,7 +707,7 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir)
struct iso_node *ip;
struct buf *bp;
struct vnode *vp;
- dev_t dev;
+ struct cdev *dev;
int error;
imp = VFSTOISOFS(mp);
diff --git a/sys/fs/cd9660/iso.h b/sys/fs/cd9660/iso.h
index 4789e50..412f130 100644
--- a/sys/fs/cd9660/iso.h
+++ b/sys/fs/cd9660/iso.h
@@ -223,7 +223,7 @@ struct iso_mnt {
int im_flags;
struct mount *im_mountp;
- dev_t im_dev;
+ struct cdev *im_dev;
struct vnode *im_devvp;
int logical_block_size;
diff --git a/sys/fs/coda/cnode.h b/sys/fs/coda/cnode.h
index 540831c..be7e848 100644
--- a/sys/fs/coda/cnode.h
+++ b/sys/fs/coda/cnode.h
@@ -109,7 +109,7 @@ struct cnode {
struct vattr c_vattr; /* attributes */
char *c_symlink; /* pointer to symbolic link */
u_short c_symlen; /* length of symbolic link */
- dev_t c_device; /* associated vnode device */
+ struct cdev *c_device; /* associated vnode device */
ino_t c_inode; /* associated vnode inode */
struct cnode *c_next; /* links if on NetBSD machine */
};
@@ -153,7 +153,7 @@ struct coda_mntinfo {
struct vnode *mi_rootvp;
struct mount *mi_vfsp;
struct vcomm mi_vcomm;
- dev_t dev;
+ struct cdev *dev;
int mi_started;
};
extern struct coda_mntinfo coda_mnttbl[]; /* indexed by minor device number */
@@ -201,7 +201,7 @@ extern struct cnode *make_coda_node(CodaFid *fid, struct mount *vfsp, short type
extern int coda_vnodeopstats_init(void);
/* coda_vfsops.h */
-extern struct mount *devtomp(dev_t dev);
+extern struct mount *devtomp(struct cdev *dev);
/* sigh */
#define CODA_RDWR ((u_long) 31)
diff --git a/sys/fs/coda/coda.h b/sys/fs/coda/coda.h
index e7f1e0d..90e7e2a 100644
--- a/sys/fs/coda/coda.h
+++ b/sys/fs/coda/coda.h
@@ -58,7 +58,7 @@ typedef unsigned long u_long;
typedef unsigned int u_int;
typedef unsigned short u_short;
typedef u_long ino_t;
-typedef u_long dev_t;
+typedef u_long struct cdev *;
typedef void * caddr_t;
#ifdef DOS
typedef unsigned __int64 u_quad_t;
diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c
index 784962c..0ce6e46 100644
--- a/sys/fs/coda/coda_fbsd.c
+++ b/sys/fs/coda/coda_fbsd.c
@@ -174,7 +174,7 @@ printf("error = %d\n", error);
/* for DEVFS, using bpf & tun drivers as examples*/
static void coda_fbsd_drvinit(void *unused);
static void coda_fbsd_drvuninit(void *unused);
-static void coda_fbsd_clone(void *arg, char *name, int namelen, dev_t *dev);
+static void coda_fbsd_clone(void *arg, char *name, int namelen, struct cdev **dev);
static eventhandler_tag clonetag;
@@ -182,7 +182,7 @@ static void coda_fbsd_clone(arg, name, namelen, dev)
void *arg;
char *name;
int namelen;
- dev_t *dev;
+ struct cdev **dev;
{
int u;
diff --git a/sys/fs/coda/coda_psdev.c b/sys/fs/coda/coda_psdev.c
index 133d0fd..03e408d 100644
--- a/sys/fs/coda/coda_psdev.c
+++ b/sys/fs/coda/coda_psdev.c
@@ -117,7 +117,7 @@ vcodaattach(n)
int
vc_nb_open(dev, flag, mode, td)
- dev_t dev;
+ struct cdev *dev;
int flag;
int mode;
struct thread *td; /* NetBSD only */
@@ -149,7 +149,7 @@ vc_nb_open(dev, flag, mode, td)
int
vc_nb_close (dev, flag, mode, td)
- dev_t dev;
+ struct cdev *dev;
int flag;
int mode;
struct thread *td;
@@ -233,7 +233,7 @@ vc_nb_close (dev, flag, mode, td)
int
vc_nb_read(dev, uiop, flag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uiop;
int flag;
{
@@ -287,7 +287,7 @@ vc_nb_read(dev, uiop, flag)
int
vc_nb_write(dev, uiop, flag)
- dev_t dev;
+ struct cdev *dev;
struct uio *uiop;
int flag;
{
@@ -387,7 +387,7 @@ vc_nb_write(dev, uiop, flag)
int
vc_nb_ioctl(dev, cmd, addr, flag, td)
- dev_t dev;
+ struct cdev *dev;
u_long cmd;
caddr_t addr;
int flag;
@@ -441,7 +441,7 @@ vc_nb_ioctl(dev, cmd, addr, flag, td)
int
vc_nb_poll(dev, events, td)
- dev_t dev;
+ struct cdev *dev;
int events;
struct thread *td;
{
diff --git a/sys/fs/coda/coda_psdev.h b/sys/fs/coda/coda_psdev.h
index c6ecf7f..f135b34 100644
--- a/sys/fs/coda/coda_psdev.h
+++ b/sys/fs/coda/coda_psdev.h
@@ -31,9 +31,9 @@
*
*/
-int vc_nb_open(dev_t dev, int flag, int mode, struct thread *p);
-int vc_nb_close (dev_t dev, int flag, int mode, struct thread *p);
-int vc_nb_read(dev_t dev, struct uio *uiop, int flag);
-int vc_nb_write(dev_t dev, struct uio *uiop, int flag);
-int vc_nb_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *p);
-int vc_nb_poll(dev_t dev, int events, struct thread *p);
+int vc_nb_open(struct cdev *dev, int flag, int mode, struct thread *p);
+int vc_nb_close (struct cdev *dev, int flag, int mode, struct thread *p);
+int vc_nb_read(struct cdev *dev, struct uio *uiop, int flag);
+int vc_nb_write(struct cdev *dev, struct uio *uiop, int flag);
+int vc_nb_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *p);
+int vc_nb_poll(struct cdev *dev, int events, struct thread *p);
diff --git a/sys/fs/coda/coda_venus.c b/sys/fs/coda/coda_venus.c
index 5105c0b..f0bc3c2 100644
--- a/sys/fs/coda/coda_venus.c
+++ b/sys/fs/coda/coda_venus.c
@@ -198,7 +198,7 @@ venus_root(void *mdp,
int
venus_open(void *mdp, CodaFid *fid, int flag,
struct ucred *cred, struct proc *p,
-/*out*/ dev_t *dev, ino_t *inode)
+/*out*/ struct cdev **dev, ino_t *inode)
{
int cflag;
DECL(coda_open); /* sets Isize & Osize */
diff --git a/sys/fs/coda/coda_venus.h b/sys/fs/coda/coda_venus.h
index b506b5b..473b84d 100644
--- a/sys/fs/coda/coda_venus.h
+++ b/sys/fs/coda/coda_venus.h
@@ -39,7 +39,7 @@ venus_root(void *mdp,
int
venus_open(void *mdp, CodaFid *fid, int flag,
struct ucred *cred, struct proc *p,
-/*out*/ dev_t *dev, ino_t *inode);
+/*out*/ struct cdev **dev, ino_t *inode);
int
venus_close(void *mdp, CodaFid *fid, int flag,
diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c
index ff64429..e7290e7 100644
--- a/sys/fs/coda/coda_vfsops.c
+++ b/sys/fs/coda/coda_vfsops.c
@@ -81,7 +81,7 @@ struct coda_op_stats coda_vfsopstats[CODA_VFSOPS_SIZE];
#define MRAK_INT_GEN(op) (coda_vfsopstats[op].gen_intrn++)
extern int coda_nc_initialized; /* Set if cache has been initialized */
-extern int vc_nb_open(dev_t, int, int, struct thread *);
+extern int vc_nb_open(struct cdev *, int, int, struct thread *);
int
coda_vfsopstats_init(void)
@@ -114,7 +114,7 @@ coda_mount(vfsp, path, data, ndp, td)
{
struct vnode *dvp;
struct cnode *cp;
- dev_t dev;
+ struct cdev *dev;
struct coda_mntinfo *mi;
struct vnode *rootvp;
CodaFid rootfid = INVAL_FID;
@@ -528,7 +528,7 @@ getNewVnode(vpp)
* device corresponds to a UFS. Return NULL if no device is found.
*/
struct mount *devtomp(dev)
- dev_t dev;
+ struct cdev *dev;
{
struct mount *mp;
diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c
index a1d24e9..a8666cc 100644
--- a/sys/fs/coda/coda_vnops.c
+++ b/sys/fs/coda/coda_vnops.c
@@ -238,7 +238,7 @@ coda_open(v)
/* locals */
int error;
struct vnode *vp;
- dev_t dev;
+ struct cdev *dev;
ino_t inode;
MARK_ENTRY(CODA_OPEN_STATS);
@@ -1806,7 +1806,7 @@ coda_islocked(v)
/* How one looks up a vnode given a device/inode pair: */
int
-coda_grab_vnode(dev_t dev, ino_t ino, struct vnode **vpp)
+coda_grab_vnode(struct cdev *dev, ino_t ino, struct vnode **vpp)
{
/* This is like VFS_VGET() or igetinode()! */
int error;
diff --git a/sys/fs/coda/coda_vnops.h b/sys/fs/coda/coda_vnops.h
index 8a3184b..88a398e 100644
--- a/sys/fs/coda/coda_vnops.h
+++ b/sys/fs/coda/coda_vnops.h
@@ -82,6 +82,6 @@ int coda_pathconf(void *);
int coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw,
int ioflag, struct ucred *cred, struct thread *td);
-int coda_grab_vnode(dev_t dev, ino_t ino, struct vnode **vpp);
+int coda_grab_vnode(struct cdev *dev, ino_t ino, struct vnode **vpp);
void print_vattr(struct vattr *attr);
void print_cred(struct ucred *cred);
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;
diff --git a/sys/fs/hpfs/hpfs.h b/sys/fs/hpfs/hpfs.h
index 9b4fd1d..c02862b 100644
--- a/sys/fs/hpfs/hpfs.h
+++ b/sys/fs/hpfs/hpfs.h
@@ -312,7 +312,7 @@ struct hpfsmount {
struct spblock hpm_sp;
struct mount * hpm_mp;
struct vnode * hpm_devvp;
- dev_t hpm_dev;
+ struct cdev *hpm_dev;
uid_t hpm_uid;
gid_t hpm_gid;
mode_t hpm_mode;
@@ -341,7 +341,7 @@ struct hpfsnode {
struct fnode h_fn;
struct vnode * h_vp;
struct vnode * h_devvp;
- dev_t h_dev;
+ struct cdev *h_dev;
lsn_t h_no;
uid_t h_uid;
gid_t h_gid;
@@ -390,9 +390,9 @@ extern vop_t ** hpfs_vnodeop_p;
/* Hash routines, too small to be separate header */
void hpfs_hphashinit(void);
void hpfs_hphashdestroy(void);
-struct hpfsnode *hpfs_hphashlookup(dev_t, lsn_t);
-struct hpfsnode *hpfs_hphashget(dev_t, lsn_t);
-int hpfs_hphashvget(dev_t, lsn_t, int, struct vnode **, struct thread *);
+struct hpfsnode *hpfs_hphashlookup(struct cdev *, lsn_t);
+struct hpfsnode *hpfs_hphashget(struct cdev *, lsn_t);
+int hpfs_hphashvget(struct cdev *, lsn_t, int, struct vnode **, struct thread *);
void hpfs_hphashins(register struct hpfsnode *);
void hpfs_hphashrem(register struct hpfsnode *);
extern struct lock hpfs_hphash_lock;
diff --git a/sys/fs/hpfs/hpfs_hash.c b/sys/fs/hpfs/hpfs_hash.c
index e76eaf7..e1cd079 100644
--- a/sys/fs/hpfs/hpfs_hash.c
+++ b/sys/fs/hpfs/hpfs_hash.c
@@ -82,7 +82,7 @@ hpfs_hphashdestroy(void)
*/
struct hpfsnode *
hpfs_hphashlookup(dev, ino)
- dev_t dev;
+ struct cdev *dev;
lsn_t ino;
{
struct hpfsnode *hp;
@@ -99,7 +99,7 @@ hpfs_hphashlookup(dev, ino)
#if 0
struct hpfsnode *
hpfs_hphashget(dev, ino)
- dev_t dev;
+ struct cdev *dev;
lsn_t ino;
{
struct hpfsnode *hp;
@@ -120,7 +120,7 @@ loop:
int
hpfs_hphashvget(dev, ino, flags, vpp, td)
- dev_t dev;
+ struct cdev *dev;
lsn_t ino;
int flags;
struct vnode **vpp;
diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c
index 86e8bc6..e9059d4e 100644
--- a/sys/fs/hpfs/hpfs_vfsops.c
+++ b/sys/fs/hpfs/hpfs_vfsops.c
@@ -217,7 +217,7 @@ hpfs_mountfs(devvp, mp, argsp, td)
struct hpfsmount *hpmp;
struct buf *bp = NULL;
struct vnode *vp;
- dev_t dev = devvp->v_rdev;
+ struct cdev *dev = devvp->v_rdev;
dprintf(("hpfs_mountfs():\n"));
/*
diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c
index ebf1319..6fa69bd 100644
--- a/sys/fs/msdosfs/msdosfs_denode.c
+++ b/sys/fs/msdosfs/msdosfs_denode.c
@@ -94,7 +94,7 @@ union _qcvt {
}
static struct denode *
- msdosfs_hashget(dev_t dev, u_long dirclust, u_long diroff);
+ msdosfs_hashget(struct cdev *dev, u_long dirclust, u_long diroff);
static void msdosfs_hashins(struct denode *dep);
static void msdosfs_hashrem(struct denode *dep);
@@ -133,7 +133,7 @@ msdosfs_uninit(vfsp)
static struct denode *
msdosfs_hashget(dev, dirclust, diroff)
- dev_t dev;
+ struct cdev *dev;
u_long dirclust;
u_long diroff;
{
@@ -215,7 +215,7 @@ deget(pmp, dirclust, diroffset, depp)
struct denode **depp; /* returns the addr of the gotten denode */
{
int error;
- dev_t dev = pmp->pm_dev;
+ struct cdev *dev = pmp->pm_dev;
struct mount *mntp = pmp->pm_mountp;
struct direntry *direntptr;
struct denode *ldep;
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index dd4512a..3ac0fb6 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -301,7 +301,7 @@ mountmsdosfs(devvp, mp, td, argp)
{
struct msdosfsmount *pmp;
struct buf *bp;
- dev_t dev = devvp->v_rdev;
+ struct cdev *dev = devvp->v_rdev;
union bootsector *bsp;
struct byte_bpb33 *b33;
struct byte_bpb50 *b50;
diff --git a/sys/fs/msdosfs/msdosfsmount.h b/sys/fs/msdosfs/msdosfsmount.h
index 2f35ecc..0ff712f 100644
--- a/sys/fs/msdosfs/msdosfsmount.h
+++ b/sys/fs/msdosfs/msdosfsmount.h
@@ -62,7 +62,7 @@ MALLOC_DECLARE(M_MSDOSFSMNT);
*/
struct msdosfsmount {
struct mount *pm_mountp;/* vfs mount struct for this fs */
- dev_t pm_dev; /* block special device mounted */
+ struct cdev *pm_dev; /* block special device mounted */
uid_t pm_uid; /* uid to set as owner of the files */
gid_t pm_gid; /* gid to set as owner of the files */
mode_t pm_mask; /* mask to and with file protection bits
diff --git a/sys/fs/ntfs/ntfs.h b/sys/fs/ntfs/ntfs.h
index 6e19029..1940ee9 100644
--- a/sys/fs/ntfs/ntfs.h
+++ b/sys/fs/ntfs/ntfs.h
@@ -241,7 +241,7 @@ struct bootfile {
struct ntfsmount {
struct mount *ntm_mountp; /* filesystem vfs structure */
struct bootfile ntm_bootfile;
- dev_t ntm_dev; /* device mounted */
+ struct cdev *ntm_dev; /* device mounted */
struct vnode *ntm_devvp; /* block device mounted vnode */
struct vnode *ntm_sysvn[NTFS_SYSNODESNUM];
u_int32_t ntm_bpmftrec;
diff --git a/sys/fs/ntfs/ntfs_ihash.c b/sys/fs/ntfs/ntfs_ihash.c
index e434eafb..dd9ec2d 100644
--- a/sys/fs/ntfs/ntfs_ihash.c
+++ b/sys/fs/ntfs/ntfs_ihash.c
@@ -83,7 +83,7 @@ ntfs_nthashdestroy(void)
*/
struct ntnode *
ntfs_nthashlookup(dev, inum)
- dev_t dev;
+ struct cdev *dev;
ino_t inum;
{
struct ntnode *ip;
diff --git a/sys/fs/ntfs/ntfs_ihash.h b/sys/fs/ntfs/ntfs_ihash.h
index eb3befd..7df7495 100644
--- a/sys/fs/ntfs/ntfs_ihash.h
+++ b/sys/fs/ntfs/ntfs_ihash.h
@@ -31,7 +31,7 @@
extern struct lock ntfs_hashlock;
void ntfs_nthashinit(void);
void ntfs_nthashdestroy(void);
-struct ntnode *ntfs_nthashlookup(dev_t, ino_t);
-struct ntnode *ntfs_nthashget(dev_t, ino_t);
+struct ntnode *ntfs_nthashlookup(struct cdev *, ino_t);
+struct ntnode *ntfs_nthashget(struct cdev *, ino_t);
void ntfs_nthashins(struct ntnode *);
void ntfs_nthashrem(register struct ntnode *);
diff --git a/sys/fs/ntfs/ntfs_inode.h b/sys/fs/ntfs/ntfs_inode.h
index 13ed443..c11cfa1 100644
--- a/sys/fs/ntfs/ntfs_inode.h
+++ b/sys/fs/ntfs/ntfs_inode.h
@@ -43,7 +43,7 @@
struct ntnode {
struct vnode *i_devvp; /* vnode of blk dev we live on */
- dev_t i_dev; /* Device associated with the inode. */
+ struct cdev *i_dev; /* Device associated with the inode. */
LIST_ENTRY(ntnode) i_hash;
struct ntnode *i_next;
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index a959e8c..924f06f 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -273,7 +273,7 @@ ntfs_mountfs(devvp, mp, argsp, td)
{
struct buf *bp;
struct ntfsmount *ntmp;
- dev_t dev = devvp->v_rdev;
+ struct cdev *dev = devvp->v_rdev;
int error, ronly, ncount, i;
struct vnode *vp;
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index a90233e..7d12a58 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -133,7 +133,7 @@ spec_open(ap)
{
struct thread *td = ap->a_td;
struct vnode *vp = ap->a_vp;
- dev_t dev = vp->v_rdev;
+ struct cdev *dev = vp->v_rdev;
int error;
struct cdevsw *dsw;
@@ -247,7 +247,7 @@ spec_read(ap)
struct vnode *vp;
struct thread *td;
struct uio *uio;
- dev_t dev;
+ struct cdev *dev;
int error, resid;
struct cdevsw *dsw;
@@ -263,7 +263,7 @@ spec_read(ap)
dsw = devsw(dev);
VOP_UNLOCK(vp, 0, td);
KASSERT(dev->si_refcount > 0,
- ("specread() on un-referenced dev_t (%s)", devtoname(dev)));
+ ("specread() on un-referenced struct cdev *(%s)", devtoname(dev)));
cdevsw_ref(dsw);
if (!(dsw->d_flags & D_NEEDGIANT)) {
DROP_GIANT();
@@ -294,7 +294,7 @@ spec_write(ap)
struct vnode *vp;
struct thread *td;
struct uio *uio;
- dev_t dev;
+ struct cdev *dev;
int error, resid;
struct cdevsw *dsw;
@@ -307,7 +307,7 @@ spec_write(ap)
VOP_UNLOCK(vp, 0, td);
KASSERT(dev->si_refcount > 0,
- ("spec_write() on un-referenced dev_t (%s)", devtoname(dev)));
+ ("spec_write() on un-referenced struct cdev *(%s)", devtoname(dev)));
cdevsw_ref(dsw);
if (!(dsw->d_flags & D_NEEDGIANT)) {
DROP_GIANT();
@@ -339,14 +339,14 @@ spec_ioctl(ap)
struct thread *a_td;
} */ *ap;
{
- dev_t dev;
+ struct cdev *dev;
int error;
struct cdevsw *dsw;
dev = ap->a_vp->v_rdev;
dsw = devsw(dev);
KASSERT(dev->si_refcount > 0,
- ("spec_ioctl() on un-referenced dev_t (%s)", devtoname(dev)));
+ ("spec_ioctl() on un-referenced struct cdev *(%s)", devtoname(dev)));
cdevsw_ref(dsw);
if (!(dsw->d_flags & D_NEEDGIANT)) {
DROP_GIANT();
@@ -372,14 +372,14 @@ spec_poll(ap)
struct thread *a_td;
} */ *ap;
{
- dev_t dev;
+ struct cdev *dev;
struct cdevsw *dsw;
int error;
dev = ap->a_vp->v_rdev;
dsw = devsw(dev);
KASSERT(dev->si_refcount > 0,
- ("spec_poll() on un-referenced dev_t (%s)", devtoname(dev)));
+ ("spec_poll() on un-referenced struct cdev *(%s)", devtoname(dev)));
cdevsw_ref(dsw);
if (!(dsw->d_flags & D_NEEDGIANT)) {
/* XXX: not yet DROP_GIANT(); */
@@ -399,14 +399,14 @@ spec_kqfilter(ap)
struct knote *a_kn;
} */ *ap;
{
- dev_t dev;
+ struct cdev *dev;
struct cdevsw *dsw;
int error;
dev = ap->a_vp->v_rdev;
dsw = devsw(dev);
KASSERT(dev->si_refcount > 0,
- ("spec_kqfilter() on un-referenced dev_t (%s)", devtoname(dev)));
+ ("spec_kqfilter() on un-referenced struct cdev *(%s)", devtoname(dev)));
cdevsw_ref(dsw);
if (!(dsw->d_flags & D_NEEDGIANT)) {
DROP_GIANT();
@@ -572,7 +572,7 @@ spec_close(ap)
{
struct vnode *vp = ap->a_vp, *oldvp;
struct thread *td = ap->a_td;
- dev_t dev = vp->v_rdev;
+ struct cdev *dev = vp->v_rdev;
struct cdevsw *dsw;
int error;
@@ -627,7 +627,7 @@ spec_close(ap)
}
VI_UNLOCK(vp);
KASSERT(dev->si_refcount > 0,
- ("spec_close() on un-referenced dev_t (%s)", devtoname(dev)));
+ ("spec_close() on un-referenced struct cdev *(%s)", devtoname(dev)));
cdevsw_ref(dsw);
if (!(dsw->d_flags & D_NEEDGIANT)) {
DROP_GIANT();
diff --git a/sys/fs/udf/udf.h b/sys/fs/udf/udf.h
index 540a3a6..449c911 100644
--- a/sys/fs/udf/udf.h
+++ b/sys/fs/udf/udf.h
@@ -33,7 +33,7 @@ struct udf_node {
struct vnode *i_vnode;
struct vnode *i_devvp;
struct udf_mnt *udfmp;
- dev_t i_dev;
+ struct cdev *i_dev;
ino_t hash_id;
long diroff;
struct file_entry *fentry;
@@ -42,7 +42,7 @@ struct udf_node {
struct udf_mnt {
int im_flags;
struct mount *im_mountp;
- dev_t im_dev;
+ struct cdev *im_dev;
struct vnode *im_devvp;
int bsize;
int bshift;
OpenPOWER on IntegriCloud