[hatari-devel] Rejecting requests for MODE SENSE subpages

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hello,

it would be convenient if Hatari was rejecting requests for MODE SENSE
subpages, because subpages are not supported by Hatari.
The attached patch contains the required changes.

Best regards

Uwe
diff --git a/src/hdc.c b/src/hdc.c
index 424bc081..30ed49f0 100644
--- a/src/hdc.c
+++ b/src/hdc.c
@@ -402,6 +402,13 @@ static void HDC_Cmd_ModeSense(SCSI_CTRLR *ctr)
 
 	dev->bSetLastBlockAddr = false;
 
+	// Subpages are not supported
+	if(ctr->command[3]) {
+		ctr->status = HD_STATUS_ERROR;
+		dev->nLastError = HD_REQSENS_INVARG;
+		return;
+	}
+
 	switch(ctr->command[2])
 	{
 	 case 0x00:


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/