Changeset 25708 in vbox
- Timestamp:
- Jan 11, 2010 10:14:35 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56445
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp
r25476 r25708 156 156 * @param pszName The property name. 157 157 * @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). 159 159 * @param ... Format arguments. 160 160 */ 161 161 int VBoxServiceWritePropF(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, ...) 162 162 { 163 AssertPtr(pszName); 163 164 int rc; 164 165 if (pszValueFormat != NULL) 165 166 { 166 /** @todo Log the value as well? just copy the guts of167 * VbglR3GuestPropWriteValueV. */168 VBoxServiceVerbose(3, "Writing guest property \"%s\"\n", pszName);169 167 va_list va; 170 168 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 171 175 rc = VbglR3GuestPropWriteValueV(u32ClientId, pszName, pszValueFormat, va); 172 176 va_end(va); … … 176 180 else 177 181 { 182 VBoxServiceVerbose(3, "Deleting guest property \"%s\"\n", pszName); 178 183 rc = VbglR3GuestPropWriteValue(u32ClientId, pszName, NULL); 179 184 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); 181 186 } 182 187 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.