- Timestamp:
- May 21, 2007 11:57:36 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp
r2718 r2728 134 134 va_list va; 135 135 va_start(va, pszFormat); 136 pfnError(pvErrorUser, rc, RT_SRC_POS_ARGS, pszFormat, va); 136 if (pfnError) 137 pfnError(pvErrorUser, rc, RT_SRC_POS_ARGS, pszFormat, va); 137 138 va_end(va); 138 139 return rc; … … 147 148 va_list va; 148 149 va_start(va, pszFormat); 149 pDisk->pfnError(pDisk->pvErrorUser, rc, RT_SRC_POS_ARGS, pszFormat, va); 150 if (pDisk->pfnError) 151 pDisk->pfnError(pDisk->pvErrorUser, rc, RT_SRC_POS_ARGS, pszFormat, va); 150 152 va_end(va); 151 153 return rc; … … 469 471 PVBOXHDDBACKEND pBackend = NULL; 470 472 PVBOXHDD pDisk = NULL; 473 474 /* Passing an error callback is strictly not necessary any more. Any code 475 * calling the HDD container functions should provide one, as otherwise 476 * many detailed error messages will go unnoticed. If you find a situation 477 * where you get no sensible error message from this code but you think 478 * there should be one, shout loudly. There are no error messages for rare 479 * and obvious error codes such as VERR_NO_MEMORY, and for situations which 480 * the user cannot be made responsible for, such as program bugs causing 481 * parameter checks to fail etc. */ 482 Assert(pfnError); 471 483 472 484 /* Find backend. */ … … 1617 1629 int rc; 1618 1630 if (pImage) 1619 rc = pDisk->Backend->pfnGetUuid(pImage , pUuid);1631 rc = pDisk->Backend->pfnGetUuid(pImage->pvBackendData, pUuid); 1620 1632 else 1621 1633 rc = VERR_VDI_IMAGE_NOT_FOUND; … … 1646 1658 int rc; 1647 1659 if (pImage) 1648 rc = pDisk->Backend->pfnSetUuid(pImage , pUuid);1660 rc = pDisk->Backend->pfnSetUuid(pImage->pvBackendData, pUuid); 1649 1661 else 1650 1662 rc = VERR_VDI_IMAGE_NOT_FOUND; … … 1673 1685 int rc; 1674 1686 if (pImage) 1675 rc = pDisk->Backend->pfnGetModificationUuid(pImage , pUuid);1687 rc = pDisk->Backend->pfnGetModificationUuid(pImage->pvBackendData, pUuid); 1676 1688 else 1677 1689 rc = VERR_VDI_IMAGE_NOT_FOUND; … … 1702 1714 int rc; 1703 1715 if (pImage) 1704 rc = pDisk->Backend->pfnSetModificationUuid(pImage , pUuid);1716 rc = pDisk->Backend->pfnSetModificationUuid(pImage->pvBackendData, pUuid); 1705 1717 else 1706 1718 rc = VERR_VDI_IMAGE_NOT_FOUND; … … 1730 1742 int rc; 1731 1743 if (pImage) 1732 rc = pDisk->Backend->pfnGetParentUuid(pImage , pUuid);1744 rc = pDisk->Backend->pfnGetParentUuid(pImage->pvBackendData, pUuid); 1733 1745 else 1734 1746 rc = VERR_VDI_IMAGE_NOT_FOUND; … … 1759 1771 int rc; 1760 1772 if (pImage) 1761 rc = pDisk->Backend->pfnSetParentUuid(pImage , pUuid);1773 rc = pDisk->Backend->pfnSetParentUuid(pImage->pvBackendData, pUuid); 1762 1774 else 1763 1775 rc = VERR_VDI_IMAGE_NOT_FOUND;
Note:
See TracChangeset
for help on using the changeset viewer.