diff options
-rw-r--r-- | sys/scsi/scsi_ioctl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index 41e48bf2fd6..2b71e9b017b 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_ioctl.c,v 1.27 2006/12/21 02:05:46 krw Exp $ */ +/* $OpenBSD: scsi_ioctl.c,v 1.28 2007/01/16 00:43:19 krw Exp $ */ /* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */ /* @@ -344,8 +344,12 @@ scsi_do_ioctl(struct scsi_link *sc_link, dev_t dev, u_long cmd, caddr_t addr, case SCIOCIDENTIFY: { struct scsi_addr *sca = (struct scsi_addr *)addr; - sca->type = (sc_link->flags & SDEV_ATAPI) - ? TYPE_ATAPI : TYPE_SCSI; + if ((sc_link->flags & (SDEV_ATAPI | SDEV_UMASS)) == 0) + /* A 'real' SCSI target. */ + sca->type = TYPE_SCSI; + else + /* An 'emulated' SCSI target. */ + sca->type = TYPE_ATAPI; sca->scbus = sc_link->scsibus; sca->target = sc_link->target; sca->lun = sc_link->lun; |