VirtualBox

Changeset 70777 in vbox


Ignore:
Timestamp:
Jan 28, 2018 10:02:45 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120550
Message:

Storage/tstVDIo: Allow loading plugins (like the crypto plugin) for testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/testcase/tstVDIo.cpp

    r69500 r70777  
    263263static DECLCALLBACK(int) vdScriptHandlerResize(PVDSCRIPTARG paScriptArgs, void *pvUser);
    264264static DECLCALLBACK(int) vdScriptHandlerSetFileBackend(PVDSCRIPTARG paScriptArgs, void *pvUser);
     265static DECLCALLBACK(int) vdScriptHandlerLoadPlugin(PVDSCRIPTARG paScriptArgs, void *pvUser);
    265266
    266267#ifdef VBOX_TSTVDIO_WITH_LOG_REPLAY
     
    475476{
    476477    VDSCRIPTTYPE_STRING /* new file backend */
     478};
     479
     480/* Load plugin. */
     481const VDSCRIPTTYPE g_aArgLoadPlugin[] =
     482{
     483    VDSCRIPTTYPE_STRING /* plugin name */
    477484};
    478485
     
    509516    {"resize",                     VDSCRIPTTYPE_VOID, g_aArgResize,                      RT_ELEMENTS(g_aArgResize),                     vdScriptHandlerResize},
    510517    {"setfilebackend",             VDSCRIPTTYPE_VOID, g_aArgSetFileBackend,              RT_ELEMENTS(g_aArgSetFileBackend),             vdScriptHandlerSetFileBackend},
     518    {"loadplugin",                 VDSCRIPTTYPE_VOID, g_aArgLoadPlugin,                  RT_ELEMENTS(g_aArgLoadPlugin),                 vdScriptHandlerLoadPlugin}
    511519};
    512520
     
    20422050}
    20432051
     2052static DECLCALLBACK(int) vdScriptHandlerLoadPlugin(PVDSCRIPTARG paScriptArgs, void *pvUser)
     2053{
     2054    RT_NOREF(pvUser);
     2055    const char *pcszPlugin = paScriptArgs[0].psz;
     2056
     2057    return VDPluginLoadFromFilename(pcszPlugin);
     2058}
     2059
    20442060static DECLCALLBACK(int) tstVDIoFileOpen(void *pvUser, const char *pszLocation,
    20452061                                         uint32_t fOpen,
Note: See TracChangeset for help on using the changeset viewer.

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