VirtualBox

Ignore:
Timestamp:
Jan 22, 2018 7:38:45 PM (7 years ago)
Author:
vboxsync
Message:

VSCSI,DrvSCSI: Add method to query INQUIRY related data from the outside to overwrite defaults

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DrvSCSI.cpp

    r69500 r70688  
    444444}
    445445
     446/**
     447 * @interface_method_impl{VSCSILUNIOCALLBACKS,pfnVScsiLunQueryInqStrings}
     448 */
     449static 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}
    446461
    447462/* -=-=-=-=- IPortEx -=-=-=-=- */
     
    14161431    pThis->VScsiIoCallbacks.pfnVScsiLunGetFeatureFlags                   = drvscsiGetFeatureFlags;
    14171432    pThis->VScsiIoCallbacks.pfnVScsiLunMediumSetLock                     = drvscsiSetLock;
     1433    pThis->VScsiIoCallbacks.pfnVScsiLunQueryInqStrings                   = drvscsiQueryInqStrings;
    14181434
    14191435    rc = VSCSIDeviceCreate(&pThis->hVScsiDevice, drvscsiIoReqVScsiReqCompleted, pThis);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette