summaryrefslogtreecommitdiffstats
path: root/share/examples
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2006-03-22 01:30:07 +0000
committermjacob <mjacob@FreeBSD.org>2006-03-22 01:30:07 +0000
commitae57ffa860ad62b3441c0df48202d3a2b4c91269 (patch)
tree32b1927ee9121724bebd312529ebe845f16d8c19 /share/examples
parentb746cfb8d45d2a4b15b9955c5cb79cf42c3e9b3d (diff)
downloadFreeBSD-src-ae57ffa860ad62b3441c0df48202d3a2b4c91269.zip
FreeBSD-src-ae57ffa860ad62b3441c0df48202d3a2b4c91269.tar.gz
At least respond to REPORT LUNS with an ILLEGAL COMMAND response.
This keeps us from dumping core when modern OS' like Windows and Linux see us.
Diffstat (limited to 'share/examples')
-rw-r--r--share/examples/scsi_target/scsi_cmds.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/share/examples/scsi_target/scsi_cmds.c b/share/examples/scsi_target/scsi_cmds.c
index 3e152aa..33d1cec 100644
--- a/share/examples/scsi_target/scsi_cmds.c
+++ b/share/examples/scsi_target/scsi_cmds.c
@@ -48,6 +48,9 @@
typedef int targ_start_func(struct ccb_accept_tio *, struct ccb_scsiio *);
typedef void targ_done_func(struct ccb_accept_tio *, struct ccb_scsiio *,
io_ops);
+#ifndef REPORT_LUNS
+#define REPORT_LUNS 0xa0
+#endif
struct targ_cdb_handlers {
u_int8_t cmd;
@@ -87,7 +90,7 @@ static struct targ_cdb_handlers cdb_handlers[] = {
{ SYNCHRONIZE_CACHE, tcmd_null_ok, NULL },
{ MODE_SENSE_6, tcmd_illegal_req, NULL },
{ MODE_SELECT_6, tcmd_illegal_req, NULL },
- /* XXX REPORT_LUNS should be handled here. */
+ { REPORT_LUNS, tcmd_illegal_req, NULL },
#ifdef READ_16
{ READ_16, tcmd_rdwr, tcmd_rdwr_done },
{ WRITE_16, tcmd_rdwr, tcmd_rdwr_done },
OpenPOWER on IntegriCloud