[hatari-devel] Rejecting requests for MODE SENSE subpages |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: [hatari-devel] Rejecting requests for MODE SENSE subpages
- From: Uwe Seimet <Uwe.Seimet@xxxxxxxxx>
- Date: Fri, 25 Oct 2024 20:57:29 +0200
- Arc-authentication-results: i=1; strato.com; arc=none; dkim=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1729882663; s=strato-dkim-0002; d=strato.com; h=Message-ID:Subject:To:From:Date:Cc:Date:From:Subject:Sender; bh=MEUNmwKwJRsd+p874wEx7zz19QZiufNwl2eRFe17hOU=; b=lUcV71sqvWbywPHjAYHYaa8mvy66yfxwxhivhRJ0t894IWCGC0tyidkRjdDSACflvw k1jyfS7gGI0OFmuY0Edsd6F4V5+PgpvnFgCOk0MKpDxNJHWEyMgz0rhf/DObBKaWfBSS CQO74IYadoQALsKEDGy7sg/Mq90ELOGHIcIT/RCxTQULeiz3Jlc4dtBM0GXZnMN4X0KU LG9JRtcaFPGZq6OXcgTJ87Y7ybzxQbdkBxmb7zK2fD1BsB8kWj6l/IqzOV6bWfpsfRUg LgGkSyD1eiRvHXtRn2WrCwK2aBfSLHv5/JjURfrAvTdKxEDs/FwqcoYTnseCkKn9mbDA Lirw==
- Arc-seal: i=1; a=rsa-sha256; t=1729882663; cv=none; d=strato.com; s=strato-dkim-0002; b=Ajvu5k/EEozVZlKg8E3bN8x+lxy0S6iC3xZFDhAvBs4m90T/SJmvyQ5ZhLMciW9Ti0 XIH8kPyKlekQ8hAcu9OPczY1nUmNYPqMch8fdfx59o41lOaIfyUPmP4gixj91O4w+K6g XJBK6JM+PpuOdeC34X8NjayUmXhbgGEvVb3NExbvuLE/uu5O34+0VQDQocAX5PH8hQf9 3aZ5CJuxr6RlxgtpT0A8FUf25IHXC0wAaUVz6eO6TbiSbyxuXCGXpOKkKj7HRxa2kBd3 KeF9qoCMX93DQhx2OgR0tfX+P5CgeSEW+2+haF9qthyn78J7y8z3GA6xy1tqCmGJ4jSg a9WA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1729882663; s=strato-dkim-0002; d=seimet.de; h=Message-ID:Subject:To:From:Date:Cc:Date:From:Subject:Sender; bh=MEUNmwKwJRsd+p874wEx7zz19QZiufNwl2eRFe17hOU=; b=nOiAXywNnIYWGrB5FM/qgA++yjnrOeayrFJvEMoV1Jvsco2ROqZNAjAk0e4UnMQRvB owFrEym5C5aGm6qOqduGW+IncIgoDSECpxB7fjN44Ht8uZ2XekC3/AG56SraU0dugfRG oW6XgGsXS9sAQ8RIpwxoCubcvRc/5o2wrNY5R7LcYOVCk5+rXd02fHSctIQpn42cfIrR rQjCsslI5Uhzi3BOkVF9084VanrWsd2CheXYkl3L7Odp7Qv+wrth5KVyFnhAjylo5eUB mF5zf+M2Wwe72FMhSu5s3eshhu3J5T84m1u/5KvexrovbBeJIIWGcY1KVpKqoBxBr8fG 4rxA==
- Dkim-signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1729882663; s=strato-dkim-0003; d=seimet.de; h=Message-ID:Subject:To:From:Date:Cc:Date:From:Subject:Sender; bh=MEUNmwKwJRsd+p874wEx7zz19QZiufNwl2eRFe17hOU=; b=78846cSEq9x3Jiv+CPGZR7Y+QkWO81+OI0mnavR8lKNDGQvdshKuAb87XSsJrchCnj 7cHM5VOV14B/M5HFKiCQ==
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: