Changeset 63781 in vbox
- Timestamp:
- Sep 9, 2016 9:05:41 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vd-image-backend.h
r62476 r63781 61 61 * Image format backend interface used by VBox HDD Container implementation. 62 62 */ 63 typedef struct V BOXHDDBACKEND63 typedef struct VDIMAGEBACKEND 64 64 { 65 65 /** … … 585 585 PVDINTERFACE pVDIfsOperation)); 586 586 587 } V BOXHDDBACKEND;587 } VDIMAGEBACKEND; 588 588 589 589 /** Pointer to VD backend. */ 590 typedef V BOXHDDBACKEND *PVBOXHDDBACKEND;590 typedef VDIMAGEBACKEND *PVDIMAGEBACKEND; 591 591 /** Constant pointer to VD backend. */ 592 typedef const V BOXHDDBACKEND *PCVBOXHDDBACKEND;592 typedef const VDIMAGEBACKEND *PCVDIMAGEBACKEND; 593 593 594 594 /** @copydoc VBOXHDDBACKEND::pfnComposeLocation */ -
trunk/include/VBox/vd-plugin.h
r62476 r63781 44 44 * @param pBackend The image backend to register. 45 45 */ 46 DECLR3CALLBACKMEMBER(int, pfnRegisterImage, (void *pvUser, PCV BOXHDDBACKEND pBackend));46 DECLR3CALLBACKMEMBER(int, pfnRegisterImage, (void *pvUser, PCVDIMAGEBACKEND pBackend)); 47 47 48 48 /** -
trunk/src/VBox/Storage/DMG.cpp
r63567 r63781 2509 2509 2510 2510 2511 const V BOXHDDBACKEND g_DmgBackend =2511 const VDIMAGEBACKEND g_DmgBackend = 2512 2512 { 2513 2513 /* pszBackendName */ 2514 2514 "DMG", 2515 2515 /* cbSize */ 2516 sizeof(V BOXHDDBACKEND),2516 sizeof(VDIMAGEBACKEND), 2517 2517 /* uBackendCaps */ 2518 2518 VD_CAP_FILE | VD_CAP_VFS, -
trunk/src/VBox/Storage/ISCSI.cpp
r62750 r63781 5578 5578 5579 5579 5580 const V BOXHDDBACKEND g_ISCSIBackend =5580 const VDIMAGEBACKEND g_ISCSIBackend = 5581 5581 { 5582 5582 /* pszBackendName */ 5583 5583 "iSCSI", 5584 5584 /* cbSize */ 5585 sizeof(V BOXHDDBACKEND),5585 sizeof(VDIMAGEBACKEND), 5586 5586 /* uBackendCaps */ 5587 5587 VD_CAP_CONFIG | VD_CAP_TCPNET | VD_CAP_ASYNC, -
trunk/src/VBox/Storage/Parallels.cpp
r63780 r63781 1067 1067 1068 1068 1069 const V BOXHDDBACKEND g_ParallelsBackend =1069 const VDIMAGEBACKEND g_ParallelsBackend = 1070 1070 { 1071 1071 /* pszBackendName */ 1072 1072 "Parallels", 1073 1073 /* cbSize */ 1074 sizeof(V BOXHDDBACKEND),1074 sizeof(VDIMAGEBACKEND), 1075 1075 /* uBackendCaps */ 1076 1076 VD_CAP_FILE | VD_CAP_ASYNC | VD_CAP_VFS | VD_CAP_CREATE_DYNAMIC | VD_CAP_DIFF, -
trunk/src/VBox/Storage/QCOW.cpp
r63741 r63781 2579 2579 2580 2580 2581 const V BOXHDDBACKEND g_QCowBackend =2581 const VDIMAGEBACKEND g_QCowBackend = 2582 2582 { 2583 2583 /* pszBackendName */ 2584 2584 "QCOW", 2585 2585 /* cbSize */ 2586 sizeof(V BOXHDDBACKEND),2586 sizeof(VDIMAGEBACKEND), 2587 2587 /* uBackendCaps */ 2588 2588 VD_CAP_FILE | VD_CAP_VFS | VD_CAP_CREATE_DYNAMIC | VD_CAP_DIFF | VD_CAP_ASYNC, -
trunk/src/VBox/Storage/QED.cpp
r63741 r63781 2606 2606 2607 2607 2608 const V BOXHDDBACKEND g_QedBackend =2608 const VDIMAGEBACKEND g_QedBackend = 2609 2609 { 2610 2610 /* pszBackendName */ 2611 2611 "QED", 2612 2612 /* cbSize */ 2613 sizeof(V BOXHDDBACKEND),2613 sizeof(VDIMAGEBACKEND), 2614 2614 /* uBackendCaps */ 2615 2615 VD_CAP_FILE | VD_CAP_VFS | VD_CAP_CREATE_DYNAMIC | VD_CAP_DIFF | VD_CAP_ASYNC, -
trunk/src/VBox/Storage/RAW.cpp
r62747 r63781 1143 1143 1144 1144 1145 const V BOXHDDBACKEND g_RawBackend =1145 const VDIMAGEBACKEND g_RawBackend = 1146 1146 { 1147 1147 /* pszBackendName */ 1148 1148 "RAW", 1149 1149 /* cbSize */ 1150 sizeof(V BOXHDDBACKEND),1150 sizeof(VDIMAGEBACKEND), 1151 1151 /* uBackendCaps */ 1152 1152 VD_CAP_CREATE_FIXED | VD_CAP_FILE | VD_CAP_ASYNC | VD_CAP_VFS, -
trunk/src/VBox/Storage/VD.cpp
r63733 r63781 123 123 124 124 /** Function pointers for the various backend methods. */ 125 PCV BOXHDDBACKEND Backend;125 PCVDIMAGEBACKEND Backend; 126 126 /** Pointer to list of VD interfaces, per-image. */ 127 127 PVDINTERFACE pVDIfsImage; … … 625 625 static unsigned g_cBackends = 0; 626 626 /** Array of pointers to the image backends. */ 627 static PCV BOXHDDBACKEND *g_apBackends = NULL;627 static PCVDIMAGEBACKEND *g_apBackends = NULL; 628 628 /** Array of handles to the corresponding plugin. */ 629 629 static RTLDRMOD *g_ahBackendPlugins = NULL; 630 630 /** Builtin image backends. */ 631 static PCV BOXHDDBACKEND aStaticBackends[] =631 static PCVDIMAGEBACKEND aStaticBackends[] = 632 632 { 633 633 &g_VmdkBackend, … … 674 674 * internal: add several backends. 675 675 */ 676 static int vdAddBackends(RTLDRMOD hPlugin, PCV BOXHDDBACKEND *ppBackends, unsigned cBackends)677 { 678 PCV BOXHDDBACKEND *pTmp = (PCVBOXHDDBACKEND*)RTMemRealloc(g_apBackends,679 (g_cBackends + cBackends) * sizeof(PCV BOXHDDBACKEND));676 static int vdAddBackends(RTLDRMOD hPlugin, PCVDIMAGEBACKEND *ppBackends, unsigned cBackends) 677 { 678 PCVDIMAGEBACKEND *pTmp = (PCVDIMAGEBACKEND *)RTMemRealloc(g_apBackends, 679 (g_cBackends + cBackends) * sizeof(PCVDIMAGEBACKEND)); 680 680 if (RT_UNLIKELY(!pTmp)) 681 681 return VERR_NO_MEMORY; … … 687 687 return VERR_NO_MEMORY; 688 688 g_ahBackendPlugins = pTmpPlugins; 689 memcpy(&g_apBackends[g_cBackends], ppBackends, cBackends * sizeof(PCV BOXHDDBACKEND));689 memcpy(&g_apBackends[g_cBackends], ppBackends, cBackends * sizeof(PCVDIMAGEBACKEND)); 690 690 for (unsigned i = g_cBackends; i < g_cBackends + cBackends; i++) 691 691 g_ahBackendPlugins[i] = hPlugin; … … 698 698 * internal: add single backend. 699 699 */ 700 DECLINLINE(int) vdAddBackend(RTLDRMOD hPlugin, PCV BOXHDDBACKEND pBackend)700 DECLINLINE(int) vdAddBackend(RTLDRMOD hPlugin, PCVDIMAGEBACKEND pBackend) 701 701 { 702 702 return vdAddBackends(hPlugin, &pBackend, 1); … … 843 843 * internal: find image format backend. 844 844 */ 845 static int vdFindBackend(const char *pszBackend, PCV BOXHDDBACKEND *ppBackend)845 static int vdFindBackend(const char *pszBackend, PCVDIMAGEBACKEND *ppBackend) 846 846 { 847 847 int rc = VINF_SUCCESS; 848 PCV BOXHDDBACKEND pBackend = NULL;848 PCVDIMAGEBACKEND pBackend = NULL; 849 849 850 850 if (!g_apBackends) … … 3520 3520 * @interface_method_impl{VDBACKENDREGISTER,pfnRegisterImage} 3521 3521 */ 3522 static DECLCALLBACK(int) vdPluginRegisterImage(void *pvUser, PCV BOXHDDBACKEND pBackend)3522 static DECLCALLBACK(int) vdPluginRegisterImage(void *pvUser, PCVDIMAGEBACKEND pBackend) 3523 3523 { 3524 3524 int rc = VINF_SUCCESS; 3525 3525 3526 if (pBackend->cbSize == sizeof(V BOXHDDBACKEND))3526 if (pBackend->cbSize == sizeof(VDIMAGEBACKEND)) 3527 3527 vdAddBackend((RTLDRMOD)pvUser, pBackend); 3528 3528 else … … 3639 3639 while (i < g_cBackends && g_ahBackendPlugins[i] == pIt->hPlugin) 3640 3640 { 3641 memcpy(&g_apBackends[i], &g_apBackends[i + 1], (g_cBackends - i - 1) * sizeof(PCV BOXHDDBACKEND));3641 memcpy(&g_apBackends[i], &g_apBackends[i + 1], (g_cBackends - i - 1) * sizeof(PCVDIMAGEBACKEND)); 3642 3642 memcpy(&g_ahBackendPlugins[i], &g_ahBackendPlugins[i + 1], (g_cBackends - i - 1) * sizeof(RTLDRMOD)); 3643 3643 /** @todo for now skip reallocating, doesn't save much */ … … 3649 3649 while (i < g_cCacheBackends && g_ahCacheBackendPlugins[i] == pIt->hPlugin) 3650 3650 { 3651 memcpy(&g_apCacheBackends[i], &g_apCacheBackends[i + 1], (g_cCacheBackends - i - 1) * sizeof(PCV BOXHDDBACKEND));3651 memcpy(&g_apCacheBackends[i], &g_apCacheBackends[i + 1], (g_cCacheBackends - i - 1) * sizeof(PCVDCACHEBACKEND)); 3652 3652 memcpy(&g_ahCacheBackendPlugins[i], &g_ahCacheBackendPlugins[i + 1], (g_cCacheBackends - i - 1) * sizeof(RTLDRMOD)); 3653 3653 /** @todo for now skip reallocating, doesn't save much */ … … 3659 3659 while (i < g_cFilterBackends && g_pahFilterBackendPlugins[i] == pIt->hPlugin) 3660 3660 { 3661 memcpy(&g_apFilterBackends[i], &g_apFilterBackends[i + 1], (g_cFilterBackends - i - 1) * sizeof(PCV BOXHDDBACKEND));3661 memcpy(&g_apFilterBackends[i], &g_apFilterBackends[i + 1], (g_cFilterBackends - i - 1) * sizeof(PCVDFILTERBACKEND)); 3662 3662 memcpy(&g_pahFilterBackendPlugins[i], &g_pahFilterBackendPlugins[i + 1], (g_cFilterBackends - i - 1) * sizeof(RTLDRMOD)); 3663 3663 /** @todo for now skip reallocating, doesn't save much */ … … 11110 11110 { 11111 11111 int rc = VERR_NOT_SUPPORTED; 11112 PCV BOXHDDBACKEND pBackend = NULL;11112 PCVDIMAGEBACKEND pBackend = NULL; 11113 11113 VDINTERFACEIOINT VDIfIoInt; 11114 11114 VDINTERFACEIO VDIfIoFallback; … … 11176 11176 11177 11177 /** 11178 * @interface_method_impl{V BOXHDDBACKEND,pfnComposeLocation}11178 * @interface_method_impl{VDIMAGEBACKEND,pfnComposeLocation} 11179 11179 */ 11180 11180 DECLCALLBACK(int) genericFileComposeLocation(PVDINTERFACE pConfig, char **pszLocation) … … 11186 11186 11187 11187 /** 11188 * @interface_method_impl{V BOXHDDBACKEND,pfnComposeName}11188 * @interface_method_impl{VDIMAGEBACKEND,pfnComposeName} 11189 11189 */ 11190 11190 DECLCALLBACK(int) genericFileComposeName(PVDINTERFACE pConfig, char **pszName) -
trunk/src/VBox/Storage/VDBackends.h
r62482 r63781 26 26 RT_C_DECLS_BEGIN 27 27 28 extern const V BOXHDDBACKEND g_RawBackend;29 extern const V BOXHDDBACKEND g_VmdkBackend;30 extern const V BOXHDDBACKEND g_VDIBackend;31 extern const V BOXHDDBACKEND g_VhdBackend;32 extern const V BOXHDDBACKEND g_ParallelsBackend;33 extern const V BOXHDDBACKEND g_DmgBackend;34 extern const V BOXHDDBACKEND g_ISCSIBackend;35 extern const V BOXHDDBACKEND g_QedBackend;36 extern const V BOXHDDBACKEND g_QCowBackend;37 extern const V BOXHDDBACKEND g_VhdxBackend;28 extern const VDIMAGEBACKEND g_RawBackend; 29 extern const VDIMAGEBACKEND g_VmdkBackend; 30 extern const VDIMAGEBACKEND g_VDIBackend; 31 extern const VDIMAGEBACKEND g_VhdBackend; 32 extern const VDIMAGEBACKEND g_ParallelsBackend; 33 extern const VDIMAGEBACKEND g_DmgBackend; 34 extern const VDIMAGEBACKEND g_ISCSIBackend; 35 extern const VDIMAGEBACKEND g_QedBackend; 36 extern const VDIMAGEBACKEND g_QCowBackend; 37 extern const VDIMAGEBACKEND g_VhdxBackend; 38 38 39 39 extern const VDCACHEBACKEND g_VciCacheBackend; -
trunk/src/VBox/Storage/VDI.cpp
r62873 r63781 3161 3161 } 3162 3162 3163 const V BOXHDDBACKEND g_VDIBackend =3163 const VDIMAGEBACKEND g_VDIBackend = 3164 3164 { 3165 3165 /* pszBackendName */ 3166 3166 "VDI", 3167 3167 /* cbSize */ 3168 sizeof(V BOXHDDBACKEND),3168 sizeof(VDIMAGEBACKEND), 3169 3169 /* uBackendCaps */ 3170 3170 VD_CAP_UUID | VD_CAP_CREATE_FIXED | VD_CAP_CREATE_DYNAMIC -
trunk/src/VBox/Storage/VHD.cpp
r63567 r63781 3217 3217 3218 3218 3219 const V BOXHDDBACKEND g_VhdBackend =3219 const VDIMAGEBACKEND g_VhdBackend = 3220 3220 { 3221 3221 /* pszBackendName */ 3222 3222 "VHD", 3223 3223 /* cbSize */ 3224 sizeof(V BOXHDDBACKEND),3224 sizeof(VDIMAGEBACKEND), 3225 3225 /* uBackendCaps */ 3226 3226 VD_CAP_UUID | VD_CAP_DIFF | VD_CAP_FILE | -
trunk/src/VBox/Storage/VHDX.cpp
r63567 r63781 2487 2487 2488 2488 2489 const V BOXHDDBACKEND g_VhdxBackend =2489 const VDIMAGEBACKEND g_VhdxBackend = 2490 2490 { 2491 2491 /* pszBackendName */ 2492 2492 "VHDX", 2493 2493 /* cbSize */ 2494 sizeof(V BOXHDDBACKEND),2494 sizeof(VDIMAGEBACKEND), 2495 2495 /* uBackendCaps */ 2496 2496 VD_CAP_FILE | VD_CAP_VFS, -
trunk/src/VBox/Storage/VMDK.cpp
r63644 r63781 6579 6579 6580 6580 6581 const V BOXHDDBACKEND g_VmdkBackend =6581 const VDIMAGEBACKEND g_VmdkBackend = 6582 6582 { 6583 6583 /* pszBackendName */ 6584 6584 "VMDK", 6585 6585 /* cbSize */ 6586 sizeof(V BOXHDDBACKEND),6586 sizeof(VDIMAGEBACKEND), 6587 6587 /* uBackendCaps */ 6588 6588 VD_CAP_UUID | VD_CAP_CREATE_FIXED | VD_CAP_CREATE_DYNAMIC
Note:
See TracChangeset
for help on using the changeset viewer.