Changeset 20114 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 28, 2009 12:08:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/SSM.cpp
r18045 r20114 3417 3417 3418 3418 3419 /** 3420 * Skips a number of bytes in the current data unit. 3421 * 3422 * @returns VBox status code. 3423 * @param pSSM The SSM handle. 3424 * @param cb The number of bytes to skip. 3425 */ 3426 VMMR3DECL(int) SSMR3Skip(PSSMHANDLE pSSM, size_t cb) 3427 { 3428 AssertMsgReturn( pSSM->enmOp == SSMSTATE_LOAD_EXEC 3429 || pSSM->enmOp == SSMSTATE_OPEN_READ, 3430 ("Invalid state %d\n", pSSM->enmOp), 3431 VERR_SSM_INVALID_STATE); 3432 while (cb > 0) 3433 { 3434 uint8_t abBuf[8192]; 3435 size_t cbCur = RT_MIN(sizeof(abBuf), cb); 3436 cb -= cbCur; 3437 int rc = ssmR3Read(pSSM, abBuf, cbCur); 3438 if (RT_FAILURE(rc)) 3439 return rc; 3440 } 3441 3442 return VINF_SUCCESS; 3443 } 3444 3419 3445 3420 3446 /** … … 3472 3498 /** 3473 3499 * Get the current unit byte offset (uncompressed). 3474 * 3475 * @returns The offset. UINT64_MAX if called at a wrong time. 3476 * @param pSSM SSM operation handle. 3500 * 3501 * @returns The offset. UINT64_MAX if called at a wrong time. 3502 * @param pSSM SSM operation handle. 3477 3503 */ 3478 3504 VMMR3DECL(uint64_t) SSMR3HandleGetUnitOffset(PSSMHANDLE pSSM)
Note:
See TracChangeset
for help on using the changeset viewer.