Changeset 24404 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Nov 5, 2009 5:14:23 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r24321 r24404 87 87 " bridgedifs|hostonlyifs|dhcpservers|hostinfo|\n" 88 88 #else 89 " bridgedifs| hostinfo|dhcpservers|\n"90 #endif 91 " h ddbackends|hdds|dvds|floppies|\n"89 " bridgedifs|dhcpservers|hostinfo|\n" 90 #endif 91 " hostcpuids|hddbackends|hdds|dvds|floppies|\n" 92 92 " usbhost|usbfilters|systemproperties\n" 93 93 "\n"); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r24375 r24404 253 253 else 254 254 RTPrintf("Synthetic Cpu: %s\n", fSyntheticCpu ? "on" : "off"); 255 256 if (details != VMINFO_MACHINEREADABLE) 257 RTPrintf("CPUID overrides: "); 258 ULONG cFound = 0; 259 static uint32_t const s_auCpuIdRanges[4] = 260 { 261 UINT32_C(0x00000000), UINT32_C(0x0000000a), 262 UINT32_C(0x80000000), UINT32_C(0x0000000a) 263 }; 264 for (unsigned i = 0; i < RT_ELEMENTS(s_auCpuIdRanges); i += 2) 265 for (uint32_t uLeaf = s_auCpuIdRanges[i]; uLeaf < s_auCpuIdRanges[i + 1]; uLeaf++) 266 { 267 ULONG uEAX, uEBX, uECX, uEDX; 268 rc = machine->GetCpuIdLeaf(uLeaf, &uEAX, &uEBX, &uECX, &uEDX); 269 if (SUCCEEDED(rc)) 270 { 271 if (details == VMINFO_MACHINEREADABLE) 272 RTPrintf("cpuid=%08x,%08x,%08x,%08x,%08x", uLeaf, uEAX, uEBX, uECX, uEDX); 273 else 274 { 275 if (!cFound) 276 RTPrintf("Leaf no. EAX EBX ECX EDX\n"); 277 RTPrintf(" %08x %08x %08x %08x %08x\n", uLeaf, uEAX, uEBX, uECX, uEDX); 278 } 279 cFound++; 280 } 281 } 282 if (!cFound && details != VMINFO_MACHINEREADABLE) 283 RTPrintf("None\n"); 255 284 256 285 ComPtr <IBIOSSettings> biosSettings; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r24371 r24404 78 78 LISTHOSTONLYIFS, 79 79 #endif 80 LISTHOSTCPUIDS, 80 81 LISTHOSTINFO, 81 82 LISTHDDBACKENDS, … … 91 92 static const RTGETOPTDEF g_aListOptions[] 92 93 = { 93 { "--long", 'l', RTGETOPT_REQ_NOTHING },94 { "vms", LISTVMS, RTGETOPT_REQ_NOTHING },95 { "runningvms", LISTRUNNINGVMS, RTGETOPT_REQ_NOTHING },96 { "ostypes", LISTOSTYPES, RTGETOPT_REQ_NOTHING },97 { "hostdvds", LISTHOSTDVDS, RTGETOPT_REQ_NOTHING },98 { "hostfloppies", LISTHOSTFLOPPIES, RTGETOPT_REQ_NOTHING },99 { "hostifs", LISTBRIDGEDIFS, RTGETOPT_REQ_NOTHING }, /* backward compatibility */100 { "bridgedifs", LISTBRIDGEDIFS, RTGETOPT_REQ_NOTHING },94 { "--long", 'l', RTGETOPT_REQ_NOTHING }, 95 { "vms", LISTVMS, RTGETOPT_REQ_NOTHING }, 96 { "runningvms", LISTRUNNINGVMS, RTGETOPT_REQ_NOTHING }, 97 { "ostypes", LISTOSTYPES, RTGETOPT_REQ_NOTHING }, 98 { "hostdvds", LISTHOSTDVDS, RTGETOPT_REQ_NOTHING }, 99 { "hostfloppies", LISTHOSTFLOPPIES, RTGETOPT_REQ_NOTHING }, 100 { "hostifs", LISTBRIDGEDIFS, RTGETOPT_REQ_NOTHING }, /* backward compatibility */ 101 { "bridgedifs", LISTBRIDGEDIFS, RTGETOPT_REQ_NOTHING }, 101 102 #if defined(VBOX_WITH_NETFLT) 102 { "hostonlyifs", LISTHOSTONLYIFS, RTGETOPT_REQ_NOTHING },103 { "hostonlyifs", LISTHOSTONLYIFS, RTGETOPT_REQ_NOTHING }, 103 104 #endif 104 { "hostinfo", LISTHOSTINFO, RTGETOPT_REQ_NOTHING }, 105 { "hddbackends", LISTHDDBACKENDS, RTGETOPT_REQ_NOTHING }, 106 { "hdds", LISTHDDS, RTGETOPT_REQ_NOTHING }, 107 { "dvds", LISTDVDS, RTGETOPT_REQ_NOTHING }, 108 { "floppies", LISTFLOPPIES, RTGETOPT_REQ_NOTHING }, 109 { "usbhost", LISTUSBHOST, RTGETOPT_REQ_NOTHING }, 110 { "usbfilters", LISTUSBFILTERS, RTGETOPT_REQ_NOTHING }, 111 { "systemproperties", LISTSYSTEMPROPERTIES, RTGETOPT_REQ_NOTHING }, 112 { "dhcpservers", LISTDHCPSERVERS, RTGETOPT_REQ_NOTHING } 105 { "hostinfo", LISTHOSTINFO, RTGETOPT_REQ_NOTHING }, 106 { "hostcpuids", LISTHOSTCPUIDS, RTGETOPT_REQ_NOTHING }, 107 { "hddbackends", LISTHDDBACKENDS, RTGETOPT_REQ_NOTHING }, 108 { "hdds", LISTHDDS, RTGETOPT_REQ_NOTHING }, 109 { "dvds", LISTDVDS, RTGETOPT_REQ_NOTHING }, 110 { "floppies", LISTFLOPPIES, RTGETOPT_REQ_NOTHING }, 111 { "usbhost", LISTUSBHOST, RTGETOPT_REQ_NOTHING }, 112 { "usbfilters", LISTUSBFILTERS, RTGETOPT_REQ_NOTHING }, 113 { "systemproperties", LISTSYSTEMPROPERTIES, RTGETOPT_REQ_NOTHING }, 114 { "dhcpservers", LISTDHCPSERVERS, RTGETOPT_REQ_NOTHING } 113 115 }; 114 116 … … 143 145 #endif 144 146 case LISTHOSTINFO: 147 case LISTHOSTCPUIDS: 145 148 case LISTHDDBACKENDS: 146 149 case LISTHDDS: … … 431 434 CHECK_ERROR (Host, COMGETTER(OSVersion)(oSVersion.asOutParam())); 432 435 RTPrintf("Operating system version: %lS\n", oSVersion.raw()); 436 } 437 break; 438 439 case LISTHOSTCPUIDS: 440 { 441 ComPtr<IHost> Host; 442 CHECK_ERROR(a->virtualBox, COMGETTER(Host)(Host.asOutParam())); 443 444 RTPrintf("Host CPUIDs:\n\nLeaf no. EAX EBX ECX EDX\n"); 445 ULONG uCpuNo = 0; /* ASSUMES that CPU#0 is online. */ 446 ULONG uEAX, uEBX, uECX, uEDX; 447 ULONG cLeafs; 448 449 /* Standard */ 450 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, 0, 0, &cLeafs, &uEBX, &uECX, &uEDX)); 451 if (cLeafs > UINT32_C(0x00000000) && cLeafs <= UINT32_C(0x0000007f)) 452 for (ULONG iLeaf = 0; iLeaf < cLeafs; iLeaf++) 453 { 454 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, iLeaf, 0, &uEAX, &uEBX, &uECX, &uEDX)); 455 RTPrintf("%08x %08x %08x %08x %08x\n", iLeaf, uEAX, uEBX, uECX, uEDX); 456 } 457 458 /* Extended */ 459 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, UINT32_C(0x80000000), 0, &cLeafs, &uEBX, &uECX, &uEDX)); 460 if (cLeafs > UINT32_C(0x80000000) && cLeafs <= UINT32_C(0x8000007f)) 461 for (ULONG iLeaf = UINT32_C(0x80000000); iLeaf < cLeafs; iLeaf++) 462 { 463 CHECK_ERROR(Host, GetProcessorCpuIdLeaf(uCpuNo, iLeaf, 0, &uEAX, &uEBX, &uECX, &uEDX)); 464 RTPrintf("%08x %08x %08x %08x %08x\n", iLeaf, uEAX, uEBX, uECX, uEDX); 465 } 433 466 } 434 467 break;
Note:
See TracChangeset
for help on using the changeset viewer.