소스 검색

Fix Apple vendor mode page sending (#272)

Apparently there was a mistake between || and && that caused
Apple vendor page to be sent even when Apple quirks were disabled
and when it wouldn't fit the buffer.
Petteri Aimonen 2 년 전
부모
커밋
0abf488eeb
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 4
      lib/SCSI2SD/src/firmware/mode.c

+ 2 - 4
lib/SCSI2SD/src/firmware/mode.c

@@ -516,10 +516,8 @@ static void doModeSense(
 
 	idx += modeSenseCDCapabilitiesPage(pc, idx, pageCode, &pageFound);
 
-	if ((
-			(scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_APPLE) ||
-			(idx + sizeof(AppleVendorPage) <= allocLength)
-		) &&
+	if ((scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_APPLE) &&
+	    (idx + sizeof(AppleVendorPage) <= allocLength) &&
 		(pageCode == 0x30 || pageCode == 0x3F))
 	{
 		pageFound = 1;