Changeset 83797 in vbox
- Timestamp:
- Apr 18, 2020 1:52:37 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxAutostart
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-posix.cpp
r82968 r83797 53 53 #include <iprt/dir.h> 54 54 55 #include <algorithm>56 #include <list>57 #include <string>58 55 #include <signal.h> 59 56 … … 268 265 269 266 RTStrmPrintf(g_pStdErr, 270 "Usage:\n" 271 " %s [-v|--verbose] [-h|-?|--help]\n" 272 " [-F|--logfile=<file>] [-R|--logrotate=<num>] [-S|--logsize=<bytes>]\n" 273 " [-I|--loginterval=<seconds>]\n" 274 " [-c|--config=<config file>]\n", pszImage); 275 276 RTStrmPrintf(g_pStdErr, "\n" 267 "Usage: %s [-v|--verbose] [-h|-?|--help]\n" 268 " [-F|--logfile=<file>] [-R|--logrotate=<num>]\n" 269 " [-S|--logsize=<bytes>] [-I|--loginterval=<seconds>]\n" 270 " [-c|--config=<config file>]\n", 271 pszImage); 272 273 RTStrmPrintf(g_pStdErr, 274 "\n" 277 275 "Options:\n"); 278 279 for (unsigned i = 0; 280 i < RT_ELEMENTS(g_aOptions); 281 ++i) 282 { 283 std::string str(g_aOptions[i].pszLong); 276 for (unsigned i = 0; i < RT_ELEMENTS(g_aOptions); i++) 277 { 278 char szOptions[128]; 279 const char *pszOptions = g_aOptions[i].pszLong; 284 280 if (g_aOptions[i].iShort < 1000) /* Don't show short options which are defined by an ID! */ 285 281 { 286 str += ", -"; 287 str += g_aOptions[i].iShort; 288 } 289 str += ":"; 282 RTStrPrintf(szOptions, sizeof(szOptions), "%s, -%c", g_aOptions[i].pszLong, g_aOptions[i].iShort); 283 pszOptions = szOptions; 284 } 290 285 291 286 const char *pcszDescr = ""; 292 293 287 switch (g_aOptions[i].iShort) 294 288 { … … 324 318 } 325 319 326 RTStrmPrintf(g_pStdErr, "%-23s%s\n", str.c_str(), pcszDescr);320 RTStrmPrintf(g_pStdErr, "%-23s%s\n", pszOptions, pcszDescr); 327 321 } 328 322 -
trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-win.cpp
r83327 r83797 835 835 com::Utf8Str sDomain; 836 836 com::Utf8Str sUserTmp; 837 intrc = autostartGetDomainAndUser(pNode->pszKey, sDomain, sUserTmp);837 rc = autostartGetDomainAndUser(pNode->pszKey, sDomain, sUserTmp); 838 838 if (RT_FAILURE(rc)) 839 839 continue; … … 875 875 } 876 876 877 RTEXITCODE ec= autostartStartMain(pCfgAstUser);877 RTEXITCODE rcExit = autostartStartMain(pCfgAstUser); 878 878 autostartConfigAstDestroy(pCfgAst); 879 if ( ec!= RTEXITCODE_SUCCESS)879 if (rcExit != RTEXITCODE_SUCCESS) 880 880 autostartSvcLogError("Starting VMs failed\n"); 881 881 882 return ec;882 return rcExit; 883 883 } 884 884 -
trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStop.cpp
r82968 r83797 29 29 #include <iprt/message.h> 30 30 31 #include <algorithm>32 31 #include <list> 33 #include <string>34 32 35 33 #include "VBoxAutostart.h" -
trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostartUtils.cpp
r82968 r83797 30 30 #include <iprt/stream.h> 31 31 #include <iprt/log.h> 32 #include <iprt/path.h> 33 34 #include <algorithm> 35 #include <list> 36 #include <string> 32 #include <iprt/path.h> /* RTPATH_MAX */ 37 33 38 34 #include "VBoxAutostart.h"
Note:
See TracChangeset
for help on using the changeset viewer.