Changeset 22863 in vbox for trunk/src/VBox/Additions/common/VBoxService
- Timestamp:
- Sep 9, 2009 11:54:27 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp
r22809 r22863 140 140 *ppszValue = NULL; 141 141 142 char *pszPropNameUtf8;143 rc = RTStrCurrentCPToUtf8(&pszPropNameUtf8, pszPropName);144 if (RT_FAILURE(rc))145 {146 VBoxServiceError("Exec: Failed to convert property name %s to UTF-8: %Rrc",147 pszPropName, rc);148 return rc;149 }150 151 142 for (unsigned cTries = 0; cTries < 10; cTries++) 152 143 { … … 165 156 char *pszFlags; 166 157 uint64_t uTimestamp; 167 rc = VbglR3GuestPropRead(g_uExecGuestPropSvcClientID, pszPropName Utf8,158 rc = VbglR3GuestPropRead(g_uExecGuestPropSvcClientID, pszPropName, 168 159 pvBuf, cbBuf, 169 160 &pszValue, &uTimestamp, &pszFlags, NULL); … … 211 202 212 203 RTMemFree(pvBuf); 213 RTStrFree(pszPropNameUtf8);214 204 return rc; 215 205 } … … 295 285 /* add it */ 296 286 papszArgs[cUsed] = RTStrDupN(pszArgs, (uintptr_t)pszEnd - (uintptr_t)pszArgs); 297 if (!papszArgs[cUsed ++])287 if (!papszArgs[cUsed]) 298 288 break; 289 cUsed++; 299 290 300 291 /* advance */ … … 408 399 * Store the result in Set return value so the host knows what happend. 409 400 */ 410 char* pszValueUtf8; 411 rc = RTStrCurrentCPToUtf8(&pszValueUtf8, "/VirtualBox/HostGuest/SysprepRet"); 401 rc = VbglR3GuestPropWriteValueF(g_uExecGuestPropSvcClientID, 402 "/VirtualBox/HostGuest/SysprepRet", 403 "%d", Status.iStatus); 412 404 if (RT_FAILURE(rc)) 413 { 414 VBoxServiceError("Exec: Failed to convert SysprepVBoxRC name to UTF-8: rc=%Rrc\n", rc); 415 } 416 else 417 { 418 rc = VbglR3GuestPropWriteValueF(g_uExecGuestPropSvcClientID, 419 pszValueUtf8, 420 "%d", Status.iStatus); 421 if (RT_FAILURE(rc)) 422 VBoxServiceError("Exec: Failed to write SysprepRet: rc=%Rrc\n", rc); 423 RTStrFree(pszValueUtf8); 424 } 405 VBoxServiceError("Exec: Failed to write SysprepRet: rc=%Rrc\n", rc); 425 406 } 426 407 else … … 456 437 { 457 438 VBoxServiceVerbose(1, "Exec: Stopping sysprep processing (rc=%Rrc)\n", rc); 458 459 char* pszValueUtf8; 460 rc = RTStrCurrentCPToUtf8(&pszValueUtf8, "/VirtualBox/HostGuest/SysprepVBoxRC"); 439 rc = VbglR3GuestPropWriteValueF(g_uExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepVBoxRC", "%d", rc); 461 440 if (RT_FAILURE(rc)) 462 { 463 VBoxServiceError("Exec: Failed to convert SysprepVBoxRC name to UTF-8: rc=%Rrc\n", rc); 464 } 465 else 466 { 467 rc = VbglR3GuestPropWriteValueF(g_uExecGuestPropSvcClientID, pszValueUtf8, "%d", rc); 468 if (RT_FAILURE(rc)) 469 VBoxServiceError("Exec: Failed to write SysprepVBoxRC: rc=%Rrc\n", rc); 470 RTStrFree(pszValueUtf8); 471 } 441 VBoxServiceError("Exec: Failed to write SysprepVBoxRC: rc=%Rrc\n", rc); 472 442 fSysprepDone = true; 473 443 } 474 444 } 445 475 446 #ifdef FULL_FEATURED_EXEC 476 447 1. Read the command - value, timestamp and flags.
Note:
See TracChangeset
for help on using the changeset viewer.