VirtualBox

Changeset 63781 in vbox


Ignore:
Timestamp:
Sep 9, 2016 9:05:41 PM (8 years ago)
Author:
vboxsync
Message:

Storage/VD: Rename VBOXHDDBACKEND to VDIMAGEBACKEND to follow the naming scheme used for the other backend types (cache and filter)

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vd-image-backend.h

    r62476 r63781  
    6161 * Image format backend interface used by VBox HDD Container implementation.
    6262 */
    63 typedef struct VBOXHDDBACKEND
     63typedef struct VDIMAGEBACKEND
    6464{
    6565    /**
     
    585585                                                    PVDINTERFACE pVDIfsOperation));
    586586
    587 } VBOXHDDBACKEND;
     587} VDIMAGEBACKEND;
    588588
    589589/** Pointer to VD backend. */
    590 typedef VBOXHDDBACKEND *PVBOXHDDBACKEND;
     590typedef VDIMAGEBACKEND *PVDIMAGEBACKEND;
    591591/** Constant pointer to VD backend. */
    592 typedef const VBOXHDDBACKEND *PCVBOXHDDBACKEND;
     592typedef const VDIMAGEBACKEND *PCVDIMAGEBACKEND;
    593593
    594594/** @copydoc VBOXHDDBACKEND::pfnComposeLocation */
  • trunk/include/VBox/vd-plugin.h

    r62476 r63781  
    4444     * @param   pBackend  The image backend to register.
    4545     */
    46     DECLR3CALLBACKMEMBER(int, pfnRegisterImage, (void *pvUser, PCVBOXHDDBACKEND pBackend));
     46    DECLR3CALLBACKMEMBER(int, pfnRegisterImage, (void *pvUser, PCVDIMAGEBACKEND pBackend));
    4747
    4848    /**
  • trunk/src/VBox/Storage/DMG.cpp

    r63567 r63781  
    25092509
    25102510
    2511 const VBOXHDDBACKEND g_DmgBackend =
     2511const VDIMAGEBACKEND g_DmgBackend =
    25122512{
    25132513    /* pszBackendName */
    25142514    "DMG",
    25152515    /* cbSize */
    2516     sizeof(VBOXHDDBACKEND),
     2516    sizeof(VDIMAGEBACKEND),
    25172517    /* uBackendCaps */
    25182518    VD_CAP_FILE | VD_CAP_VFS,
  • trunk/src/VBox/Storage/ISCSI.cpp

    r62750 r63781  
    55785578
    55795579
    5580 const VBOXHDDBACKEND g_ISCSIBackend =
     5580const VDIMAGEBACKEND g_ISCSIBackend =
    55815581{
    55825582    /* pszBackendName */
    55835583    "iSCSI",
    55845584    /* cbSize */
    5585     sizeof(VBOXHDDBACKEND),
     5585    sizeof(VDIMAGEBACKEND),
    55865586    /* uBackendCaps */
    55875587    VD_CAP_CONFIG | VD_CAP_TCPNET | VD_CAP_ASYNC,
  • trunk/src/VBox/Storage/Parallels.cpp

    r63780 r63781  
    10671067
    10681068
    1069 const VBOXHDDBACKEND g_ParallelsBackend =
     1069const VDIMAGEBACKEND g_ParallelsBackend =
    10701070{
    10711071    /* pszBackendName */
    10721072    "Parallels",
    10731073    /* cbSize */
    1074     sizeof(VBOXHDDBACKEND),
     1074    sizeof(VDIMAGEBACKEND),
    10751075    /* uBackendCaps */
    10761076    VD_CAP_FILE | VD_CAP_ASYNC | VD_CAP_VFS | VD_CAP_CREATE_DYNAMIC | VD_CAP_DIFF,
  • trunk/src/VBox/Storage/QCOW.cpp

    r63741 r63781  
    25792579
    25802580
    2581 const VBOXHDDBACKEND g_QCowBackend =
     2581const VDIMAGEBACKEND g_QCowBackend =
    25822582{
    25832583    /* pszBackendName */
    25842584    "QCOW",
    25852585    /* cbSize */
    2586     sizeof(VBOXHDDBACKEND),
     2586    sizeof(VDIMAGEBACKEND),
    25872587    /* uBackendCaps */
    25882588    VD_CAP_FILE | VD_CAP_VFS | VD_CAP_CREATE_DYNAMIC | VD_CAP_DIFF | VD_CAP_ASYNC,
  • trunk/src/VBox/Storage/QED.cpp

    r63741 r63781  
    26062606
    26072607
    2608 const VBOXHDDBACKEND g_QedBackend =
     2608const VDIMAGEBACKEND g_QedBackend =
    26092609{
    26102610    /* pszBackendName */
    26112611    "QED",
    26122612    /* cbSize */
    2613     sizeof(VBOXHDDBACKEND),
     2613    sizeof(VDIMAGEBACKEND),
    26142614    /* uBackendCaps */
    26152615    VD_CAP_FILE | VD_CAP_VFS | VD_CAP_CREATE_DYNAMIC | VD_CAP_DIFF | VD_CAP_ASYNC,
  • trunk/src/VBox/Storage/RAW.cpp

    r62747 r63781  
    11431143
    11441144
    1145 const VBOXHDDBACKEND g_RawBackend =
     1145const VDIMAGEBACKEND g_RawBackend =
    11461146{
    11471147    /* pszBackendName */
    11481148    "RAW",
    11491149    /* cbSize */
    1150     sizeof(VBOXHDDBACKEND),
     1150    sizeof(VDIMAGEBACKEND),
    11511151    /* uBackendCaps */
    11521152    VD_CAP_CREATE_FIXED | VD_CAP_FILE | VD_CAP_ASYNC | VD_CAP_VFS,
  • trunk/src/VBox/Storage/VD.cpp

    r63733 r63781  
    123123
    124124    /** Function pointers for the various backend methods. */
    125     PCVBOXHDDBACKEND    Backend;
     125    PCVDIMAGEBACKEND    Backend;
    126126    /** Pointer to list of VD interfaces, per-image. */
    127127    PVDINTERFACE        pVDIfsImage;
     
    625625static unsigned g_cBackends = 0;
    626626/** Array of pointers to the image backends. */
    627 static PCVBOXHDDBACKEND *g_apBackends = NULL;
     627static PCVDIMAGEBACKEND *g_apBackends = NULL;
    628628/** Array of handles to the corresponding plugin. */
    629629static RTLDRMOD *g_ahBackendPlugins = NULL;
    630630/** Builtin image backends. */
    631 static PCVBOXHDDBACKEND aStaticBackends[] =
     631static PCVDIMAGEBACKEND aStaticBackends[] =
    632632{
    633633    &g_VmdkBackend,
     
    674674 * internal: add several backends.
    675675 */
    676 static int vdAddBackends(RTLDRMOD hPlugin, PCVBOXHDDBACKEND *ppBackends, unsigned cBackends)
    677 {
    678     PCVBOXHDDBACKEND *pTmp = (PCVBOXHDDBACKEND*)RTMemRealloc(g_apBackends,
    679            (g_cBackends + cBackends) * sizeof(PCVBOXHDDBACKEND));
     676static int vdAddBackends(RTLDRMOD hPlugin, PCVDIMAGEBACKEND *ppBackends, unsigned cBackends)
     677{
     678    PCVDIMAGEBACKEND *pTmp = (PCVDIMAGEBACKEND *)RTMemRealloc(g_apBackends,
     679           (g_cBackends + cBackends) * sizeof(PCVDIMAGEBACKEND));
    680680    if (RT_UNLIKELY(!pTmp))
    681681        return VERR_NO_MEMORY;
     
    687687        return VERR_NO_MEMORY;
    688688    g_ahBackendPlugins = pTmpPlugins;
    689     memcpy(&g_apBackends[g_cBackends], ppBackends, cBackends * sizeof(PCVBOXHDDBACKEND));
     689    memcpy(&g_apBackends[g_cBackends], ppBackends, cBackends * sizeof(PCVDIMAGEBACKEND));
    690690    for (unsigned i = g_cBackends; i < g_cBackends + cBackends; i++)
    691691        g_ahBackendPlugins[i] = hPlugin;
     
    698698 * internal: add single backend.
    699699 */
    700 DECLINLINE(int) vdAddBackend(RTLDRMOD hPlugin, PCVBOXHDDBACKEND pBackend)
     700DECLINLINE(int) vdAddBackend(RTLDRMOD hPlugin, PCVDIMAGEBACKEND pBackend)
    701701{
    702702    return vdAddBackends(hPlugin, &pBackend, 1);
     
    843843 * internal: find image format backend.
    844844 */
    845 static int vdFindBackend(const char *pszBackend, PCVBOXHDDBACKEND *ppBackend)
     845static int vdFindBackend(const char *pszBackend, PCVDIMAGEBACKEND *ppBackend)
    846846{
    847847    int rc = VINF_SUCCESS;
    848     PCVBOXHDDBACKEND pBackend = NULL;
     848    PCVDIMAGEBACKEND pBackend = NULL;
    849849
    850850    if (!g_apBackends)
     
    35203520 * @interface_method_impl{VDBACKENDREGISTER,pfnRegisterImage}
    35213521 */
    3522 static DECLCALLBACK(int) vdPluginRegisterImage(void *pvUser, PCVBOXHDDBACKEND pBackend)
     3522static DECLCALLBACK(int) vdPluginRegisterImage(void *pvUser, PCVDIMAGEBACKEND pBackend)
    35233523{
    35243524    int rc = VINF_SUCCESS;
    35253525
    3526     if (pBackend->cbSize == sizeof(VBOXHDDBACKEND))
     3526    if (pBackend->cbSize == sizeof(VDIMAGEBACKEND))
    35273527        vdAddBackend((RTLDRMOD)pvUser, pBackend);
    35283528    else
     
    36393639        while (i < g_cBackends && g_ahBackendPlugins[i] == pIt->hPlugin)
    36403640        {
    3641             memcpy(&g_apBackends[i], &g_apBackends[i + 1], (g_cBackends - i - 1) * sizeof(PCVBOXHDDBACKEND));
     3641            memcpy(&g_apBackends[i], &g_apBackends[i + 1], (g_cBackends - i - 1) * sizeof(PCVDIMAGEBACKEND));
    36423642            memcpy(&g_ahBackendPlugins[i], &g_ahBackendPlugins[i + 1], (g_cBackends - i - 1) * sizeof(RTLDRMOD));
    36433643            /** @todo for now skip reallocating, doesn't save much */
     
    36493649        while (i < g_cCacheBackends && g_ahCacheBackendPlugins[i] == pIt->hPlugin)
    36503650        {
    3651             memcpy(&g_apCacheBackends[i], &g_apCacheBackends[i + 1], (g_cCacheBackends - i - 1) * sizeof(PCVBOXHDDBACKEND));
     3651            memcpy(&g_apCacheBackends[i], &g_apCacheBackends[i + 1], (g_cCacheBackends - i - 1) * sizeof(PCVDCACHEBACKEND));
    36523652            memcpy(&g_ahCacheBackendPlugins[i], &g_ahCacheBackendPlugins[i + 1], (g_cCacheBackends - i - 1) * sizeof(RTLDRMOD));
    36533653            /** @todo for now skip reallocating, doesn't save much */
     
    36593659        while (i < g_cFilterBackends && g_pahFilterBackendPlugins[i] == pIt->hPlugin)
    36603660        {
    3661             memcpy(&g_apFilterBackends[i], &g_apFilterBackends[i + 1], (g_cFilterBackends - i - 1) * sizeof(PCVBOXHDDBACKEND));
     3661            memcpy(&g_apFilterBackends[i], &g_apFilterBackends[i + 1], (g_cFilterBackends - i - 1) * sizeof(PCVDFILTERBACKEND));
    36623662            memcpy(&g_pahFilterBackendPlugins[i], &g_pahFilterBackendPlugins[i + 1], (g_cFilterBackends - i - 1) * sizeof(RTLDRMOD));
    36633663            /** @todo for now skip reallocating, doesn't save much */
     
    1111011110{
    1111111111    int rc = VERR_NOT_SUPPORTED;
    11112     PCVBOXHDDBACKEND pBackend = NULL;
     11112    PCVDIMAGEBACKEND pBackend = NULL;
    1111311113    VDINTERFACEIOINT VDIfIoInt;
    1111411114    VDINTERFACEIO    VDIfIoFallback;
     
    1117611176
    1117711177/**
    11178  * @interface_method_impl{VBOXHDDBACKEND,pfnComposeLocation}
     11178 * @interface_method_impl{VDIMAGEBACKEND,pfnComposeLocation}
    1117911179 */
    1118011180DECLCALLBACK(int) genericFileComposeLocation(PVDINTERFACE pConfig, char **pszLocation)
     
    1118611186
    1118711187/**
    11188  * @interface_method_impl{VBOXHDDBACKEND,pfnComposeName}
     11188 * @interface_method_impl{VDIMAGEBACKEND,pfnComposeName}
    1118911189 */
    1119011190DECLCALLBACK(int) genericFileComposeName(PVDINTERFACE pConfig, char **pszName)
  • trunk/src/VBox/Storage/VDBackends.h

    r62482 r63781  
    2626RT_C_DECLS_BEGIN
    2727
    28 extern const VBOXHDDBACKEND g_RawBackend;
    29 extern const VBOXHDDBACKEND g_VmdkBackend;
    30 extern const VBOXHDDBACKEND g_VDIBackend;
    31 extern const VBOXHDDBACKEND g_VhdBackend;
    32 extern const VBOXHDDBACKEND g_ParallelsBackend;
    33 extern const VBOXHDDBACKEND g_DmgBackend;
    34 extern const VBOXHDDBACKEND g_ISCSIBackend;
    35 extern const VBOXHDDBACKEND g_QedBackend;
    36 extern const VBOXHDDBACKEND g_QCowBackend;
    37 extern const VBOXHDDBACKEND g_VhdxBackend;
     28extern const VDIMAGEBACKEND g_RawBackend;
     29extern const VDIMAGEBACKEND g_VmdkBackend;
     30extern const VDIMAGEBACKEND g_VDIBackend;
     31extern const VDIMAGEBACKEND g_VhdBackend;
     32extern const VDIMAGEBACKEND g_ParallelsBackend;
     33extern const VDIMAGEBACKEND g_DmgBackend;
     34extern const VDIMAGEBACKEND g_ISCSIBackend;
     35extern const VDIMAGEBACKEND g_QedBackend;
     36extern const VDIMAGEBACKEND g_QCowBackend;
     37extern const VDIMAGEBACKEND g_VhdxBackend;
    3838
    3939extern const VDCACHEBACKEND g_VciCacheBackend;
  • trunk/src/VBox/Storage/VDI.cpp

    r62873 r63781  
    31613161}
    31623162
    3163 const VBOXHDDBACKEND g_VDIBackend =
     3163const VDIMAGEBACKEND g_VDIBackend =
    31643164{
    31653165    /* pszBackendName */
    31663166    "VDI",
    31673167    /* cbSize */
    3168     sizeof(VBOXHDDBACKEND),
     3168    sizeof(VDIMAGEBACKEND),
    31693169    /* uBackendCaps */
    31703170      VD_CAP_UUID | VD_CAP_CREATE_FIXED | VD_CAP_CREATE_DYNAMIC
  • trunk/src/VBox/Storage/VHD.cpp

    r63567 r63781  
    32173217
    32183218
    3219 const VBOXHDDBACKEND g_VhdBackend =
     3219const VDIMAGEBACKEND g_VhdBackend =
    32203220{
    32213221    /* pszBackendName */
    32223222    "VHD",
    32233223    /* cbSize */
    3224     sizeof(VBOXHDDBACKEND),
     3224    sizeof(VDIMAGEBACKEND),
    32253225    /* uBackendCaps */
    32263226    VD_CAP_UUID | VD_CAP_DIFF | VD_CAP_FILE |
  • trunk/src/VBox/Storage/VHDX.cpp

    r63567 r63781  
    24872487
    24882488
    2489 const VBOXHDDBACKEND g_VhdxBackend =
     2489const VDIMAGEBACKEND g_VhdxBackend =
    24902490{
    24912491    /* pszBackendName */
    24922492    "VHDX",
    24932493    /* cbSize */
    2494     sizeof(VBOXHDDBACKEND),
     2494    sizeof(VDIMAGEBACKEND),
    24952495    /* uBackendCaps */
    24962496    VD_CAP_FILE | VD_CAP_VFS,
  • trunk/src/VBox/Storage/VMDK.cpp

    r63644 r63781  
    65796579
    65806580
    6581 const VBOXHDDBACKEND g_VmdkBackend =
     6581const VDIMAGEBACKEND g_VmdkBackend =
    65826582{
    65836583    /* pszBackendName */
    65846584    "VMDK",
    65856585    /* cbSize */
    6586     sizeof(VBOXHDDBACKEND),
     6586    sizeof(VDIMAGEBACKEND),
    65876587    /* uBackendCaps */
    65886588      VD_CAP_UUID | VD_CAP_CREATE_FIXED | VD_CAP_CREATE_DYNAMIC
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