VirtualBox

Changeset 52308 in vbox


Ignore:
Timestamp:
Aug 6, 2014 6:47:47 PM (10 years ago)
Author:
vboxsync
Message:

Additions/common/VBoxGuestLib: change VbglR3GuestPropEnum() to return success if no properties are found.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp

    r52233 r52308  
    581581 *          the enumeration and *ppszName, *ppszValue, *pu64Timestamp and
    582582 *          *ppszFlags are set.
    583  * @retval  VERR_NOT_FOUND if no matching properties were found.  In this case
    584  *          the return parameters are not initialised.
    585583 * @retval  VERR_TOO_MUCH_DATA if it was not possible to determine the amount
    586584 *          of local space needed to store all the enumeration data.  This is
     
    597595 *                          on success.  This must be freed with
    598596 *                          VbglR3GuestPropEnumFree when it is no longer needed.
    599  * @param   ppszName        Where to store the first property name on success.
    600  *                          Should not be freed. Optional.
    601  * @param   ppszValue       Where to store the first property value on success.
    602  *                          Should not be freed. Optional.
    603  * @param   ppszValue       Where to store the first timestamp value on success.
    604  *                          Optional.
    605  * @param   ppszFlags       Where to store the first flags value on success.
    606  *                          Should not be freed. Optional.
     597 * @param  ppszName      Where to store the next property name.  This will be
     598 *                       set to NULL if there are no more properties to
     599 *                       enumerate.  This pointer should not be freed. Optional.
     600 * @param  ppszValue     Where to store the next property value.  This will be
     601 *                       set to NULL if there are no more properties to
     602 *                       enumerate.  This pointer should not be freed. Optional.
     603 * @param  pu64Timestamp Where to store the next property timestamp.  This
     604 *                       will be set to zero if there are no more properties
     605 *                       to enumerate. Optional.
     606 * @param  ppszFlags     Where to store the next property flags.  This will be
     607 *                       set to NULL if there are no more properties to
     608 *                       enumerate.  This pointer should not be freed. Optional.
     609 *
     610 * @remarks While all output parameters are optional, you need at least one to
     611 *          figure out when to stop.
    607612 */
    608613VBGLR3DECL(int) VbglR3GuestPropEnum(uint32_t u32ClientId,
     
    673678        rc = VbglR3GuestPropEnumNext(Handle.get(), ppszName, ppszValue,
    674679                                     pu64Timestamp, ppszFlags);
    675         if (RT_SUCCESS(rc) && *ppszName != NULL)
     680        if (RT_SUCCESS(rc))
    676681            *ppHandle = Handle.release();
    677         else if (RT_SUCCESS(rc))
    678             rc = VERR_NOT_FOUND; /* No matching properties found. */
    679682    }
    680683    else if (rc == VERR_BUFFER_OVERFLOW)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette