Changeset 70688 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Jan 22, 2018 7:38:45 PM (7 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r69500 r70688 444 444 } 445 445 446 /** 447 * @interface_method_impl{VSCSILUNIOCALLBACKS,pfnVScsiLunQueryInqStrings} 448 */ 449 static DECLCALLBACK(int) drvscsiQueryInqStrings(VSCSILUN hVScsiLun, void *pvScsiLunUser, const char **ppszVendorId, 450 const char **ppszProductId, const char **ppszProductLevel) 451 { 452 RT_NOREF(hVScsiLun); 453 PDRVSCSI pThis = (PDRVSCSI)pvScsiLunUser; 454 455 if (pThis->pDevMediaPort->pfnQueryScsiInqStrings) 456 return pThis->pDevMediaPort->pfnQueryScsiInqStrings(pThis->pDevMediaPort, ppszVendorId, 457 ppszProductId, ppszProductLevel); 458 459 return VERR_NOT_FOUND; 460 } 446 461 447 462 /* -=-=-=-=- IPortEx -=-=-=-=- */ … … 1416 1431 pThis->VScsiIoCallbacks.pfnVScsiLunGetFeatureFlags = drvscsiGetFeatureFlags; 1417 1432 pThis->VScsiIoCallbacks.pfnVScsiLunMediumSetLock = drvscsiSetLock; 1433 pThis->VScsiIoCallbacks.pfnVScsiLunQueryInqStrings = drvscsiQueryInqStrings; 1418 1434 1419 1435 rc = VSCSIDeviceCreate(&pThis->hVScsiDevice, drvscsiIoReqVScsiReqCompleted, pThis); -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
r69500 r70688 629 629 * @returns VBox status code. 630 630 * @param pVScsiLun The LUN. 631 * @param p VScsiIoReq The I/O request to enqueue.631 * @param pfFeatures Where to sthre supported flags on success. 632 632 */ 633 633 DECLINLINE(int) vscsiLunGetFeatureFlags(PVSCSILUNINT pVScsiLun, uint64_t *pfFeatures) … … 639 639 640 640 /** 641 * Wrapper for the query INQUIRY strings I/O callback. 642 * 643 * @returns VBox status code. 644 * @param pVScsiLun The LUN. 645 * @param ppszVendorId Where to store the pointer to the vendor ID string to report. 646 * @param ppszProductId Where to store the pointer to the product ID string to report. 647 * @param ppszProductLevel Where to store the pointer to the revision string to report. 648 */ 649 DECLINLINE(int) vscsiLunQueryInqStrings(PVSCSILUNINT pVScsiLun, const char **ppszVendorId, 650 const char **ppszProductId, const char **ppszProductLevel) 651 { 652 if (pVScsiLun->pVScsiLunIoCallbacks->pfnVScsiLunQueryInqStrings) 653 { 654 return pVScsiLun->pVScsiLunIoCallbacks->pfnVScsiLunQueryInqStrings(pVScsiLun, 655 pVScsiLun->pvVScsiLunUser, 656 ppszVendorId, ppszProductId, 657 ppszProductLevel); 658 } 659 660 return VERR_NOT_FOUND; 661 } 662 663 /** 641 664 * Wrapper around vscsiReqSenseOkSet() 642 665 */ -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp
r69500 r70688 1103 1103 ScsiInquiryReply.fCmdQue = 1; /* Command queuing supported. */ 1104 1104 ScsiInquiryReply.fWBus16 = 1; 1105 scsiPadStrS(ScsiInquiryReply.achVendorId, "VBOX", 8); 1106 scsiPadStrS(ScsiInquiryReply.achProductId, "CD-ROM", 16); 1107 scsiPadStrS(ScsiInquiryReply.achProductLevel, "1.0", 4); 1105 1106 const char *pszVendorId = "VBOX"; 1107 const char *pszProductId = "CD-ROM"; 1108 const char *pszProductLevel = "1.0"; 1109 int rcTmp = vscsiLunQueryInqStrings(pVScsiLun, &pszVendorId, &pszProductId, &pszProductLevel); 1110 Assert(RT_SUCCESS(rcTmp) || rcTmp == VERR_NOT_FOUND); 1111 1112 scsiPadStrS(ScsiInquiryReply.achVendorId, pszVendorId, 8); 1113 scsiPadStrS(ScsiInquiryReply.achProductId, pszProductId, 16); 1114 scsiPadStrS(ScsiInquiryReply.achProductLevel, pszProductLevel, 4); 1108 1115 1109 1116 RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, (uint8_t *)&ScsiInquiryReply, sizeof(SCSIINQUIRYDATA)); -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp
r69500 r70688 231 231 ScsiInquiryReply.fCmdQue = 1; /* Command queuing supported. */ 232 232 ScsiInquiryReply.fWBus16 = 1; 233 scsiPadStrS(ScsiInquiryReply.achVendorId, "VBOX", 8); 234 scsiPadStrS(ScsiInquiryReply.achProductId, "HARDDISK", 16); 235 scsiPadStrS(ScsiInquiryReply.achProductLevel, "1.0", 4); 233 234 const char *pszVendorId = "VBOX"; 235 const char *pszProductId = "HARDDISK"; 236 const char *pszProductLevel = "1.0"; 237 int rcTmp = vscsiLunQueryInqStrings(pVScsiLun, &pszVendorId, &pszProductId, &pszProductLevel); 238 Assert(RT_SUCCESS(rcTmp) || rcTmp == VERR_NOT_FOUND); 239 240 scsiPadStrS(ScsiInquiryReply.achVendorId, pszVendorId, 8); 241 scsiPadStrS(ScsiInquiryReply.achProductId, pszProductId, 16); 242 scsiPadStrS(ScsiInquiryReply.achProductLevel, pszProductLevel, 4); 236 243 237 244 RTSgBufCopyFromBuf(&pVScsiReq->SgBuf, (uint8_t *)&ScsiInquiryReply, sizeof(SCSIINQUIRYDATA));
Note:
See TracChangeset
for help on using the changeset viewer.