Changeset 56090 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 27, 2015 11:25:58 AM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp
r55884 r56090 293 293 294 294 /** 295 * Handles the os sub-command.295 * Handles the osdetect sub-command. 296 296 * 297 297 * @returns Suitable exit code. … … 315 315 316 316 /** 317 * Handles the os sub-command.317 * Handles the osinfo sub-command. 318 318 * 319 319 * @returns Suitable exit code. … … 332 332 RTPrintf("Name: %ls\n", bstrName.raw()); 333 333 RTPrintf("Version: %ls\n", bstrVersion.raw()); 334 return RTEXITCODE_SUCCESS; 335 } 336 337 /** 338 * Handles the osdmsg sub-command. 339 * 340 * @returns Suitable exit code. 341 * @param pArgs The handler arguments. 342 * @param pDebugger Pointer to the debugger interface. 343 */ 344 static RTEXITCODE handleDebugVM_OSDmesg(HandlerArg *pArgs, IMachineDebugger *pDebugger) 345 { 346 /* 347 * Parse argument. 348 */ 349 uint32_t uMaxMessages = 0; 350 RTGETOPTSTATE GetState; 351 RTGETOPTUNION ValueUnion; 352 static const RTGETOPTDEF s_aOptions[] = 353 { 354 { "--lines", 'n', RTGETOPT_REQ_UINT32 }, 355 }; 356 int rc = RTGetOptInit(&GetState, pArgs->argc, pArgs->argv, s_aOptions, RT_ELEMENTS(s_aOptions), 2, RTGETOPTINIT_FLAGS_OPTS_FIRST); 357 AssertRCReturn(rc, RTEXITCODE_FAILURE); 358 while ((rc = RTGetOpt(&GetState, &ValueUnion)) != 0) 359 switch (rc) 360 { 361 case 'n': uMaxMessages = ValueUnion.u32; break; 362 default: return errorGetOpt(USAGE_DEBUGVM, rc, &ValueUnion); 363 } 364 365 /* 366 * Do it. 367 */ 368 com::Bstr bstrDmesg; 369 CHECK_ERROR2_RET(pDebugger, QueryOSKernelLog(uMaxMessages, bstrDmesg.asOutParam()), RTEXITCODE_FAILURE); 370 RTPrintf("%ls\n", bstrDmesg.raw()); 334 371 return RTEXITCODE_SUCCESS; 335 372 } … … 685 722 else if (!strcmp(pszSubCmd, "osinfo")) 686 723 rcExit = handleDebugVM_OSInfo(pArgs, ptrDebugger); 724 else if (!strcmp(pszSubCmd, "osdmesg")) 725 rcExit = handleDebugVM_OSDmesg(pArgs, ptrDebugger); 687 726 else if (!strcmp(pszSubCmd, "setregisters")) 688 727 rcExit = handleDebugVM_SetRegisters(pArgs, ptrDebugger); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r55977 r56090 768 768 " osdetect |\n" 769 769 " osinfo |\n" 770 " osdmesg [--lines|-n <N>] |\n" 770 771 " getregisters [--cpu <id>] <reg>|all ... |\n" 771 772 " setregisters [--cpu <id>] <reg>=<value> ... |\n"
Note:
See TracChangeset
for help on using the changeset viewer.