summaryrefslogtreecommitdiffstats
path: root/sys/cam
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/cam
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/cam')
-rw-r--r--sys/cam/cam_xpt.c6
-rw-r--r--sys/cam/scsi/scsi_ch.c8
-rw-r--r--sys/cam/scsi/scsi_pass.c8
-rw-r--r--sys/cam/scsi/scsi_pt.c8
-rw-r--r--sys/cam/scsi/scsi_sa.c20
-rw-r--r--sys/cam/scsi/scsi_ses.c8
-rw-r--r--sys/cam/scsi/scsi_target.c18
7 files changed, 38 insertions, 38 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index 3cd6a8b..592809f 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -936,7 +936,7 @@ xptdone(struct cam_periph *periph, union ccb *done_ccb)
}
static int
-xptopen(dev_t dev, int flags, int fmt, struct thread *td)
+xptopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
int unit;
@@ -973,7 +973,7 @@ xptopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-xptclose(dev_t dev, int flag, int fmt, struct thread *td)
+xptclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
int unit;
@@ -996,7 +996,7 @@ xptclose(dev_t dev, int flag, int fmt, struct thread *td)
}
static int
-xptioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
+xptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
int unit, error;
diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c
index 7caaf0a..1cf3b1f 100644
--- a/sys/cam/scsi/scsi_ch.c
+++ b/sys/cam/scsi/scsi_ch.c
@@ -145,7 +145,7 @@ struct ch_softc {
ch_quirks quirks;
union ccb saved_ccb;
struct devstat *device_stats;
- dev_t dev;
+ struct cdev *dev;
int sc_picker; /* current picker */
@@ -405,7 +405,7 @@ chregister(struct cam_periph *periph, void *arg)
}
static int
-chopen(dev_t dev, int flags, int fmt, struct thread *td)
+chopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct ch_softc *softc;
@@ -453,7 +453,7 @@ chopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-chclose(dev_t dev, int flag, int fmt, struct thread *td)
+chclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct ch_softc *softc;
@@ -702,7 +702,7 @@ cherror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
}
static int
-chioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
+chioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
struct cam_periph *periph;
struct ch_softc *softc;
diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c
index 67c73d9..ec98f42 100644
--- a/sys/cam/scsi/scsi_pass.c
+++ b/sys/cam/scsi/scsi_pass.c
@@ -74,7 +74,7 @@ struct pass_softc {
u_int8_t pd_type;
union ccb saved_ccb;
struct devstat *device_stats;
- dev_t dev;
+ struct cdev *dev;
};
@@ -317,7 +317,7 @@ passregister(struct cam_periph *periph, void *arg)
}
static int
-passopen(dev_t dev, int flags, int fmt, struct thread *td)
+passopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct pass_softc *softc;
@@ -384,7 +384,7 @@ passopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-passclose(dev_t dev, int flag, int fmt, struct thread *td)
+passclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct pass_softc *softc;
@@ -446,7 +446,7 @@ passdone(struct cam_periph *periph, union ccb *done_ccb)
}
static int
-passioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
+passioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
struct cam_periph *periph;
struct pass_softc *softc;
diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c
index 9e053f8..94653b5 100644
--- a/sys/cam/scsi/scsi_pt.c
+++ b/sys/cam/scsi/scsi_pt.c
@@ -83,7 +83,7 @@ struct pt_softc {
pt_flags flags;
union ccb saved_ccb;
int io_timeout;
- dev_t dev;
+ struct cdev *dev;
};
static d_open_t ptopen;
@@ -134,7 +134,7 @@ static struct cdevsw pt_cdevsw = {
#endif
static int
-ptopen(dev_t dev, int flags, int fmt, struct thread *td)
+ptopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct pt_softc *softc;
@@ -178,7 +178,7 @@ ptopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-ptclose(dev_t dev, int flag, int fmt, struct thread *td)
+ptclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct pt_softc *softc;
@@ -645,7 +645,7 @@ pterror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
}
static int
-ptioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
+ptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
struct cam_periph *periph;
struct pt_softc *softc;
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index b1fbd22..4836b8a 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -192,11 +192,11 @@ typedef enum {
#define SA_NUM_MODES 4
struct sa_devs {
- dev_t ctl_dev;
+ struct cdev *ctl_dev;
struct sa_mode_devs {
- dev_t r_dev;
- dev_t nr_dev;
- dev_t er_dev;
+ struct cdev *r_dev;
+ struct cdev *nr_dev;
+ struct cdev *er_dev;
} mode_devs[SA_NUM_MODES];
};
@@ -398,7 +398,7 @@ static void saprevent(struct cam_periph *periph, int action);
static int sarewind(struct cam_periph *periph);
static int saspace(struct cam_periph *periph, int count,
scsi_space_code code);
-static int samount(struct cam_periph *, int, dev_t);
+static int samount(struct cam_periph *, int, struct cdev *);
static int saretension(struct cam_periph *periph);
static int sareservereleaseunit(struct cam_periph *periph,
int reserve);
@@ -437,7 +437,7 @@ static struct cdevsw sa_cdevsw = {
};
static int
-saopen(dev_t dev, int flags, int fmt, struct thread *td)
+saopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct sa_softc *softc;
@@ -497,7 +497,7 @@ saopen(dev_t dev, int flags, int fmt, struct thread *td)
}
static int
-saclose(dev_t dev, int flag, int fmt, struct thread *td)
+saclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct sa_softc *softc;
@@ -756,7 +756,7 @@ sastrategy(struct bio *bp)
}
static int
-saioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
+saioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
{
struct cam_periph *periph;
struct sa_softc *softc;
@@ -1473,7 +1473,7 @@ saregister(struct cam_periph *periph, void *arg)
* Make the (well known) aliases for the first mode.
*/
if (i == 0) {
- dev_t alias;
+ struct cdev *alias;
alias = make_dev_alias(softc->devs.mode_devs[i].r_dev,
"%s%d", periph->periph_name, periph->unit_number);
@@ -1777,7 +1777,7 @@ sadone(struct cam_periph *periph, union ccb *done_ccb)
* Mount the tape (make sure it's ready for I/O).
*/
static int
-samount(struct cam_periph *periph, int oflags, dev_t dev)
+samount(struct cam_periph *periph, int oflags, struct cdev *dev)
{
struct sa_softc *softc;
union ccb *ccb;
diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c
index a0a2f14..25b9489 100644
--- a/sys/cam/scsi/scsi_ses.c
+++ b/sys/cam/scsi/scsi_ses.c
@@ -145,7 +145,7 @@ struct ses_softc {
ses_encstat ses_encstat; /* overall status */
u_int8_t ses_flags;
union ccb ses_saved_ccb;
- dev_t ses_dev;
+ struct cdev *ses_dev;
struct cam_periph *periph;
};
#define SES_FLAG_INVALID 0x01
@@ -405,7 +405,7 @@ sesregister(struct cam_periph *periph, void *arg)
}
static int
-sesopen(dev_t dev, int flags, int fmt, struct thread *td)
+sesopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct ses_softc *softc;
@@ -461,7 +461,7 @@ out:
}
static int
-sesclose(dev_t dev, int flag, int fmt, struct thread *td)
+sesclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct cam_periph *periph;
struct ses_softc *softc;
@@ -517,7 +517,7 @@ seserror(union ccb *ccb, u_int32_t cflags, u_int32_t sflags)
}
static int
-sesioctl(dev_t dev, u_long cmd, caddr_t arg_addr, int flag, struct thread *td)
+sesioctl(struct cdev *dev, u_long cmd, caddr_t arg_addr, int flag, struct thread *td)
{
struct cam_periph *periph;
ses_encstat tmp;
diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c
index 9310efe..f3739ea 100644
--- a/sys/cam/scsi/scsi_target.c
+++ b/sys/cam/scsi/scsi_target.c
@@ -142,7 +142,7 @@ static struct targ_cmd_descr *
targgetdescr(struct targ_softc *softc);
static periph_init_t targinit;
static void targclone(void *arg, char *name, int namelen,
- dev_t *dev);
+ struct cdev **dev);
static void targasync(void *callback_arg, u_int32_t code,
struct cam_path *path, void *arg);
static void abort_all_pending(struct targ_softc *softc);
@@ -165,7 +165,7 @@ static MALLOC_DEFINE(M_TARG, "TARG", "TARG data");
/* Create softc and initialize it. Only one proc can open each targ device. */
static int
-targopen(dev_t dev, int flags, int fmt, struct thread *td)
+targopen(struct cdev *dev, int flags, int fmt, struct thread *td)
{
struct targ_softc *softc;
@@ -202,7 +202,7 @@ targopen(dev_t dev, int flags, int fmt, struct thread *td)
/* Disable LUN if enabled and teardown softc */
static int
-targclose(dev_t dev, int flag, int fmt, struct thread *td)
+targclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct targ_softc *softc;
int error;
@@ -230,7 +230,7 @@ targclose(dev_t dev, int flag, int fmt, struct thread *td)
/* Enable/disable LUNs, set debugging level */
static int
-targioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
+targioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
{
struct targ_softc *softc;
cam_status status;
@@ -303,7 +303,7 @@ targioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
/* Writes are always ready, reads wait for user_ccb_queue or abort_queue */
static int
-targpoll(dev_t dev, int poll_events, struct thread *td)
+targpoll(struct cdev *dev, int poll_events, struct thread *td)
{
struct targ_softc *softc;
int revents;
@@ -329,7 +329,7 @@ targpoll(dev_t dev, int poll_events, struct thread *td)
}
static int
-targkqfilter(dev_t dev, struct knote *kn)
+targkqfilter(struct cdev *dev, struct knote *kn)
{
struct targ_softc *softc;
@@ -534,7 +534,7 @@ targdtor(struct cam_periph *periph)
/* Receive CCBs from user mode proc and send them to the HBA */
static int
-targwrite(dev_t dev, struct uio *uio, int ioflag)
+targwrite(struct cdev *dev, struct uio *uio, int ioflag)
{
union ccb *user_ccb;
struct targ_softc *softc;
@@ -835,7 +835,7 @@ targdone(struct cam_periph *periph, union ccb *done_ccb)
/* Return CCBs to the user from the user queue and abort queue */
static int
-targread(dev_t dev, struct uio *uio, int ioflag)
+targread(struct cdev *dev, struct uio *uio, int ioflag)
{
struct descr_queue *abort_queue;
struct targ_cmd_descr *user_descr;
@@ -1031,7 +1031,7 @@ targinit(void)
}
static void
-targclone(void *arg, char *name, int namelen, dev_t *dev)
+targclone(void *arg, char *name, int namelen, struct cdev **dev)
{
int u;
OpenPOWER on IntegriCloud