Changeset 40714 in vbox for trunk/src/VBox
- Timestamp:
- Mar 29, 2012 4:08:29 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77173
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r40469 r40714 321 321 " [--teleporteraddress <address|empty>\n" 322 322 " [--teleporterpassword <password>]\n" 323 " [--teleporterpasswordfrom <file>]\n" 323 324 " [--tracing-enabled on|off]\n" 324 325 " [--tracing-config <config-string>]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r40418 r40714 30 30 31 31 #include <iprt/cidr.h> 32 #include <iprt/ctype.h> 33 #include <iprt/file.h> 32 34 #include <iprt/param.h> 33 35 #include <iprt/path.h> … … 164 166 MODIFYVM_TELEPORTER_ADDRESS, 165 167 MODIFYVM_TELEPORTER_PASSWORD, 168 MODIFYVM_TELEPORTER_PASSWORD_FROM, 166 169 MODIFYVM_TRACING_ENABLED, 167 170 MODIFYVM_TRACING_CONFIG, … … 302 305 { "--teleporteraddress", MODIFYVM_TELEPORTER_ADDRESS, RTGETOPT_REQ_STRING }, 303 306 { "--teleporterpassword", MODIFYVM_TELEPORTER_PASSWORD, RTGETOPT_REQ_STRING }, 307 { "--teleporterpasswordfrom", MODIFYVM_TELEPORTER_PASSWORD_FROM, RTGETOPT_REQ_STRING }, 304 308 { "--tracing-enabled", MODIFYVM_TRACING_ENABLED, RTGETOPT_REQ_BOOL_ONOFF }, 305 309 { "--tracing-config", MODIFYVM_TRACING_CONFIG, RTGETOPT_REQ_STRING }, … … 2210 2214 } 2211 2215 2216 case MODIFYVM_TELEPORTER_PASSWORD_FROM: 2217 { 2218 size_t cbFile; 2219 char *pszFileBuf; 2220 int vrc = RTFileReadAll(ValueUnion.psz, (void**)&pszFileBuf, &cbFile); 2221 if (RT_SUCCESS(vrc)) 2222 { 2223 char szPasswd[512]; 2224 for (unsigned i = 0; 2225 i < cbFile 2226 && i < sizeof(szPasswd)-1 2227 && !RT_C_IS_CNTRL(pszFileBuf[i]); i++) 2228 szPasswd[i] = pszFileBuf[i]; 2229 2230 CHECK_ERROR(machine, COMSETTER(TeleporterPassword)(Bstr(szPasswd).raw())); 2231 } 2232 else 2233 errorArgument("Cannot open password file '%s' (%Rrc)", ValueUnion.psz, vrc); 2234 break; 2235 } 2236 2212 2237 case MODIFYVM_TRACING_ENABLED: 2213 2238 {
Note:
See TracChangeset
for help on using the changeset viewer.