Changeset 92664 in vbox for trunk/src/VBox/Additions/common/VBoxService
- Timestamp:
- Dec 1, 2021 3:04:59 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 148560
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceToolBox.cpp
r92658 r92664 1714 1714 if (argc < 2 || strcmp(argv[1], "--use-toolbox")) 1715 1715 { 1716 /** @todo must check for 'vbox_' and fail with a complaint that the tool does 1717 * not exist, because vgsvcGstCtrlProcessResolveExecutable will send 1718 * us anything with 'vbox_' as a prefix and no absolute path. So, 1719 * handing non-existing vbox_xxx tools to the regular VBoxService main 1720 * routine is inconsistent and bound to cause trouble. */ 1721 return false; 1716 /* We must match vgsvcGstCtrlProcessResolveExecutable here and claim 1717 everything starting with "vbox_". */ 1718 if (!RTStrStartsWith(pszTool, "vbox_")) 1719 return false; 1720 RTMsgError("Unknown tool: %s\n", pszTool); 1721 *prcExit = RTEXITCODE_SYNTAX; 1722 return true; 1722 1723 } 1723 1724 … … 1725 1726 if (argc < 3) 1726 1727 { 1727 vgsvcToolboxShowUsage();1728 RTMsgError("No tool following --use-toolbox\n"); 1728 1729 *prcExit = RTEXITCODE_SYNTAX; 1729 1730 return true; … … 1736 1737 if (!pTool) 1737 1738 { 1738 *prcExit = RTEXITCODE_SUCCESS; 1739 if (!strcmp(pszTool, "-V")) 1740 { 1741 vgsvcToolboxShowVersion(); 1742 return true; 1743 } 1744 if ( strcmp(pszTool, "help") 1745 && strcmp(pszTool, "--help") 1746 && strcmp(pszTool, "-h")) 1747 *prcExit = RTEXITCODE_SYNTAX; 1748 vgsvcToolboxShowUsage(); 1749 return true; 1739 *prcExit = RTEXITCODE_SUCCESS; 1740 if ( !strcmp(pszTool, "-V") 1741 || !strcmp(pszTool, "version")) 1742 vgsvcToolboxShowVersion(); 1743 else if ( !strcmp(pszTool, "help") 1744 || !strcmp(pszTool, "--help") 1745 || !strcmp(pszTool, "-h")) 1746 vgsvcToolboxShowUsage(); 1747 else 1748 { 1749 RTMsgError("Unknown tool: %s\n", pszTool); 1750 *prcExit = RTEXITCODE_SYNTAX; 1751 } 1752 return true; 1750 1753 } 1751 1754 }
Note:
See TracChangeset
for help on using the changeset viewer.