- Timestamp:
- Aug 6, 2008 11:07:08 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 34192
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxHDD-new.h
r11048 r11176 366 366 * 367 367 * @return Pointer to the callback table. 368 * @param pCallbacks Opaque interface pointer. 369 */ 370 DECLINLINE(PVDINTERFACEERROR) VDGetInterfaceError(void *pCallbacks) 371 { 372 PVDINTERFACEERROR pInterfaceError = (PVDINTERFACEERROR)pCallbacks; 368 * @param pInterface Pointer to the interface descriptor. 369 */ 370 DECLINLINE(PVDINTERFACEERROR) VDGetInterfaceError(PVDINTERFACE pInterface) 371 { 372 /* Check that the interface descriptor is a error interface. */ 373 AssertMsgReturn( (pInterface->enmInterface == VDINTERFACETYPE_ERROR) 374 && (pInterface->cbSize == sizeof(VDINTERFACE)), 375 ("Not an error interface"), NULL); 376 377 PVDINTERFACEERROR pInterfaceError = (PVDINTERFACEERROR)pInterface->pCallbacks; 373 378 374 379 /* Do basic checks. */ 375 380 AssertMsgReturn( (pInterfaceError->cbSize == sizeof(VDINTERFACEERROR)) 376 381 && (pInterfaceError->enmInterface == VDINTERFACETYPE_ERROR), 377 (" Not an error interface\n"), NULL);382 ("A non error callback table attached to a error interface descriptor\n"), NULL); 378 383 379 384 return pInterfaceError; … … 512 517 * 513 518 * @return Pointer to the callback table. 514 * @param pCallbacks Opaque interface pointer. 515 */ 516 DECLINLINE(PVDINTERFACEASYNCIO) VDGetInterfaceAsyncIO(void *pCallbacks) 517 { 518 PVDINTERFACEASYNCIO pInterfaceAsyncIO = (PVDINTERFACEASYNCIO)pCallbacks; 519 * @param pInterface Pointer to the interface descriptor. 520 */ 521 DECLINLINE(PVDINTERFACEASYNCIO) VDGetInterfaceAsyncIO(PVDINTERFACE pInterface) 522 { 523 /* Check that the interface descriptor is a async I/O interface. */ 524 AssertMsgReturn( (pInterface->enmInterface == VDINTERFACETYPE_ASYNCIO) 525 && (pInterface->cbSize == sizeof(VDINTERFACE)), 526 ("Not an async I/O interface"), NULL); 527 528 PVDINTERFACEASYNCIO pInterfaceAsyncIO = (PVDINTERFACEASYNCIO)pInterface->pCallbacks; 519 529 520 530 /* Do basic checks. */ 521 531 AssertMsgReturn( (pInterfaceAsyncIO->cbSize == sizeof(VDINTERFACEASYNCIO)) 522 532 && (pInterfaceAsyncIO->enmInterface == VDINTERFACETYPE_ASYNCIO), 523 (" Not an async I/O interface\n"), NULL);533 ("A non async I/O callback table attached to a async I/O interface descriptor\n"), NULL); 524 534 525 535 return pInterfaceAsyncIO; … … 551 561 * 552 562 * @return Pointer to the callback table. 553 * @param pCallbacks Opaque interface pointer. 554 */ 555 DECLINLINE(PVDINTERFACEPROGRESS) VDGetInterfaceProgress(void *pCallbacks) 556 { 557 PVDINTERFACEPROGRESS pInterfaceProgress = (PVDINTERFACEPROGRESS)pCallbacks; 563 * @param pInterface Pointer to the interface descriptor. 564 */ 565 DECLINLINE(PVDINTERFACEPROGRESS) VDGetInterfaceProgress(PVDINTERFACE pInterface) 566 { 567 /* Check that the interface descriptor is a progress interface. */ 568 AssertMsgReturn( (pInterface->enmInterface == VDINTERFACETYPE_PROGRESS) 569 && (pInterface->cbSize == sizeof(VDINTERFACE)), 570 ("Not a progress interface"), NULL); 571 572 573 PVDINTERFACEPROGRESS pInterfaceProgress = (PVDINTERFACEPROGRESS)pInterface->pCallbacks; 558 574 559 575 /* Do basic checks. */ 560 576 AssertMsgReturn( (pInterfaceProgress->cbSize == sizeof(VDINTERFACEPROGRESS)) 561 577 && (pInterfaceProgress->enmInterface == VDINTERFACETYPE_PROGRESS), 562 (" Not a progress notification interface\n"), NULL);578 ("A non progress callback table attached to a progress interface descriptor\n"), NULL); 563 579 564 580 return pInterfaceProgress; … … 621 637 * 622 638 * @return Pointer to the callback table. 623 * @param pCallbacks Opaque interface pointer. 624 */ 625 DECLINLINE(PVDINTERFACECONFIG) VDGetInterfaceConfig(void *pCallbacks) 626 { 627 PVDINTERFACECONFIG pInterfaceConfig = (PVDINTERFACECONFIG)pCallbacks; 639 * @param pInterface Pointer to the interface descriptor. 640 */ 641 DECLINLINE(PVDINTERFACECONFIG) VDGetInterfaceConfig(PVDINTERFACE pInterface) 642 { 643 /* Check that the interface descriptor is a progress interface. */ 644 AssertMsgReturn( (pInterface->enmInterface == VDINTERFACETYPE_CONFIG) 645 && (pInterface->cbSize == sizeof(VDINTERFACE)), 646 ("Not a config interface"), NULL); 647 648 PVDINTERFACECONFIG pInterfaceConfig = (PVDINTERFACECONFIG)pInterface->pCallbacks; 628 649 629 650 /* Do basic checks. */ 630 651 AssertMsgReturn( (pInterfaceConfig->cbSize == sizeof(VDINTERFACECONFIG)) 631 652 && (pInterfaceConfig->enmInterface == VDINTERFACETYPE_CONFIG), 632 (" Not a configuration informaion interface\n"), NULL);653 ("A non config callback table attached to a config interface descriptor\n"), NULL); 633 654 634 655 return pInterfaceConfig; -
trunk/src/VBox/Devices/Storage/RawHDDCore.cpp
r11175 r11176 343 343 pImage->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR); 344 344 if (pImage->pInterfaceError) 345 pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError ->pCallbacks);345 pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError); 346 346 347 347 rc = rawOpenImage(pImage, uOpenFlags); … … 398 398 pImage->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR); 399 399 if (pImage->pInterfaceError) 400 pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError ->pCallbacks);400 pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError); 401 401 402 402 -
trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp
r10715 r11176 817 817 pDisk->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR); 818 818 if (pDisk->pInterfaceError) 819 pDisk->pInterfaceErrorCallbacks = VDGetInterfaceError(pDisk->pInterfaceError ->pCallbacks);819 pDisk->pInterfaceErrorCallbacks = VDGetInterfaceError(pDisk->pInterfaceError); 820 820 *ppDisk = pDisk; 821 821 } -
trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp
r10781 r11176 784 784 pImage->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR); 785 785 if (pImage->pInterfaceError) 786 pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError ->pCallbacks);786 pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError); 787 787 788 788 rc = vdiOpenImage(pImage, uOpenFlags); -
trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
r11175 r11176 3724 3724 pImage->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR); 3725 3725 if (pImage->pInterfaceError) 3726 pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError ->pCallbacks);3726 pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError); 3727 3727 3728 3728 /* Try to get async I/O interface. */ 3729 3729 pImage->pInterfaceAsyncIO = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ASYNCIO); 3730 3730 if (pImage->pInterfaceAsyncIO) 3731 pImage->pInterfaceAsyncIOCallbacks = VDGetInterfaceAsyncIO(pImage->pInterfaceAsyncIO ->pCallbacks);3731 pImage->pInterfaceAsyncIOCallbacks = VDGetInterfaceAsyncIO(pImage->pInterfaceAsyncIO); 3732 3732 3733 3733 … … 3804 3804 pImage->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR); 3805 3805 if (pImage->pInterfaceError) 3806 pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError ->pCallbacks);3806 pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError); 3807 3807 3808 3808 rc = vmdkCreateImage(pImage, enmType, cbSize, uImageFlags, pszComment,
Note:
See TracChangeset
for help on using the changeset viewer.