Changeset 103858 in vbox for trunk/src/VBox/Frontends/VBoxAutostart
- Timestamp:
- Mar 14, 2024 5:01:42 PM (14 months ago)
- svn:sync-xref-src-repo-rev:
- 162229
- Location:
- trunk/src/VBox/Frontends/VBoxAutostart
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-win.cpp
r99828 r103858 112 112 *********************************************************************************************************************************/ 113 113 static SC_HANDLE autostartSvcWinOpenSCManager(const char *pszAction, DWORD dwAccess); 114 static RTEXITCODE autostartSvcWinShowHelp(void); 115 114 116 115 117 static int autostartGetProcessDomainUser(com::Utf8Str &aUser) … … 1100 1102 } 1101 1103 else 1102 autostartSvcLogError("RTSemEventMultiCreate failed, rc=%Rrc ", rc);1104 autostartSvcLogError("RTSemEventMultiCreate failed, rc=%Rrc\n", rc); 1103 1105 } 1104 1106 else … … 1220 1222 catch (...) 1221 1223 { 1222 autostartSvcLogError("runit failed, service name is not valid UTF-8 string or out of memory ");1224 autostartSvcLogError("runit failed, service name is not valid UTF-8 string or out of memory\n"); 1223 1225 return RTEXITCODE_FAILURE; 1224 1226 } … … 1232 1234 if (!pszServiceName) 1233 1235 { 1234 autostartSvcLogError("runit failed, service name is missing ");1236 autostartSvcLogError("runit failed, service name is missing\n"); 1235 1237 return RTEXITCODE_SYNTAX; 1236 1238 } … … 1372 1374 if (RT_FAILURE(rc)) 1373 1375 { 1374 autostartSvcLogError("RTR3InitExe failed with rc=%Rrc ", rc);1376 autostartSvcLogError("RTR3InitExe failed with rc=%Rrc\n", rc); 1375 1377 return RTEXITCODE_FAILURE; 1376 1378 } … … 1381 1383 enum 1382 1384 { 1383 kAutoSvcAction_RunIt, 1385 kAutoSvcAction_RunIt, /* Default action, also called by SCM. */ 1384 1386 1385 1387 kAutoSvcAction_Create, … … 1460 1462 { 1461 1463 case kAutoSvcAction_RunIt: 1462 return autostartSvcWinRunIt(argc - iArg, argv + iArg); 1464 { 1465 RTEXITCODE const rcExit = autostartSvcWinRunIt(argc - iArg, argv + iArg); 1466 if (rcExit == RTEXITCODE_SYNTAX) /* When called by a user (e.g. w/o specifying any command, print our syntax help. */ 1467 autostartSvcWinShowHelp(); 1468 return rcExit; 1469 } 1463 1470 1464 1471 case kAutoSvcAction_Create: … … 1489 1496 default: 1490 1497 AssertMsgFailed(("enmAction=%d\n", enmAction)); 1491 return RTEXITCODE_FAILURE; 1492 } 1493 } 1498 } 1499 1500 return RTEXITCODE_FAILURE; 1501 } -
trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostartUtils.cpp
r98103 r103858 234 234 { 235 235 RT_NOREF(pValue); 236 autostartSvcLogError("%s - RTGetOpt failure, %Rrc (%d): %s ", pszAction, rc, rc, iArg < argc ? argv[iArg] : "<null>");236 autostartSvcLogError("%s - RTGetOpt failure, %Rrc (%d): %s\n", pszAction, rc, rc, iArg < argc ? argv[iArg] : "<null>"); 237 237 return RTEXITCODE_SYNTAX; 238 238 } … … 241 241 { 242 242 AssertReturn(iArg < argc, RTEXITCODE_FAILURE); 243 autostartSvcLogError("%s - Too many arguments: %s ", pszAction, argv[iArg]);243 autostartSvcLogError("%s - Too many arguments: %s\n", pszAction, argv[iArg]); 244 244 for ( ; iArg < argc; iArg++) 245 245 LogRel(("arg#%i: %s\n", iArg, argv[iArg])); … … 251 251 RTStrmPrintf(g_pStdErr, "Error: "); 252 252 RTStrmPrintfV(g_pStdErr, pszFormat, va); 253 Log(("autostartSvcDisplayErrorV: %s ", pszFormat)); /** @todo format it! */253 Log(("autostartSvcDisplayErrorV: %s\n", pszFormat)); /** @todo format it! */ 254 254 return RTEXITCODE_FAILURE; 255 255 } … … 268 268 char szMsg[4096]; 269 269 RTGetOptFormatError(szMsg, sizeof(szMsg), rc, pValue); 270 autostartSvcDisplayError("%s - %s ", pszAction, szMsg);270 autostartSvcDisplayError("%s - %s\n", pszAction, szMsg); 271 271 return RTEXITCODE_SYNTAX; 272 272 }
Note:
See TracChangeset
for help on using the changeset viewer.