Changeset 40027 in vbox for trunk/include
- Timestamp:
- Feb 7, 2012 11:09:31 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 76150
- Location:
- trunk/include/iprt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/dvm.h
r37024 r40027 77 77 } RTDVMVOLTYPE; 78 78 79 /** @defgroup grp_dvm_flags Flags used by RTDvmCreate. 80 * @{ */ 81 /** DVM flags - Blocks are always marked as unused if the volume has 82 * no block status callback set. 83 * The default is to mark them as used. */ 84 #define DVM_FLAGS_NO_STATUS_CALLBACK_MARK_AS_UNUSED RT_BIT_32(0) 85 /** DVM flags - Space which is unused in the map will be marked as used 86 * when calling RTDvmMapQueryBlockStatus(). */ 87 #define DVM_FLAGS_UNUSED_SPACE_MARK_AS_USED RT_BIT_32(1) 88 /** Mask of all valid flags. */ 89 #define DVM_FLAGS_MASK (DVM_FLAGS_NO_STATUS_CALLBACK_MARK_AS_UNUSED | DVM_FLAGS_UNUSED_SPACE_MARK_AS_USED) 90 /** @} */ 91 79 92 80 93 /** @defgroup grp_dvm_vol_flags Volume flags used by DVMVolumeGetFlags. … … 125 138 /** Pointer to a read callback. */ 126 139 typedef FNDVMWRITE *PFNDVMWRITE; 140 141 /** 142 * Callback for querying the block allocation status of a volume. 143 * 144 * @returns IPRT status code. 145 * @param pvUser Opaque user data passed when setting the callback. 146 * @param off Offset relative to the start of the volume. 147 * @param cb Range to check in bytes. 148 * @param pfAllocated Where to store the allocation status on success. 149 */ 150 typedef DECLCALLBACK(int) FNDVMVOLUMEQUERYBLOCKSTATUS(void *pvUser, uint64_t off, 151 uint64_t cb, bool *pfAllocated); 152 /** Pointer to a query block allocation status callback. */ 153 typedef FNDVMVOLUMEQUERYBLOCKSTATUS *PFNDVMVOLUMEQUERYBLOCKSTATUS; 127 154 128 155 /** … … 138 165 * @param cbDisk Size of the underlying disk in bytes. 139 166 * @param cbSector Size of one sector in bytes. 167 * @param fFlags Combination of RTDVM_FLAGS_* 140 168 * @param pvUser Opaque user data passed to the callbacks. 141 169 */ 142 170 RTDECL(int) RTDvmCreate(PRTDVM phVolMgr, PFNDVMREAD pfnRead, 143 171 PFNDVMWRITE pfnWrite, uint64_t cbDisk, 144 uint64_t cbSector, void *pvUser); 172 uint64_t cbSector, uint32_t fFlags, 173 void *pvUser); 145 174 146 175 /** … … 225 254 226 255 /** 256 * Returns whether the given block on the disk is in use. 257 * 258 * @returns IPRT status code. 259 * @param hVolMgr The volume manager handler. 260 * @param off The start offset to check for. 261 * @param cb The range in bytes to check. 262 * @param pfAllocated Where to store the status on success. 263 * 264 * @remark This method will return true even if a part of the range is not in use. 265 */ 266 RTDECL(int) RTDvmMapQueryBlockStatus(RTDVM hVolMgr, uint64_t off, uint64_t cb, 267 bool *pfAllocated); 268 269 /** 227 270 * Retains a valid volume handle. 228 271 * … … 239 282 */ 240 283 RTDECL(uint32_t) RTDvmVolumeRelease(RTDVMVOLUME hVol); 284 285 /** 286 * Sets the callback to query the block allocation status for a volume. 287 * This overwrites any other callback set previously. 288 * 289 * @returns nothing. 290 * @param hVol The volume handle. 291 * @param pfnQueryBlockStatus The callback to set. Can be NULL to disable 292 * a previous callback. 293 * @param pvUser Opaque user data passed in the callback. 294 */ 295 RTDECL(void) RTDvmVolumeSetQueryBlockStatusCallback(RTDVMVOLUME hVol, 296 PFNDVMVOLUMEQUERYBLOCKSTATUS pfnQueryBlockStatus, 297 void *pvUser); 241 298 242 299 /** -
trunk/include/iprt/mangling.h
r39910 r40027 410 410 # define RTDvmMapGetValidVolumes RT_MANGLER(RTDvmMapGetValidVolumes) 411 411 # define RTDvmMapGetMaxVolumes RT_MANGLER(RTDvmMapGetMaxVolumes) 412 # define RTDvmMapQueryBlockStatus RT_MANGLER(RTDvmMapQueryBlockStatus) 412 413 # define RTDvmMapQueryFirstVolume RT_MANGLER(RTDvmMapQueryFirstVolume) 413 414 # define RTDvmMapQueryNextVolume RT_MANGLER(RTDvmMapQueryNextVolume) … … 420 421 # define RTDvmVolumeRead RT_MANGLER(RTDvmVolumeRead) 421 422 # define RTDvmVolumeWrite RT_MANGLER(RTDvmVolumeWrite) 423 # define RTDvmVolumeSetQueryBlockStatusCallback RT_MANGLER(RTDvmVolumeSetQueryBlockStatusCallback) 422 424 # define RTDvmVolumeTypeGetDescr RT_MANGLER(RTDvmVolumeTypeGetDescr) 423 425 # define RTEnvClone RT_MANGLER(RTEnvClone)
Note:
See TracChangeset
for help on using the changeset viewer.