Changeset 89597 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jun 10, 2021 12:41:30 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r88086 r89597 2359 2359 break; 2360 2360 } 2361 else if (!strncmp(a->argv[1], "autostart-enabled", 17)) 2362 { 2363 if (a->argc != 3) 2364 { 2365 errorArgument("Incorrect arguments to '%s'", a->argv[1]); 2366 rc = E_FAIL; 2367 break; 2368 } 2369 if (!strcmp(a->argv[2], "on")) 2370 { 2371 CHECK_ERROR(sessionMachine, COMSETTER(AutostartEnabled)(TRUE)); 2372 } 2373 else if (!strcmp(a->argv[2], "off")) 2374 { 2375 CHECK_ERROR(sessionMachine, COMSETTER(AutostartEnabled)(FALSE)); 2376 } 2377 else 2378 { 2379 errorArgument("Invalid value '%s'", Utf8Str(a->argv[2]).c_str()); 2380 rc = E_FAIL; 2381 break; 2382 } 2383 if (SUCCEEDED(rc)) 2384 fNeedsSaving = true; 2385 break; 2386 } 2387 else if (!strncmp(a->argv[1], "autostart-delay", 15)) 2388 { 2389 if (a->argc != 3) 2390 { 2391 errorArgument("Incorrect arguments to '%s'", a->argv[1]); 2392 rc = E_FAIL; 2393 break; 2394 } 2395 uint32_t u32; 2396 char *pszNext; 2397 int vrc = RTStrToUInt32Ex(a->argv[2], &pszNext, 10, &u32); 2398 if (RT_FAILURE(vrc) || *pszNext != '\0') 2399 { 2400 errorArgument("Invalid autostart delay number '%s'", a->argv[2]); 2401 rc = E_FAIL; 2402 break; 2403 } 2404 CHECK_ERROR(sessionMachine, COMSETTER(AutostartDelay)(u32)); 2405 if (SUCCEEDED(rc)) 2406 fNeedsSaving = true; 2407 break; 2408 } 2361 2409 else 2362 2410 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r88363 r89597 932 932 " <devicename>\n" 933 933 " vm-process-priority default|flat|low|normal|high\n" 934 " autostart-enabled on|off\n" 935 " autostart-delay <seconds>\n" 934 936 "\n", SEP); 935 937 }
Note:
See TracChangeset
for help on using the changeset viewer.