Changeset 10957 in vbox
- Timestamp:
- Jul 29, 2008 8:23:50 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 33827
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
r10956 r10957 437 437 * Raw API for enumerating guest properties which match a given pattern. 438 438 * 439 * @returns VINF_SUCCESS on success and pcBuf points to a packed array 439 * @returns VBox status code. 440 * @retval VINF_SUCCESS on success and pcBuf points to a packed array 440 441 * of the form <name>, <value>, <timestamp string>, <flags>, 441 442 * terminated by four empty strings. pcbBufActual will contain the 442 443 * total size of the array. 443 * @ret urnsVERR_BUFFER_OVERFLOW if the buffer provided was too small. In444 * @retval VERR_BUFFER_OVERFLOW if the buffer provided was too small. In 444 445 * this case pcbBufActual will contain the size of the buffer needed. 445 446 * @returns IPRT error code in other cases, and pchBufActual is undefined. 447 * 446 448 * @param u32ClientId The client ID returned by VbglR3GuestPropConnect 447 449 * @param paszPatterns A packed array of zero terminated strings, terminated … … 454 456 */ 455 457 VBGLR3DECL(int) VbglR3GuestPropEnumRaw(uint32_t u32ClientId, 456 const char *p aszPatterns,458 const char *pszzPatterns, 457 459 char *pcBuf, 458 460 uint32_t cbBuf, … … 467 469 /* Get the length of the patterns array... */ 468 470 uint32_t cchPatterns = 0; 469 for (uint32_t cchCurrent = strlen(p aszPatterns); cchCurrent != 0;470 cchCurrent = strlen(p aszPatterns + cchPatterns))471 for (uint32_t cchCurrent = strlen(pszzPatterns); cchCurrent != 0; 472 cchCurrent = strlen(pszzPatterns + cchPatterns)) 471 473 cchPatterns += cchCurrent + 1; 472 474 /* ...including the terminator. */ 473 475 ++cchPatterns; 474 VbglHGCMParmPtrSet(&Msg.patterns, const_cast<char *>(p aszPatterns),476 VbglHGCMParmPtrSet(&Msg.patterns, const_cast<char *>(pszzPatterns), 475 477 cchPatterns); 476 478 VbglHGCMParmPtrSet(&Msg.strings, pcBuf, cbBuf); … … 480 482 if (RT_SUCCESS(rc)) 481 483 rc = Msg.hdr.result; 482 if ( (RT_SUCCESS(rc) || (VERR_BUFFER_OVERFLOW == rc))483 && ( pcbBufActual != NULL)484 )484 if ( pcbBufActual 485 && ( RT_SUCCESS(rc) 486 || rc == VERR_BUFFER_OVERFLOW)) 485 487 { 486 488 int rc2 = VbglHGCMParmUInt32Get(&Msg.size, pcbBufActual);
Note:
See TracChangeset
for help on using the changeset viewer.