From 0fa274524ae4e828eb84b6b9ae18a3238f79c83d Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Wed, 22 Mar 2006 01:30:07 +0000 Subject: [PATCH] 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. --- share/examples/scsi_target/scsi_cmds.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/examples/scsi_target/scsi_cmds.c b/share/examples/scsi_target/scsi_cmds.c index 3e152aabe42..33d1ceca6a2 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 },