Changeset 44992 in vbox for trunk/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp
- Timestamp:
- Mar 11, 2013 3:41:01 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84215
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp
r44328 r44992 37 37 # include <VBox/HostServices/GuestPropertySvc.h> 38 38 #endif 39 #ifdef VBOX_WITH_DPC_LATENCY_CHECKER 40 # include <VBox/VBoxGuest.h> 41 # include "../VBoxGuestLib/VBGLR3Internal.h" /* HACK ALERT! Using vbglR3DoIOCtl directly!! */ 42 #endif 43 39 44 40 45 /******************************************************************************* … … 101 106 RTPrintf("\n"); 102 107 103 /* Exclude the Windows bits from the test version. Anyone who needs to test 104 *them can fix this. */108 /* Exclude the Windows bits from the test version. Anyone who needs to 109 test them can fix this. */ 105 110 #if defined(RT_OS_WINDOWS) && !defined(VBOX_CONTROL_TEST) 106 111 if (eWhich == GET_VIDEO_ACCEL || eWhich == USAGE_ALL) … … 1478 1483 #endif 1479 1484 1485 #ifdef VBOX_WITH_DPC_LATENCY_CHECKER 1486 /** 1487 * @callback_method_impl{FNVBOXCTRLCMDHANDLER, Command: help} 1488 */ 1489 static RTEXITCODE handleDpc(int argc, char *argv[]) 1490 { 1491 # ifndef VBOX_CONTROL_TEST 1492 int rc; 1493 for (int i = 0; i < 30; i++) 1494 { 1495 rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_DPC_LATENCY_CHECKER, NULL, 0); 1496 if (RT_FAILURE(rc)) 1497 break; 1498 RTPrintf("%d\n", i); 1499 } 1500 # else 1501 int rc = VERR_NOT_IMPLEMENTED; 1502 # endif 1503 if (RT_FAILURE(rc)) 1504 return VBoxControlError("Error. rc=%Rrc\n", rc); 1505 RTPrintf("Samples collection completed.\n"); 1506 return RTEXITCODE_SUCCESS; 1507 } 1508 #endif /* VBOX_WITH_DPC_LATENCY_CHECKER */ 1509 1510 1480 1511 /** 1481 1512 * @callback_method_impl{FNVBOXCTRLCMDHANDLER, Command: takesnapshot} … … 1535 1566 } 1536 1567 1537 #ifdef VBOX_WITH_DPC_LATENCY_CHECKER1538 #include "..\VBoxGuestLib\VBGLR3Internal.h"1539 1540 static RTEXITCODE handleDpc(int argc, char *argv[])1541 {1542 #ifndef VBOX_CONTROL_TEST1543 int rc = VINF_SUCCESS;1544 int i;1545 for (i = 0; i < 30; i++)1546 {1547 rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_DPC, NULL, 0);1548 if (RT_FAILURE(rc))1549 {1550 break;1551 }1552 RTPrintf("%d\n", i);1553 }1554 #else1555 int rc = VERR_NOT_IMPLEMENTED;1556 #endif1557 if (RT_SUCCESS(rc))1558 {1559 RTPrintf("Samples collection completed.\n");1560 return RTEXITCODE_SUCCESS;1561 }1562 else1563 {1564 VBoxControlError("Error. rc=%Rrc\n", rc);1565 return RTEXITCODE_FAILURE;1566 }1567 }1568 #endif /* VBOX_WITH_DPC_LATENCY_CHECKER */1569 1568 1570 1569 /** command handler type */ … … 1595 1594 #if !defined(VBOX_CONTROL_TEST) 1596 1595 { "writecoredump", handleWriteCoreDump }, 1596 #endif 1597 #ifdef VBOX_WITH_DPC_LATENCY_CHECKER 1598 { "dpc", handleDpc }, 1597 1599 #endif 1598 1600 { "takesnapshot", handleTakeSnapshot }, … … 1604 1606 { "getversion", handleVersion }, 1605 1607 { "version", handleVersion }, 1606 #ifdef VBOX_WITH_DPC_LATENCY_CHECKER1607 { "dpc", handleDpc },1608 #endif /* VBOX_WITH_DPC_LATENCY_CHECKER */1609 1608 { "help", handleHelp } 1610 1609 };
Note:
See TracChangeset
for help on using the changeset viewer.