Changeset 43662 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Oct 16, 2012 8:18:09 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp
r43640 r43662 60 60 61 61 62 /* Fabricate TOC information. */62 /* Fabricate normal TOC information. */ 63 63 static int mmcReadTOCNormal(PVSCSILUNINT pVScsiLun, PVSCSIREQINT pVScsiReq, uint16_t cbMaxTransfer, bool fMSF) 64 64 { … … 120 120 121 121 RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, aReply, cbMaxTransfer); 122 123 return vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq); 124 } 125 126 /* Fabricate session information. */ 127 static int mmcReadTOCMulti(PVSCSILUNINT pVScsiLun, PVSCSIREQINT pVScsiReq, uint16_t cbMaxTransfer, bool fMSF) 128 { 129 PVSCSILUNMMC pVScsiLunMmc = (PVSCSILUNMMC)pVScsiLun; 130 uint8_t aReply[32]; 131 uint8_t *pbBuf = aReply; 132 133 /* multi session: only a single session defined */ 134 memset(pbBuf, 0, 12); 135 pbBuf[1] = 0x0a; 136 pbBuf[2] = 0x01; /* first complete session number */ 137 pbBuf[3] = 0x01; /* last complete session number */ 138 pbBuf[5] = 0x14; /* ADR, CONTROL */ 139 pbBuf[6] = 1; /* first track in last complete session */ 140 141 if (fMSF) 142 { 143 pbBuf[8] = 0; /* reserved */ 144 mmcLBA2MSF(pbBuf + 8, 0); 145 } 146 else 147 { 148 /* sector 0 */ 149 vscsiH2BEU32(pbBuf + 8, 0); 150 } 151 152 RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, aReply, 12); 122 153 123 154 return vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq); … … 394 425 case 0x00: 395 426 mmcReadTOCNormal(pVScsiLun, pVScsiReq, cbMax, fMSF); 427 break; 428 case 0x01: 429 mmcReadTOCMulti(pVScsiLun, pVScsiReq, cbMax, fMSF); 396 430 break; 397 431 default:
Note:
See TracChangeset
for help on using the changeset viewer.