Changeset 1901 in vbox
- Timestamp:
- Apr 3, 2007 4:51:17 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 20150
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VmdkHDD.h
r1828 r1901 1 1 /** @file 2 * VBox HDD Container, Virtual Disk Image (VDI)API.2 * VBox VMDK HDD Container API. 3 3 */ 4 4 … … 19 19 */ 20 20 21 #ifndef __VBox_V BoxHDD_h__22 #define __VBox_V BoxHDD_h__21 #ifndef __VBox_VmdkHDD_h__ 22 #define __VBox_VmdkHDD_h__ 23 23 24 24 #include <VBox/cdefs.h> … … 31 31 32 32 #ifdef IN_RING0 33 # error "There are no V DIAPIs available in Ring-0 Host Context!"33 # error "There are no VMDK APIs available in Ring-0 Host Context!" 34 34 #endif 35 35 36 /** @defgroup grp_v box_hdd VBoxHDD Container36 /** @defgroup grp_vmdk_hdd VBox VMDK HDD Container 37 37 * @{ 38 38 */ 39 39 40 /** Image info, not handled anyhow.41 * Must be less than 64 bytes in length, including the trailing 0.42 */43 #define VDI_IMAGE_FILE_INFO "<<< InnoTek VirtualBox Disk Image >>>\n"44 45 /** Current image major version. */46 #define VDI_IMAGE_VERSION_MAJOR (0x0001)47 /** Current image minor version. */48 #define VDI_IMAGE_VERSION_MINOR (0x0001)49 40 /** Current image version. */ 50 #define VDI_IMAGE_VERSION ((VDI_IMAGE_VERSION_MAJOR << 16) | VDI_IMAGE_VERSION_MINOR) 51 52 /** Get major version from combined version. */ 53 #define VDI_GET_VERSION_MAJOR(uVer) ((uVer) >> 16) 54 /** Get minor version from combined version. */ 55 #define VDI_GET_VERSION_MINOR(uVer) ((uVer) & 0xffff) 56 57 /** @name VDI image types 41 #define VMDK_IMAGE_VERSION (0x0001) 42 43 /** @name VMDK image types 58 44 * @{ */ 59 typedef enum V DIIMAGETYPE45 typedef enum VMDKIMAGETYPE 60 46 { 61 47 /** Normal dynamically growing base image file. */ 62 V DI_IMAGE_TYPE_NORMAL= 1,48 VMDK_IMAGE_TYPE_NORMAL = 1, 63 49 /** Preallocated base image file of a fixed size. */ 64 V DI_IMAGE_TYPE_FIXED,50 VMDK_IMAGE_TYPE_FIXED, 65 51 /** Dynamically growing image file for undo/commit changes support. */ 66 V DI_IMAGE_TYPE_UNDO,52 VMDK_IMAGE_TYPE_UNDO, 67 53 /** Dynamically growing image file for differencing support. */ 68 V DI_IMAGE_TYPE_DIFF,54 VMDK_IMAGE_TYPE_DIFF, 69 55 70 56 /** First valid image type value. */ 71 V DI_IMAGE_TYPE_FIRST = VDI_IMAGE_TYPE_NORMAL,57 VMDK_IMAGE_TYPE_FIRST = VMDK_IMAGE_TYPE_NORMAL, 72 58 /** Last valid image type value. */ 73 V DI_IMAGE_TYPE_LAST = VDI_IMAGE_TYPE_DIFF74 } V DIIMAGETYPE;75 /** Pointer to V DIimage type. */76 typedef V DIIMAGETYPE *PVDIIMAGETYPE;59 VMDK_IMAGE_TYPE_LAST = VMDK_IMAGE_TYPE_DIFF 60 } VMDKIMAGETYPE; 61 /** Pointer to VMDK image type. */ 62 typedef VMDKIMAGETYPE *PVMDKIMAGETYPE; 77 63 /** @} */ 78 64 79 /** @name VDI image flags 80 * @{ */ 65 /** @name VMDK image flags 66 * @{ 67 */ 81 68 /** No flags. */ 82 #define VDI_IMAGE_FLAGS_NONE (0x00) 83 /** Fill new blocks with zeroes while expanding image file. */ 84 #define VDI_IMAGE_FLAGS_ZERO_EXPAND (0x01) 69 #define VMDK_IMAGE_FLAGS_NONE (0) 70 /** Split image into 2GB extents. */ 71 #define VMDK_IMAGE_FLAGS_SPLIT_2G (1) 72 /** Split image into 2GB extents. */ 73 #define VMDK_IMAGE_FLAGS_RAWDISK (2) 85 74 86 75 /** Mask of valid image flags. */ 87 #define V DI_IMAGE_FLAGS_MASK (VDI_IMAGE_FLAGS_NONE | VDI_IMAGE_FLAGS_ZERO_EXPAND)88 89 /** Default image fla gs. */90 #define V DI_IMAGE_FLAGS_DEFAULT (VDI_IMAGE_FLAGS_NONE)76 #define VMDK_IMAGE_FLAGS_MASK (VMDK_IMAGE_FLAGS_SPLIT_2G | VMDK_IMAGE_FLAGS_RAWDISK) 77 78 /** Default image flafs. */ 79 #define VMDK_IMAGE_FLAGS_DEFAULT (VMDK_IMAGE_FLAGS_NONE) 91 80 /** @} */ 92 81 93 /** @name V DIimage open mode flags82 /** @name VMDK image open mode flags 94 83 * @{ 95 84 */ 96 85 /** Try to open image in read/write exclusive access mode if possible, or in read-only elsewhere. */ 97 #define V DI_OPEN_FLAGS_NORMAL(0)86 #define VMDK_OPEN_FLAGS_NORMAL (0) 98 87 /** Open image in read-only mode with sharing access with others. */ 99 #define VDI_OPEN_FLAGS_READONLY (1) 88 #define VMDK_OPEN_FLAGS_READONLY (1) 89 /** Honor zero block writes instead of ignoring them if possible. */ 90 #define VMDK_OPEN_FLAGS_HONOR_ZEROES (2) 100 91 /** Mask of valid flags. */ 101 #define V DI_OPEN_FLAGS_MASK (VDI_OPEN_FLAGS_NORMAL | VDI_OPEN_FLAGS_READONLY)92 #define VMDK_OPEN_FLAGS_MASK (VMDK_OPEN_FLAGS_NORMAL | VMDK_OPEN_FLAGS_READONLY | VMDK_OPEN_FLAGS_HONOR_ZEROES) 102 93 /** @}*/ 103 94 104 95 /** 105 * VBox V DI diskContainer main structure.106 */ 107 /* Forward declaration, V DIDISK structure is visible only inside VDImodule. */108 struct V DIDISK;109 typedef struct V DIDISK VDIDISK;110 typedef V DIDISK *PVDIDISK;96 * VBox VMDK HDD Container main structure. 97 */ 98 /* Forward declaration, VMDKDISK structure is visible only inside VMDK module. */ 99 struct VMDKDISK; 100 typedef struct VMDKDISK VMDKDISK; 101 typedef VMDKDISK *PVMDKDISK; 111 102 112 103 /** … … 117 108 * @param enmType Image type, only base image types are acceptable. 118 109 * @param cbSize Image size in bytes. 110 * @param uImageFlags Flags specifying special image features. 119 111 * @param pszComment Pointer to image comment. NULL is ok. 120 112 * @param pfnProgress Progress callback. Optional. NULL if not to be used. 121 113 * @param pvUser User argument for the progress callback. 122 114 */ 123 VBOXDDU_DECL(int) VDICreateBaseImage(const char *pszFilename, VDIIMAGETYPE enmType, uint64_t cbSize, const char *pszComment, 124 PFNVMPROGRESS pfnProgress, void *pvUser); 115 VBOXDDU_DECL(int) VMDKCreateBaseImage(const char *pszFilename, VMDKIMAGETYPE enmType, 116 uint64_t cbSize, unsigned uImageFlags, const char *pszComment, 117 PFNVMPROGRESS pfnProgress, void *pvUser); 125 118 126 119 /** … … 130 123 * @param pszFilename Name of the differencing image file to create. 131 124 * @param pszParent Name of the parent image file. May be base or diff image type. 125 * @param uImageFlags Flags specifying special image features. 132 126 * @param pszComment Pointer to image comment. NULL is ok. 133 127 * @param pfnProgress Progress callback. Optional. NULL if not to be used. 134 128 * @param pvUser User argument for the progress callback. 135 129 */ 136 VBOXDDU_DECL(int) VDICreateDifferenceImage(const char *pszFilename, const char *pszParent, const char *pszComment, 137 PFNVMPROGRESS pfnProgress, void *pvUser); 130 VBOXDDU_DECL(int) VMDKCreateDifferenceImage(const char *pszFilename, const char *pszParent, 131 unsigned uImageFlags, const char *pszComment, 132 PFNVMPROGRESS pfnProgress, void *pvUser); 138 133 139 134 /** … … 150 145 * @param cbComment The size of pszComment buffer. 0 is ok. 151 146 */ 152 VBOXDDU_DECL(int) VDICheckImage(const char *pszFilename, 153 unsigned *puVersion, 154 PVDIIMAGETYPE penmType, 155 uint64_t *pcbSize, 156 PRTUUID pUuid, 157 PRTUUID pParentUuid, 158 char *pszComment, 159 unsigned cbComment); 147 VBOXDDU_DECL(int) VMDKCheckImage(const char *pszFilename, unsigned *puVersion, 148 PVMDKIMAGETYPE penmType, uint64_t *pcbSize, 149 PRTUUID pUuid, PRTUUID pParentUuid, 150 char *pszComment, unsigned cbComment); 160 151 161 152 /** … … 166 157 * @param pszComment New comment string (UTF-8). NULL is allowed to reset the comment. 167 158 */ 168 VBOXDDU_DECL(int) V DISetImageComment(const char *pszFilename, const char *pszComment);159 VBOXDDU_DECL(int) VMDKSetImageComment(const char *pszFilename, const char *pszComment); 169 160 170 161 /** … … 174 165 * @param pszFilename Name of the image file to check. 175 166 */ 176 VBOXDDU_DECL(int) V DIDeleteImage(const char *pszFilename);167 VBOXDDU_DECL(int) VMDKDeleteImage(const char *pszFilename); 177 168 178 169 /** … … 187 178 * @param pvUser User argument for the progress callback. 188 179 */ 189 VBOXDDU_DECL(int) V DICopyImage(const char *pszDstFilename, const char *pszSrcFilename, const char *pszComment,180 VBOXDDU_DECL(int) VMDKCopyImage(const char *pszDstFilename, const char *pszSrcFilename, const char *pszComment, 190 181 PFNVMPROGRESS pfnProgress, void *pvUser); 191 192 /**193 * Converts image file from older VDI formats to current one.194 *195 * @returns VBox status code.196 * @param pszFilename Name of the image file to convert.197 * @param pfnProgress Progress callback. Optional. NULL if not to be used.198 * @param pvUser User argument for the progress callback.199 */200 VBOXDDU_DECL(int) VDIConvertImage(const char *pszFilename, PFNVMPROGRESS pfnProgress, void *pvUser);201 182 202 183 /** … … 208 189 * @param pvUser User argument for the progress callback. 209 190 */ 210 VBOXDDU_DECL(int) V DIShrinkImage(const char *pszFilename, PFNVMPROGRESS pfnProgress, void *pvUser);191 VBOXDDU_DECL(int) VMDKShrinkImage(const char *pszFilename, PFNVMPROGRESS pfnProgress, void *pvUser); 211 192 212 193 /** … … 220 201 * @param pParentModificationUuid Where to store parent modification UUID (can be NULL). 221 202 */ 222 VBOXDDU_DECL(int) V DIGetImageUUIDs(const char *pszFilename,203 VBOXDDU_DECL(int) VMDKGetImageUUIDs(const char *pszFilename, 223 204 PRTUUID pUuid, PRTUUID pModificationUuid, 224 205 PRTUUID pParentUuid, PRTUUID pParentModificationUuid); … … 235 216 * @param pParentModificationUuid Optional parameter, new parent modification UUID of the image. 236 217 */ 237 VBOXDDU_DECL(int) V DISetImageUUIDs(const char *pszFilename,218 VBOXDDU_DECL(int) VMDKSetImageUUIDs(const char *pszFilename, 238 219 PCRTUUID pUuid, PCRTUUID pModificationUuid, 239 220 PCRTUUID pParentUuid, PCRTUUID pParentModificationUuid); … … 245 226 * @param pszFilenameFrom Name of the image file to merge from. 246 227 * @param pszFilenameTo Name of the image file to merge into. 247 * @param pfnProgress Progress callback. Optional. NULL if not to be used.248 * @param pvUser User argument for the progress callback.249 */ 250 VBOXDDU_DECL(int) V DIMergeImage(const char *pszFilenameFrom, const char *pszFilenameTo,228 * @param pfnProgress Progress callback. Optional. NULL if not to be used. 229 * @param pvUser User argument for the progress callback. 230 */ 231 VBOXDDU_DECL(int) VMDKMergeImage(const char *pszFilenameFrom, const char *pszFilenameTo, 251 232 PFNVMPROGRESS pfnProgress, void *pvUser); 252 233 253 234 254 235 /** 255 * Allocates and initializes an empty V DIHDD container.236 * Allocates and initializes an empty VMDK HDD container. 256 237 * No image files are opened. 257 238 * … … 259 240 * @returns NULL on failure, typically out of memory. 260 241 */ 261 VBOXDDU_DECL(PV DIDISK) VDIDiskCreate(void);262 263 /** 264 * Destroys the V DIHDD container. If container has opened image files they will be closed.265 * 266 * @param pDisk Pointer to V DIHDD container.267 */ 268 VBOXDDU_DECL(void) V DIDiskDestroy(PVDIDISK pDisk);242 VBOXDDU_DECL(PVMDKDISK) VMDKDiskCreate(void); 243 244 /** 245 * Destroys the VMDK HDD container. If container has opened image files they will be closed. 246 * 247 * @param pDisk Pointer to VMDK HDD container. 248 */ 249 VBOXDDU_DECL(void) VMDKDiskDestroy(PVMDKDISK pDisk); 269 250 270 251 /** … … 279 260 * 280 261 * Note that the image can be opened in read-only mode if a read/write open is not possible. 281 * Use V DIDiskIsReadOnly to check open mode.282 * 283 * @returns VBox status code. 284 * @param pDisk Pointer to V DIHDD container.262 * Use VMDKDiskIsReadOnly to check open mode. 263 * 264 * @returns VBox status code. 265 * @param pDisk Pointer to VMDK HDD container. 285 266 * @param pszFilename Name of the image file to open. 286 * @param fOpen Image file open mode, see V DI_OPEN_FLAGS_* constants.287 */ 288 VBOXDDU_DECL(int) V DIDiskOpenImage(PVDIDISK pDisk, const char *pszFilename, unsigned fOpen);267 * @param fOpen Image file open mode, see VMDK_OPEN_FLAGS_* constants. 268 */ 269 VBOXDDU_DECL(int) VMDKDiskOpenImage(PVMDKDISK pDisk, const char *pszFilename, unsigned fOpen); 289 270 290 271 /** 291 272 * Creates and opens a new differencing image file in HDD container. 292 * See comments for V DIDiskOpenImage function about differencing images.293 * 294 * @returns VBox status code. 295 * @param pDisk Pointer to V DIHDD container.273 * See comments for VMDKDiskOpenImage function about differencing images. 274 * 275 * @returns VBox status code. 276 * @param pDisk Pointer to VMDK HDD container. 296 277 * @param pszFilename Name of the image file to create and open. 297 278 * @param pszComment Pointer to image comment. NULL is ok. … … 299 280 * @param pvUser User argument for the progress callback. 300 281 */ 301 VBOXDDU_DECL(int) V DIDiskCreateOpenDifferenceImage(PVDIDISK pDisk, const char *pszFilename, const char *pszComment,282 VBOXDDU_DECL(int) VMDKDiskCreateOpenDifferenceImage(PVMDKDISK pDisk, const char *pszFilename, const char *pszComment, 302 283 PFNVMPROGRESS pfnProgress, void *pvUser); 303 284 … … 308 289 * will be reopened in read/write mode. 309 290 * 310 * @param pDisk Pointer to V DIHDD container.311 */ 312 VBOXDDU_DECL(void) V DIDiskCloseImage(PVDIDISK pDisk);291 * @param pDisk Pointer to VMDK HDD container. 292 */ 293 VBOXDDU_DECL(void) VMDKDiskCloseImage(PVMDKDISK pDisk); 313 294 314 295 /** 315 296 * Closes all opened image files in HDD container. 316 297 * 317 * @param pDisk Pointer to V DIHDD container.318 */ 319 VBOXDDU_DECL(void) V DIDiskCloseAllImages(PVDIDISK pDisk);298 * @param pDisk Pointer to VMDK HDD container. 299 */ 300 VBOXDDU_DECL(void) VMDKDiskCloseAllImages(PVMDKDISK pDisk); 320 301 321 302 /** … … 325 306 * After successfull commit the previous image file again reopened in read-only mode, last opened 326 307 * image file is cleared of data and remains open and active in HDD container. 327 * If you want to delete image after commit you must do it manually by V DIDiskCloseImage and328 * V DIDeleteImage calls.308 * If you want to delete image after commit you must do it manually by VMDKDiskCloseImage and 309 * VMDKDeleteImage calls. 329 310 * 330 311 * Note that in case of unrecoverable error all images of HDD container will be closed. 331 312 * 332 313 * @returns VBox status code. 333 * @param pDisk Pointer to V DIHDD container.314 * @param pDisk Pointer to VMDK HDD container. 334 315 * @param pfnProgress Progress callback. Optional. 335 316 * @param pvUser User argument for the progress callback. 336 317 */ 337 VBOXDDU_DECL(int) V DIDiskCommitLastDiff(PVDIDISK pDisk, PFNVMPROGRESS pfnProgress, void *pvUser);338 339 /** 340 * Get read/write mode of V DIHDD.318 VBOXDDU_DECL(int) VMDKDiskCommitLastDiff(PVMDKDISK pDisk, PFNVMPROGRESS pfnProgress, void *pvUser); 319 320 /** 321 * Get read/write mode of VMDK HDD. 341 322 * 342 323 * @returns Disk ReadOnly status. 343 * @returns true if no one VDIimage is opened in HDD container.344 */ 345 VBOXDDU_DECL(bool) V DIDiskIsReadOnly(PVDIDISK pDisk);346 347 /** 348 * Get total disk size of the V DIHDD container.324 * @returns true if no VMDK image is opened in HDD container. 325 */ 326 VBOXDDU_DECL(bool) VMDKDiskIsReadOnly(PVMDKDISK pDisk); 327 328 /** 329 * Get total disk size of the VMDK HDD container. 349 330 * 350 331 * @returns Virtual disk size in bytes. 351 * @returns 0 if no one VDIimage is opened in HDD container.352 */ 353 VBOXDDU_DECL(uint64_t) V DIDiskGetSize(PVDIDISK pDisk);354 355 /** 356 * Get block size of the V DIHDD container.357 * 358 * @returns V DIimage block size in bytes.359 * @returns 0 if no one VDIimage is opened in HDD container.360 */ 361 VBOXDDU_DECL(unsigned) V DIDiskGetBlockSize(PVDIDISK pDisk);362 363 /** 364 * Get working buffer size of the V DIHDD container.332 * @returns 0 if no VMDK image is opened in HDD container. 333 */ 334 VBOXDDU_DECL(uint64_t) VMDKDiskGetSize(PVMDKDISK pDisk); 335 336 /** 337 * Get block size of the VMDK HDD container. 338 * 339 * @returns VMDK image block size in bytes. 340 * @returns 0 if no VMDK image is opened in HDD container. 341 */ 342 VBOXDDU_DECL(unsigned) VMDKDiskGetBlockSize(PVMDKDISK pDisk); 343 344 /** 345 * Get working buffer size of the VMDK HDD container. 365 346 * 366 347 * @returns Working buffer size in bytes. 367 348 */ 368 VBOXDDU_DECL(unsigned) V DIDiskGetBufferSize(PVDIDISK pDisk);349 VBOXDDU_DECL(unsigned) VMDKDiskGetBufferSize(PVMDKDISK pDisk); 369 350 370 351 /** … … 372 353 * 373 354 * @returns VBox status code. 374 * @returns VERR_VDI_NOT_OPENED if no one VDIimage is opened in HDD container.355 * @returns VERR_VDI_NOT_OPENED if no VMDK image is opened in HDD container. 375 356 * @returns VERR_VDI_GEOMETRY_NOT_SET if no geometry present in the HDD container. 376 * @param pDisk Pointer to V DIHDD container.357 * @param pDisk Pointer to VMDK HDD container. 377 358 * @param pcCylinders Where to store the number of cylinders. NULL is ok. 378 359 * @param pcHeads Where to store the number of heads. NULL is ok. 379 360 * @param pcSectors Where to store the number of sectors. NULL is ok. 380 361 */ 381 VBOXDDU_DECL(int) V DIDiskGetGeometry(PVDIDISK pDisk, unsigned *pcCylinders, unsigned *pcHeads, unsigned *pcSectors);362 VBOXDDU_DECL(int) VMDKDiskGetGeometry(PVMDKDISK pDisk, unsigned *pcCylinders, unsigned *pcHeads, unsigned *pcSectors); 382 363 383 364 /** … … 387 368 * 388 369 * @returns VBox status code. 389 * @returns VERR_VDI_NOT_OPENED if no one VDIimage is opened in HDD container.390 * @param pDisk Pointer to V DIHDD container.370 * @returns VERR_VDI_NOT_OPENED if no VMDK image is opened in HDD container. 371 * @param pDisk Pointer to VMDK HDD container. 391 372 * @param cCylinders Number of cylinders. 392 373 * @param cHeads Number of heads. 393 374 * @param cSectors Number of sectors. 394 375 */ 395 VBOXDDU_DECL(int) V DIDiskSetGeometry(PVDIDISK pDisk, unsigned cCylinders, unsigned cHeads, unsigned cSectors);376 VBOXDDU_DECL(int) VMDKDiskSetGeometry(PVMDKDISK pDisk, unsigned cCylinders, unsigned cHeads, unsigned cSectors); 396 377 397 378 /** … … 399 380 * 400 381 * @returns VBox status code. 401 * @returns VERR_VDI_NOT_OPENED if no one VDIimage is opened in HDD container.402 * @param pDisk Pointer to V DIHDD container.382 * @returns VERR_VDI_NOT_OPENED if no VMDK image is opened in HDD container. 383 * @param pDisk Pointer to VMDK HDD container. 403 384 * @param penmTranslation Where to store the translation mode (see pdm.h). 404 385 */ 405 VBOXDDU_DECL(int) V DIDiskGetTranslation(PVDIDISK pDisk, PPDMBIOSTRANSLATION penmTranslation);386 VBOXDDU_DECL(int) VMDKDiskGetTranslation(PVMDKDISK pDisk, PPDMBIOSTRANSLATION penmTranslation); 406 387 407 388 /** … … 411 392 * 412 393 * @returns VBox status code. 413 * @returns VERR_VDI_NOT_OPENED if no one VDIimage is opened in HDD container.414 * @param pDisk Pointer to V DIHDD container.394 * @returns VERR_VDI_NOT_OPENED if no VMDK image is opened in HDD container. 395 * @param pDisk Pointer to VMDK HDD container. 415 396 * @param enmTranslation Translation mode (see pdm.h). 416 397 */ 417 VBOXDDU_DECL(int) V DIDiskSetTranslation(PVDIDISK pDisk, PDMBIOSTRANSLATION enmTranslation);398 VBOXDDU_DECL(int) VMDKDiskSetTranslation(PVMDKDISK pDisk, PDMBIOSTRANSLATION enmTranslation); 418 399 419 400 /** … … 421 402 * 422 403 * @returns Number of opened images for HDD container. 0 if no images has been opened. 423 * @param pDisk Pointer to V DIHDD container.424 */ 425 VBOXDDU_DECL(int) V DIDiskGetImagesCount(PVDIDISK pDisk);404 * @param pDisk Pointer to VMDK HDD container. 405 */ 406 VBOXDDU_DECL(int) VMDKDiskGetImagesCount(PVMDKDISK pDisk); 426 407 427 408 /** … … 430 411 * @returns VBox status code. 431 412 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 432 * @param pDisk Pointer to V DIHDD container.413 * @param pDisk Pointer to VMDK HDD container. 433 414 * @param nImage Image number, counts from 0. 0 is always base image of container. 434 415 * @param puVersion Where to store the image version. 435 416 */ 436 VBOXDDU_DECL(int) V DIDiskGetImageVersion(PVDIDISK pDisk, int nImage, unsigned *puVersion);417 VBOXDDU_DECL(int) VMDKDiskGetImageVersion(PVMDKDISK pDisk, int nImage, unsigned *puVersion); 437 418 438 419 /** … … 441 422 * @returns VBox status code. 442 423 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 443 * @param pDisk Pointer to V DIHDD container.424 * @param pDisk Pointer to VMDK HDD container. 444 425 * @param nImage Image number, counts from 0. 0 is always base image of container. 445 426 * @param penmType Where to store the image type. 446 427 */ 447 VBOXDDU_DECL(int) V DIDiskGetImageType(PVDIDISK pDisk, int nImage, PVDIIMAGETYPE penmType);428 VBOXDDU_DECL(int) VMDKDiskGetImageType(PVMDKDISK pDisk, int nImage, PVMDKIMAGETYPE penmType); 448 429 449 430 /** … … 452 433 * @returns VBox status code. 453 434 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 454 * @param pDisk Pointer to V DIHDD container.435 * @param pDisk Pointer to VMDK HDD container. 455 436 * @param nImage Image number, counts from 0. 0 is always base image of container. 456 437 * @param pfFlags Where to store the image flags. 457 438 */ 458 VBOXDDU_DECL(int) V DIDiskGetImageFlags(PVDIDISK pDisk, int nImage, unsigned *pfFlags);459 460 /** 461 * Get filename of opened image of HDD container.439 VBOXDDU_DECL(int) VMDKDiskGetImageFlags(PVMDKDISK pDisk, int nImage, unsigned *pfFlags); 440 441 /** 442 * Get base filename of opened image of HDD container. 462 443 * 463 444 * @returns VBox status code. 464 445 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 465 446 * @returns VERR_BUFFER_OVERFLOW if pszFilename buffer too small to hold filename. 466 * @param pDisk Pointer to V DIHDD container.447 * @param pDisk Pointer to VMDK HDD container. 467 448 * @param nImage Image number, counts from 0. 0 is always base image of container. 468 449 * @param pszFilename Where to store the image file name. 469 450 * @param cbFilename Size of buffer pszFilename points to. 470 451 */ 471 VBOXDDU_DECL(int) V DIDiskGetImageFilename(PVDIDISK pDisk, int nImage, char *pszFilename, unsigned cbFilename);452 VBOXDDU_DECL(int) VMDKDiskGetImageFilename(PVMDKDISK pDisk, int nImage, char *pszFilename, unsigned cbFilename); 472 453 473 454 /** … … 477 458 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 478 459 * @returns VERR_BUFFER_OVERFLOW if pszComment buffer too small to hold comment text. 479 * @param pDisk Pointer to V DIHDD container.460 * @param pDisk Pointer to VMDK HDD container. 480 461 * @param nImage Image number, counts from 0. 0 is always base image of container. 481 462 * @param pszComment Where to store the comment string of image. NULL is ok. 482 463 * @param cbComment The size of pszComment buffer. 0 is ok. 483 464 */ 484 VBOXDDU_DECL(int) V DIDiskGetImageComment(PVDIDISK pDisk, int nImage, char *pszComment, unsigned cbComment);465 VBOXDDU_DECL(int) VMDKDiskGetImageComment(PVMDKDISK pDisk, int nImage, char *pszComment, unsigned cbComment); 485 466 486 467 /** … … 489 470 * @returns VBox status code. 490 471 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 491 * @param pDisk Pointer to V DIHDD container.472 * @param pDisk Pointer to VMDK HDD container. 492 473 * @param nImage Image number, counts from 0. 0 is always base image of container. 493 474 * @param pUuid Where to store the image creation uuid. 494 475 */ 495 VBOXDDU_DECL(int) V DIDiskGetImageUuid(PVDIDISK pDisk, int nImage, PRTUUID pUuid);476 VBOXDDU_DECL(int) VMDKDiskGetImageUuid(PVMDKDISK pDisk, int nImage, PRTUUID pUuid); 496 477 497 478 /** … … 500 481 * @returns VBox status code. 501 482 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 502 * @param pDisk Pointer to V DIHDD container.483 * @param pDisk Pointer to VMDK HDD container. 503 484 * @param nImage Image number, counts from 0. 0 is always base image of container. 504 485 * @param pUuid Where to store the image modification uuid. 505 486 */ 506 VBOXDDU_DECL(int) V DIDiskGetImageModificationUuid(PVDIDISK pDisk, int nImage, PRTUUID pUuid);487 VBOXDDU_DECL(int) VMDKDiskGetImageModificationUuid(PVMDKDISK pDisk, int nImage, PRTUUID pUuid); 507 488 508 489 /** … … 511 492 * @returns VBox status code. 512 493 * @returns VERR_VDI_IMAGE_NOT_FOUND if image with specified number was not opened. 513 * @param pDisk Pointer to V DIHDD container.494 * @param pDisk Pointer to VMDK HDD container. 514 495 * @param nImage Image number, counts from 0. 0 is always base image of the container. 515 496 * @param pUuid Where to store the image creation uuid. 516 497 */ 517 VBOXDDU_DECL(int) V DIDiskGetParentImageUuid(PVDIDISK pDisk, int nImage, PRTUUID pUuid);498 VBOXDDU_DECL(int) VMDKDiskGetParentImageUuid(PVMDKDISK pDisk, int nImage, PRTUUID pUuid); 518 499 519 500 /** … … 521 502 * 522 503 * @returns VBox status code. 523 * @param pDisk Pointer to V DIHDD container.504 * @param pDisk Pointer to VMDK HDD container. 524 505 * @param offStart Offset of first reading byte from start of disk. 525 506 * @param pvBuf Pointer to buffer for reading data. 526 507 * @param cbToRead Number of bytes to read. 527 508 */ 528 VBOXDDU_DECL(int) V DIDiskRead(PVDIDISK pDisk, uint64_t offStart, void *pvBuf, unsigned cbToRead);509 VBOXDDU_DECL(int) VMDKDiskRead(PVMDKDISK pDisk, uint64_t offStart, void *pvBuf, unsigned cbToRead); 529 510 530 511 /** … … 532 513 * 533 514 * @returns VBox status code. 534 * @param pDisk Pointer to V DIHDD container.515 * @param pDisk Pointer to VMDK HDD container. 535 516 * @param offStart Offset of first writing byte from start of HDD. 536 517 * @param pvBuf Pointer to buffer of writing data. 537 518 * @param cbToWrite Number of bytes to write. 538 519 */ 539 VBOXDDU_DECL(int) V DIDiskWrite(PVDIDISK pDisk, uint64_t offStart, const void *pvBuf, unsigned cbToWrite);520 VBOXDDU_DECL(int) VMDKDiskWrite(PVMDKDISK pDisk, uint64_t offStart, const void *pvBuf, unsigned cbToWrite); 540 521 541 522 … … 544 525 * Debug helper - dumps all opened images of HDD container into the log file. 545 526 * 546 * @param pDisk Pointer to V DIHDD container.547 */ 548 VBOXDDU_DECL(void) V DIDiskDumpImages(PVDIDISK pDisk);527 * @param pDisk Pointer to VMDK HDD container. 528 */ 529 VBOXDDU_DECL(void) VMDKDiskDumpImages(PVMDKDISK pDisk); 549 530 550 531 __END_DECLS
Note:
See TracChangeset
for help on using the changeset viewer.