Changeset 7967 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Apr 15, 2008 7:38:29 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp
r7900 r7967 833 833 * 834 834 * @returns VBox status code. 835 * VINF_SUCCESS if a plugin was found. 835 * VINF_SUCCESS if a plugin was found. 836 836 * ppszFormat contains the string which can be used as backend name. 837 837 * VERR_NOT_SUPPORTED if no backend was found. … … 1190 1190 if (VBOX_FAILURE(rc)) 1191 1191 { 1192 if (pImage->hPlugin != NIL_RTLDRMOD)1193 RTLdrClose(pImage->hPlugin);1194 1195 1192 if (pImage) 1196 1193 { 1194 if (pImage->hPlugin != NIL_RTLDRMOD) 1195 RTLdrClose(pImage->hPlugin); 1196 1197 1197 if (pImage->pszFilename) 1198 1198 RTStrFree(pImage->pszFilename); … … 1273 1273 /* The LCHS geometry fields may be 0 to leave it to later autodetection. */ 1274 1274 AssertMsgBreak( VALID_PTR(pLCHSGeometry) 1275 && pLCHSGeometry->cCylinders <= 1 63831276 && pLCHSGeometry->cHeads <= 161275 && pLCHSGeometry->cCylinders <= 1024 1276 && pLCHSGeometry->cHeads <= 255 1277 1277 && pLCHSGeometry->cSectors <= 63, 1278 1278 ("pLCHSGeometry=%#p LCHS=%u/%u/%u\n", pLCHSGeometry, … … 1390 1390 if (VBOX_FAILURE(rc)) 1391 1391 { 1392 if (pImage->hPlugin != NIL_RTLDRMOD)1393 RTLdrClose(pImage->hPlugin);1394 1395 1392 if (pImage) 1396 1393 { 1394 if (pImage->hPlugin != NIL_RTLDRMOD) 1395 RTLdrClose(pImage->hPlugin); 1396 1397 1397 if (pImage->pszFilename) 1398 1398 RTStrFree(pImage->pszFilename); … … 1821 1821 rc = VERR_INVALID_PARAMETER); 1822 1822 AssertMsg(pDiskFrom->u32Signature == VBOXHDDDISK_SIGNATURE, 1823 ("u32Signature=%08x\n", pDiskFrom->u32Signature)); 1823 ("u32Signature=%08x\n", pDiskFrom->u32Signature)); 1824 1824 1825 1825 PVDIMAGE pImageFrom = vdGetImageByNumber(pDiskFrom, nImage); … … 1828 1828 rc = VERR_INVALID_PARAMETER); 1829 1829 AssertMsg(pDiskTo->u32Signature == VBOXHDDDISK_SIGNATURE, 1830 ("u32Signature=%08x\n", pDiskTo->u32Signature)); 1830 ("u32Signature=%08x\n", pDiskTo->u32Signature)); 1831 1831 1832 1832 /* If the containers are equal and the backend is the same, rename the image. */ … … 1899 1899 break; 1900 1900 } 1901 1901 1902 1902 if (cbSize == 0) 1903 1903 cbSize = cbSizeFrom; … … 1907 1907 if (VBOX_FAILURE(rc)) 1908 1908 break; 1909 1909 1910 1910 /* @todo Get this from the source image. */ 1911 1911 PDMMEDIAGEOMETRY PCHSGeometryFrom = {0, 0, 0}; 1912 1912 PDMMEDIAGEOMETRY LCHSGeometryFrom = {0, 0, 0}; 1913 1913 1914 1914 unsigned uOpenFlagsFrom; 1915 1915 rc = VDGetOpenFlags(pDiskFrom, nImage, &uOpenFlagsFrom); … … 1946 1946 uint64_t uOffset = 0; 1947 1947 uint64_t cbRemaining = cbSize; 1948 1948 1949 1949 do 1950 1950 { … … 2011 2011 if (pImageTo->pszFilename) 2012 2012 RTStrFree(pImageTo->pszFilename); 2013 2013 2014 2014 RTMemFree(pImageTo); 2015 2015 }
Note:
See TracChangeset
for help on using the changeset viewer.