diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2008-09-27 08:51:18 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2008-09-27 08:51:18 +0000 |
| commit | 6bfa9a2d66dd0e00182017d6741d44e54d0b2cca (patch) | |
| tree | dd0035910760a440d495b23940f57a42ed24ca85 /sys/dev/iscsi | |
| parent | 45cfb1dc538113eab50616b88da908b1bb728561 (diff) | |
Notes
Diffstat (limited to 'sys/dev/iscsi')
| -rw-r--r-- | sys/dev/iscsi/initiator/isc_cam.c | 2 | ||||
| -rw-r--r-- | sys/dev/iscsi/initiator/iscsi.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/iscsi/initiator/isc_cam.c b/sys/dev/iscsi/initiator/isc_cam.c index ed0b74af895f..d978db3a6813 100644 --- a/sys/dev/iscsi/initiator/isc_cam.c +++ b/sys/dev/iscsi/initiator/isc_cam.c @@ -142,7 +142,7 @@ ic_fullfeature(struct cdev *dev) isc_session_t *sp = (isc_session_t *)dev->si_drv2; debug_called(8); - sdebug(3, "dev=%d sc=%p", minor(dev), isp); + sdebug(3, "dev=%d sc=%p", dev2unit(dev), isp); sp->flags &= ~ISC_FFPHASE; sp->flags |= ISC_FFPWAIT; diff --git a/sys/dev/iscsi/initiator/iscsi.c b/sys/dev/iscsi/initiator/iscsi.c index a572ba960d2b..1b0b00cde93f 100644 --- a/sys/dev/iscsi/initiator/iscsi.c +++ b/sys/dev/iscsi/initiator/iscsi.c @@ -115,13 +115,13 @@ iscsi_open(struct cdev *dev, int flags, int otype, struct thread *td) { debug_called(8); - debug(7, "dev=%d", minor(dev)); + debug(7, "dev=%d", dev2unit(dev)); - if(minor(dev) > MAX_SESSIONS) { + if(dev2unit(dev) > MAX_SESSIONS) { // should not happen return ENODEV; } - if(minor(dev) == MAX_SESSIONS) { + if(dev2unit(dev) == MAX_SESSIONS) { #if 1 struct isc_softc *sc = (struct isc_softc *)dev->si_drv1; @@ -144,12 +144,12 @@ iscsi_close(struct cdev *dev, int flag, int otyp, struct thread *td) debug(3, "flag=%x", flag); sc = (struct isc *)dev->si_drv1; - if(minor(dev) == MAX_SESSIONS) { + if(dev2unit(dev) == MAX_SESSIONS) { return 0; } sp = (isc_session_t *)dev->si_drv2; if(sp != NULL) { - sdebug(2, "session=%d flags=%x", minor(dev), sp->flags ); + sdebug(2, "session=%d flags=%x", dev2unit(dev), sp->flags ); /* | if still in full phase, this probably means | that something went realy bad. @@ -179,7 +179,7 @@ iscsi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int mode, struct thread * debug_called(8); error = 0; - if(minor(dev) == MAX_SESSIONS) { + if(dev2unit(dev) == MAX_SESSIONS) { /* | non Session commands */ @@ -205,7 +205,7 @@ iscsi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int mode, struct thread * if(sp == NULL) return ENXIO; - sdebug(6, "dev=%d cmd=%d", minor(dev), (int)(cmd & 0xff)); + sdebug(6, "dev=%d cmd=%d", dev2unit(dev), (int)(cmd & 0xff)); switch(cmd) { case ISCSISETSOC: @@ -285,7 +285,7 @@ iscsi_read(struct cdev *dev, struct uio *uio, int ioflag) sc = (struct isc_softc *)dev->si_drv1; sp = (isc_session_t *)dev->si_drv2; - if(minor(dev) == MAX_SESSIONS) { + if(dev2unit(dev) == MAX_SESSIONS) { sprintf(buf, "/----- Session ------/\n"); uiomove(buf, strlen(buf), uio); int i = 0; |
