Changeset 85877 in vbox for trunk/src/VBox/Runtime/include
- Timestamp:
- Aug 24, 2020 5:03:23 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 140048
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/dvm.h
r85124 r85877 138 138 139 139 /** 140 * Optional: Query the uuid of the current disk if applicable. 141 * 142 * @returns IPRT status code. 143 * @retval VERR_NOT_SUPPORTED if the partition scheme doesn't do UUIDs. 144 * @param hVolMgrFmt The format specific volume manager handle. 145 * @param pUuid Where to return the UUID. 146 */ 147 DECLCALLBACKMEMBER(int, pfnQueryDiskUuid,(RTDVMFMT hVolMgrFmt, PRTUUID pUuid)); 148 149 /** 140 150 * Gets the number of valid volumes in the map. 141 151 * … … 246 256 247 257 /** 258 * Queries the range of the partition table the volume belongs to on the underlying medium. 259 * 260 * @returns IPRT status code. 261 * @param hVolFmt The format specific volume handle. 262 * @param poffTable Where to return the byte offset on the underlying 263 * media of the (partition/volume/whatever) table. 264 * @param pcbTable Where to return the table size in bytes. This 265 * typically includes alignment padding. 266 * @sa RTDvmVolumeQueryTableLocation 267 */ 268 DECLCALLBACKMEMBER(int, pfnVolumeQueryTableLocation,(RTDVMVOLUMEFMT hVolFmt, uint64_t *poffStart, uint64_t *poffLast)); 269 270 /** 271 * Gets the tiven index for the specified volume. 272 * 273 * @returns The requested index. UINT32_MAX on failure. 274 * @param hVolFmt The format specific volume handle. 275 * @param enmIndex The index to get. 276 * @sa RTDvmVolumeGetIndex 277 */ 278 DECLCALLBACKMEMBER(uint32_t, pfnVolumeGetIndex,(RTDVMVOLUMEFMT hVolFmt, RTDVMVOLIDX enmIndex)); 279 280 /** 281 * Query a generic volume property. 282 * 283 * This is an extensible interface for retriving mostly format specific 284 * information, or information that's not commonly used. (It's modelled after 285 * RTLdrQueryPropEx.) 286 * 287 * @returns IPRT status code. 288 * @retval VERR_NOT_SUPPORTED if the property query isn't supported (either all 289 * or that specific property). The caller must handle this result. 290 * @retval VERR_NOT_FOUND is currently not returned, but intended for cases 291 * where it wasn't present in the tables. 292 * @retval VERR_INVALID_FUNCTION if the @a enmProperty value is wrong. 293 * @retval VERR_INVALID_PARAMETER if the fixed buffer size is wrong. Correct 294 * size in @a *pcbRet. 295 * @retval VERR_BUFFER_OVERFLOW if the property doesn't have a fixed size 296 * buffer and the buffer isn't big enough. Correct size in @a *pcbRet. 297 * @retval VERR_INVALID_HANDLE if the handle is invalid. 298 * 299 * @param hVolFmt Handle to the volume. 300 * @param enmProperty The property to query. 301 * @param pvBuf Pointer to the input / output buffer. In most cases 302 * it's only used for returning data. 303 * @param cbBuf The size of the buffer. This is validated by the common 304 * code for all fixed typed & sized properties. The 305 * interger properties may have several supported sizes, in 306 * which case the user value is passed along as-is but it 307 * is okay to return a smaller amount of data. The common 308 * code will make upcast the data. 309 * @param pcbRet Where to return the amount of data returned. This must 310 * be set even for fixed type/sized data. 311 * @sa RTDvmVolumeQueryProp, RTDvmVolumeGetPropU64 312 */ 313 DECLCALLBACKMEMBER(int, pfnVolumeQueryProp,(RTDVMVOLUMEFMT hVolFmt, RTDVMVOLPROP enmProperty, 314 void *pvBuf, size_t cbBuf, size_t *pcbBuf)); 315 316 /** 248 317 * Read data from the given volume. 249 318 * … … 300 369 * @param pvBuf Destination buffer. 301 370 * @param cbRead How much to read. 371 * @sa rtDvmDiskReadUnaligned 302 372 */ 303 373 DECLINLINE(int) rtDvmDiskRead(PCRTDVMDISK pDisk, uint64_t off, void *pvBuf, size_t cbRead) … … 308 378 AssertReturn(off + cbRead <= pDisk->cbDisk, VERR_INVALID_PARAMETER); 309 379 380 /* Use RTVfsFileReadAt if these triggers: */ 381 Assert(!(cbRead % pDisk->cbSector)); 382 Assert(!(off % pDisk->cbSector)); 383 310 384 return RTVfsFileReadAt(pDisk->hVfsFile, off, pvBuf, cbRead, NULL /*pcbRead*/); 311 385 } 386 387 DECLHIDDEN(int) rtDvmDiskReadUnaligned(PCRTDVMDISK pDisk, uint64_t off, void *pvBuf, size_t cbRead); 312 388 313 389 /** … … 327 403 AssertReturn(off + cbWrite <= pDisk->cbDisk, VERR_INVALID_PARAMETER); 328 404 405 /* Write RTVfsFileReadAt if these triggers: */ 406 Assert(!(cbWrite % pDisk->cbSector)); 407 Assert(!(off % pDisk->cbSector)); 408 329 409 return RTVfsFileWriteAt(pDisk->hVfsFile, off, pvBuf, cbWrite, NULL /*pcbWritten*/); 330 410 }
Note:
See TracChangeset
for help on using the changeset viewer.