VirtualBox

Changeset 25708 in vbox


Ignore:
Timestamp:
Jan 11, 2010 10:14:35 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56445
Message:

VBoxServiceUtils: Extended logging for VBoxServiceWritePropF().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp

    r25476 r25708  
    156156 * @param   pszName         The property name.
    157157 * @param   pszValueFormat  The property format string.  If this is NULL then
    158  *                          the property will be removed.
     158 *                          the property will be deleted (if possible).
    159159 * @param   ...             Format arguments.
    160160 */
    161161int VBoxServiceWritePropF(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, ...)
    162162{
     163    AssertPtr(pszName);
    163164    int rc;
    164165    if (pszValueFormat != NULL)
    165166    {
    166         /** @todo Log the value as well? just copy the guts of
    167          *        VbglR3GuestPropWriteValueV. */
    168         VBoxServiceVerbose(3, "Writing guest property \"%s\"\n", pszName);
    169167        va_list va;
    170168        va_start(va, pszValueFormat);
     169
     170        char *pszValue = RTStrAPrintf2V(pszValueFormat, va);
     171        AssertPtr(pszValue);
     172        VBoxServiceVerbose(3, "Writing guest property \"%s\" = \"%s\"\n", pszName, pszValue);
     173        RTStrFree(pszValue);
     174
    171175        rc = VbglR3GuestPropWriteValueV(u32ClientId, pszName, pszValueFormat, va);
    172176        va_end(va);
     
    176180    else
    177181    {
     182        VBoxServiceVerbose(3, "Deleting guest property \"%s\"\n", pszName);   
    178183        rc = VbglR3GuestPropWriteValue(u32ClientId, pszName, NULL);
    179184        if (RT_FAILURE(rc))
    180             VBoxServiceError("Error removing guest property \"%s\" (rc=%Rrc)\n", pszName, rc);
     185            VBoxServiceError("Error deleting guest property \"%s\" (rc=%Rrc)\n", pszName, rc);
    181186    }
    182187    return rc;
Note: See TracChangeset for help on using the changeset viewer.

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