summaryrefslogtreecommitdiffstats
path: root/sys/dev/vinum
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/dev/vinum
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/dev/vinum')
-rw-r--r--sys/dev/vinum/vinum.c12
-rw-r--r--sys/dev/vinum/vinumext.h10
-rw-r--r--sys/dev/vinum/vinumioctl.c4
-rw-r--r--sys/dev/vinum/vinumobj.h8
-rw-r--r--sys/dev/vinum/vinumutil.c11
5 files changed, 25 insertions, 20 deletions
diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c
index 8e1bf36..3306c96 100644
--- a/sys/dev/vinum/vinum.c
+++ b/sys/dev/vinum/vinum.c
@@ -69,12 +69,12 @@ struct cdevsw vinum_cdevsw = {
/* Called by main() during pseudo-device attachment. */
void vinumattach(void *);
STATIC int vinum_modevent(module_t mod, modeventtype_t type, void *unused);
-STATIC void vinum_clone(void *arg, char *name, int namelen, dev_t * dev);
+STATIC void vinum_clone(void *arg, char *name, int namelen, struct cdev ** dev);
struct _vinum_conf vinum_conf; /* configuration information */
-dev_t vinum_daemon_dev;
-dev_t vinum_super_dev;
+struct cdev *vinum_daemon_dev;
+struct cdev *vinum_super_dev;
static eventhandler_tag dev_clone_tag;
@@ -334,7 +334,7 @@ DECLARE_MODULE(vinum, vinum_mod, SI_SUB_RAID, SI_ORDER_MIDDLE);
/* ARGSUSED */
/* Open a vinum object */
int
-vinumopen(dev_t dev,
+vinumopen(struct cdev *dev,
int flags,
int fmt,
struct thread *td)
@@ -437,7 +437,7 @@ vinumopen(dev_t dev,
/* ARGSUSED */
int
-vinumclose(dev_t dev,
+vinumclose(struct cdev *dev,
int flags,
int fmt,
struct thread *td)
@@ -517,7 +517,7 @@ vinumclose(dev_t dev,
}
void
-vinum_clone(void *arg, char *name, int namelen, dev_t * dev)
+vinum_clone(void *arg, char *name, int namelen, struct cdev ** dev)
{
struct volume *vol;
int i;
diff --git a/sys/dev/vinum/vinumext.h b/sys/dev/vinum/vinumext.h
index 86319f0..e60356c 100644
--- a/sys/dev/vinum/vinumext.h
+++ b/sys/dev/vinum/vinumext.h
@@ -141,13 +141,13 @@ d_close_t vinumclose;
d_strategy_t vinumstrategy;
d_ioctl_t vinumioctl;
-int vinum_super_ioctl(dev_t, u_long, caddr_t);
+int vinum_super_ioctl(struct cdev *, u_long, caddr_t);
int vinumstart(struct buf *bp, int reviveok);
int launch_requests(struct request *rq, int reviveok);
void sdio(struct buf *bp);
/* XXX Do we need this? */
-int vinumpart(dev_t);
+int vinumpart(struct cdev *);
extern jmp_buf command_fail; /* return here if config fails */
@@ -172,9 +172,9 @@ struct rqgroup *allocrqg(struct request *rq, int elements);
void deallocrqg(struct rqgroup *rqg);
/* Device number decoding */
-int Volno(dev_t x);
-int Plexno(dev_t x);
-int Sdno(dev_t x);
+int Volno(struct cdev *x);
+int Plexno(struct cdev *x);
+int Sdno(struct cdev *x);
/* State transitions */
int set_drive_state(int driveno, enum drivestate state, enum setstateflags flags);
diff --git a/sys/dev/vinum/vinumioctl.c b/sys/dev/vinum/vinumioctl.c
index f38017f..1783c92 100644
--- a/sys/dev/vinum/vinumioctl.c
+++ b/sys/dev/vinum/vinumioctl.c
@@ -65,7 +65,7 @@ jmp_buf command_fail; /* return on a failed command */
/* ioctl routine */
int
-vinumioctl(dev_t dev,
+vinumioctl(struct cdev *dev,
u_long cmd,
caddr_t data,
int flag,
@@ -178,7 +178,7 @@ vinumioctl(dev_t dev,
/* Handle ioctls for the super device */
int
-vinum_super_ioctl(dev_t dev,
+vinum_super_ioctl(struct cdev *dev,
u_long cmd,
caddr_t data)
{
diff --git a/sys/dev/vinum/vinumobj.h b/sys/dev/vinum/vinumobj.h
index 0d5b800..d6a4d87 100644
--- a/sys/dev/vinum/vinumobj.h
+++ b/sys/dev/vinum/vinumobj.h
@@ -184,7 +184,7 @@ struct _drive
#ifdef _KERNEL
u_int sectorsize;
off_t mediasize;
- dev_t dev; /* device information */
+ struct cdev *dev; /* device information */
#ifdef VINUMDEBUG
char lockfilename[16]; /* name of file from which we were locked */
int lockline; /* and the line number */
@@ -234,7 +234,7 @@ struct _sd
int init_interval; /* and time to wait between transfers */
#ifdef _KERNEL
struct request *waitlist; /* list of requests waiting on revive op */
- dev_t dev; /* associated device */
+ struct cdev *dev; /* associated device */
#endif
};
@@ -276,7 +276,7 @@ struct _plex
struct rangelock *lock; /* ranges of locked addresses */
struct mtx *lockmtx; /* lock mutex, one of plexmutex [] */
daddr_t last_addr; /* last address read from this plex */
- dev_t dev; /* associated device */
+ struct cdev *dev; /* associated device */
#endif
};
@@ -316,6 +316,6 @@ struct _volume
*/
int plex[MAXPLEX]; /* index of plexes */
#ifdef _KERNEL
- dev_t dev; /* associated device */
+ struct cdev *dev; /* associated device */
#endif
};
diff --git a/sys/dev/vinum/vinumutil.c b/sys/dev/vinum/vinumutil.c
index f597cd7..f63bbd7 100644
--- a/sys/dev/vinum/vinumutil.c
+++ b/sys/dev/vinum/vinumutil.c
@@ -243,12 +243,17 @@ sizespec(char *spec)
return -1;
}
+#ifdef _KERNEL
+#define FOOTYPE struct cdev *
+#else
+#define FOOTYPE dev_t
+#endif
/*
* Extract the volume number from a device number. Check that it's
* the correct type, and that it isn't one of the superdevs.
*/
int
-Volno(dev_t dev)
+Volno(FOOTYPE dev)
{
int volno = minor(dev);
@@ -269,7 +274,7 @@ Volno(dev_t dev)
* type. Return -1 for invalid types.
*/
int
-Plexno(dev_t dev)
+Plexno(FOOTYPE dev)
{
int plexno = minor(dev);
@@ -285,7 +290,7 @@ Plexno(dev_t dev)
* type. Return -1 for invalid types.
*/
int
-Sdno(dev_t dev)
+Sdno(FOOTYPE dev)
{
int sdno = minor(dev);
OpenPOWER on IntegriCloud