Changeset 70766 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Jan 28, 2018 8:53:14 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r68487 r70766 2111 2111 CHECK_ERROR_BREAK(console, ClearAllDiskEncryptionPasswords()); 2112 2112 } 2113 else if (!strncmp(a->argv[1], "changeuartmode", 14)) 2114 { 2115 unsigned n = parseNum(&a->argv[1][14], 4, "UART"); 2116 if (!n) 2117 { 2118 rc = E_FAIL; 2119 break; 2120 } 2121 if (a->argc < 3) 2122 { 2123 errorArgument("Missing argument to '%s'", a->argv[1]); 2124 rc = E_FAIL; 2125 break; 2126 } 2127 2128 ComPtr<ISerialPort> uart; 2129 2130 CHECK_ERROR_BREAK(sessionMachine, GetSerialPort(n - 1, uart.asOutParam())); 2131 ASSERT(uart); 2132 2133 if (!RTStrICmp(a->argv[2], "disconnected")) 2134 { 2135 if (a->argc != 3) 2136 { 2137 errorArgument("Incorrect arguments to '%s'", a->argv[1]); 2138 rc = E_FAIL; 2139 break; 2140 } 2141 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_Disconnected)); 2142 } 2143 else if ( !RTStrICmp(a->argv[2], "server") 2144 || !RTStrICmp(a->argv[2], "client") 2145 || !RTStrICmp(a->argv[2], "tcpserver") 2146 || !RTStrICmp(a->argv[2], "tcpclient") 2147 || !RTStrICmp(a->argv[2], "file")) 2148 { 2149 const char *pszMode = a->argv[2]; 2150 if (a->argc != 4) 2151 { 2152 errorArgument("Incorrect arguments to '%s'", a->argv[1]); 2153 rc = E_FAIL; 2154 break; 2155 } 2156 2157 CHECK_ERROR(uart, COMSETTER(Path)(Bstr(a->argv[3]).raw())); 2158 2159 /* 2160 * Change to disconnected first to get changes in just a parameter causing 2161 * the correct changes later on. 2162 */ 2163 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_Disconnected)); 2164 if (!RTStrICmp(pszMode, "server")) 2165 { 2166 CHECK_ERROR(uart, COMSETTER(Server)(TRUE)); 2167 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostPipe)); 2168 } 2169 else if (!RTStrICmp(pszMode, "client")) 2170 { 2171 CHECK_ERROR(uart, COMSETTER(Server)(FALSE)); 2172 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostPipe)); 2173 } 2174 else if (!RTStrICmp(pszMode, "tcpserver")) 2175 { 2176 CHECK_ERROR(uart, COMSETTER(Server)(TRUE)); 2177 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_TCP)); 2178 } 2179 else if (!RTStrICmp(pszMode, "tcpclient")) 2180 { 2181 CHECK_ERROR(uart, COMSETTER(Server)(FALSE)); 2182 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_TCP)); 2183 } 2184 else if (!RTStrICmp(pszMode, "file")) 2185 { 2186 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_RawFile)); 2187 } 2188 } 2189 else 2190 { 2191 if (a->argc != 3) 2192 { 2193 errorArgument("Incorrect arguments to '%s'", a->argv[1]); 2194 rc = E_FAIL; 2195 break; 2196 } 2197 CHECK_ERROR(uart, COMSETTER(Path)(Bstr(a->argv[2]).raw())); 2198 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostDevice)); 2199 } 2200 } 2113 2201 else 2114 2202 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r70712 r70766 850 850 " removeencpassword <id>\n" 851 851 " removeallencpasswords\n" 852 " changeuartmode<1-N> disconnected|\n" 853 " server <pipe>|\n" 854 " client <pipe>|\n" 855 " tcpserver <port>|\n" 856 " tcpclient <hostname:port>|\n" 857 " file <file>|\n" 858 " <devicename>]\n" 852 859 "\n", SEP); 853 860 }
Note:
See TracChangeset
for help on using the changeset viewer.