Changeset 27976 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Apr 4, 2010 2:16:32 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r27945 r27976 112 112 usageOK = false; 113 113 else 114 { 114 { 115 115 char **papszArg; 116 116 int cArgs; … … 119 119 if (RT_SUCCESS(rc)) 120 120 { 121 for (int a = 0; a < cArgs; a++) 121 for (int a = 0; a < cArgs; a++) 122 122 env.push_back(Bstr(papszArg[a])); 123 123 124 124 RTGetOptArgvFree(papszArg); 125 } 125 } 126 126 ++i; 127 127 } … … 168 168 else 169 169 { 170 return errorSyntax(USAGE_GUESTCONTROL, 170 return errorSyntax(USAGE_GUESTCONTROL, 171 171 "Invalid parameter '%s'", Utf8Str(a->argv[i]).raw()); 172 172 } … … 180 180 && Utf8UserName.isEmpty()) 181 181 { 182 return errorSyntax(USAGE_GUESTCONTROL, 182 return errorSyntax(USAGE_GUESTCONTROL, 183 183 "No user name for password specified!"); 184 184 } … … 199 199 Bstr uuid; 200 200 machine->COMGETTER(Id)(uuid.asOutParam()); 201 201 202 202 /* open an existing session for VM - so the VM has to be running */ 203 203 CHECK_ERROR_BREAK(a->virtualBox, OpenExistingSession(a->session, uuid)); 204 204 205 205 /* get the mutable session machine */ 206 206 a->session->COMGETTER(Machine)(machine.asOutParam()); 207 207 208 208 /* get the associated console */ 209 209 ComPtr<IConsole> console; 210 210 CHECK_ERROR_BREAK(a->session, COMGETTER(Console)(console.asOutParam())); 211 211 212 212 ComPtr<IGuest> guest; 213 213 CHECK_ERROR_BREAK(console, COMGETTER(Guest)(guest.asOutParam())); … … 215 215 ComPtr<IProgress> progress; 216 216 ULONG uPID = 0; 217 CHECK_ERROR_BREAK(guest, ExecuteProgram(Bstr(Utf8Cmd), uFlags, 218 Bstr(Utf8Args), ComSafeArrayAsInParam(env), 217 CHECK_ERROR_BREAK(guest, ExecuteProgram(Bstr(Utf8Cmd), uFlags, 218 Bstr(Utf8Args), ComSafeArrayAsInParam(env), 219 219 Bstr(Utf8StdIn), Bstr(Utf8StdOut), Bstr(Utf8StdErr), 220 220 Bstr(Utf8UserName), Bstr(Utf8Password), uTimeoutMS, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r27925 r27976 1273 1273 char *strTcpSnd; 1274 1274 char *strTcpRcv; 1275 char *strRaw = RTStrDup(ValueUnion.psz); 1275 char *strRaw = RTStrDup(ValueUnion.psz); 1276 1276 char *ch = strRaw; 1277 1277 strMtu = ch; … … 1313 1313 char *strGuestIp; 1314 1314 char *strGuestPort; 1315 char *strRaw = RTStrDup(ValueUnion.psz); 1315 char *strRaw = RTStrDup(ValueUnion.psz); 1316 1316 char *ch = strRaw; 1317 1317 strName = ch; … … 1323 1323 strHostPort = ch; 1324 1324 ITERATE_TO_NEXT_TERM(ch); 1325 strGuestIp = ch; 1325 strGuestIp = ch; 1326 1326 ITERATE_TO_NEXT_TERM(ch); 1327 1327 strGuestPort = ch; … … 1337 1337 break; 1338 1338 } 1339 CHECK_ERROR(driver, AddRedirect(Bstr(strName), proto, Bstr(strHostIp), 1339 CHECK_ERROR(driver, AddRedirect(Bstr(strName), proto, Bstr(strHostIp), 1340 1340 RTStrToUInt16(strHostPort), Bstr(strGuestIp), RTStrToUInt16(strGuestPort))); 1341 1341 } … … 1352 1352 } 1353 1353 #undef ITERATE_TO_NEXT_TERM 1354 1354 1355 1355 case MODIFYVM_NATTFTPPREFIX: 1356 1356 {
Note:
See TracChangeset
for help on using the changeset viewer.