Changeset 46597 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jun 17, 2013 3:43:04 PM (11 years ago)
- Location:
- trunk/src/VBox/Devices/Storage/VSCSI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp
r44528 r46597 262 262 uint8_t aReply[24]; 263 263 uint8_t *pu8ReplyPos; 264 bool fValid = false; 264 265 265 266 memset(aReply, 0, sizeof(aReply)); … … 277 278 *pu8ReplyPos++ = 0x12; /* Size of the page. */ 278 279 *pu8ReplyPos++ = 0x4; /* Write cache enabled. */ 279 } 280 281 RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, aReply, sizeof(aReply)); 282 rcReq = vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq); 280 fValid = true; 281 } else if (uModePage == 0) { 282 fValid = true; 283 } 284 285 /* Querying unknown pages must fail. */ 286 if (fValid) { 287 RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, aReply, sizeof(aReply)); 288 rcReq = vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq); 289 } else { 290 rcReq = vscsiLunReqSenseErrorSet(pVScsiLun, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST, SCSI_ASC_INV_FIELD_IN_CMD_PACKET, 0x00); 291 } 283 292 break; 284 293 } -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp
r46400 r46597 256 256 uint8_t aReply[24]; 257 257 uint8_t *pu8ReplyPos; 258 bool fValid = false; 258 259 259 260 memset(aReply, 0, sizeof(aReply)); … … 274 275 *pu8ReplyPos++ = 0x12; /* Size of the page. */ 275 276 *pu8ReplyPos++ = 0x4; /* Write cache enabled. */ 276 } 277 278 RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, aReply, sizeof(aReply)); 279 rcReq = vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq); 277 fValid = true; 278 } else if (uModePage == 0) { 279 fValid = 0; 280 } 281 282 /* Querying unknown pages must fail. */ 283 if (fValid) { 284 RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, aReply, sizeof(aReply)); 285 rcReq = vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq); 286 } else { 287 rcReq = vscsiLunReqSenseErrorSet(pVScsiLun, pVScsiReq, SCSI_SENSE_ILLEGAL_REQUEST, SCSI_ASC_INV_FIELD_IN_CMD_PACKET, 0x00); 288 } 280 289 break; 281 290 }
Note:
See TracChangeset
for help on using the changeset viewer.