Changeset 30322 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Jun 21, 2010 9:30:16 AM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
r30109 r30322 114 114 return errorSyntax(USAGE_DHCPSERVER, "You can only specify --netname once."); 115 115 else if (pIfName) 116 return errorSyntax(USAGE_DHCPSERVER, "You can either use a --netname or --ifname for identifying the dhcpserver.");116 return errorSyntax(USAGE_DHCPSERVER, "You can either use a --netname or --ifname for identifying the DHCP server."); 117 117 else 118 118 { … … 124 124 return errorSyntax(USAGE_DHCPSERVER, "You can only specify --ifname once."); 125 125 else if (pNetName) 126 return errorSyntax(USAGE_DHCPSERVER, "You can either use a --netname or --ipname for identifying the dhcpserver.");126 return errorSyntax(USAGE_DHCPSERVER, "You can either use a --netname or --ipname for identifying the DHCP server."); 127 127 else 128 128 { … … 199 199 200 200 if(! pNetName && !pIfName) 201 return errorSyntax(USAGE_DHCPSERVER, "You need to specify either --netname or --ifname to identify the dhcpserver");201 return errorSyntax(USAGE_DHCPSERVER, "You need to specify either --netname or --ifname to identify the DHCP server"); 202 202 203 203 if(enmCode != OP_REMOVE) … … 227 227 ComPtr<IHostNetworkInterface> hif; 228 228 CHECK_ERROR(host, FindHostNetworkInterfaceByName(Bstr(pIfName).mutableRaw(), hif.asOutParam())); 229 if (FAILED(rc))230 return errorArgument(" could not find interface '%s'", pIfName);229 if (FAILED(rc)) 230 return errorArgument("Could not find interface '%s'", pIfName); 231 231 232 232 CHECK_ERROR(hif, COMGETTER(NetworkName) (NetName.asOutParam())); 233 if (FAILED(rc))234 return errorArgument(" could not get network name for the interface '%s'", pIfName);233 if (FAILED(rc)) 234 return errorArgument("Could not get network name for the interface '%s'", pIfName); 235 235 } 236 236 else … … 243 243 if(enmCode == OP_ADD) 244 244 { 245 if (SUCCEEDED(rc))246 return errorArgument(" dhcpserver already exists");245 if (SUCCEEDED(rc)) 246 return errorArgument("DHCP server already exists"); 247 247 248 248 CHECK_ERROR(a->virtualBox, CreateDHCPServer(NetName.mutableRaw(), svr.asOutParam())); 249 if (FAILED(rc))250 return errorArgument(" failed to createserver");251 } 252 else if (FAILED(rc))253 { 254 return errorArgument(" dhcpserver does not exist");249 if (FAILED(rc)) 250 return errorArgument("Failed to create the DHCP server"); 251 } 252 else if (FAILED(rc)) 253 { 254 return errorArgument("DHCP server does not exist"); 255 255 } 256 256 … … 261 261 CHECK_ERROR(svr, SetConfiguration (Bstr(pIp).mutableRaw(), Bstr(pNetmask).mutableRaw(), Bstr(pLowerIp).mutableRaw(), Bstr(pUpperIp).mutableRaw())); 262 262 if(FAILED(rc)) 263 return errorArgument(" failed to set configuration");263 return errorArgument("Failed to set configuration"); 264 264 } 265 265 … … 273 273 CHECK_ERROR(a->virtualBox, RemoveDHCPServer(svr)); 274 274 if(FAILED(rc)) 275 return errorArgument(" failed to remove server");275 return errorArgument("Failed to remove server"); 276 276 } 277 277 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
r28800 r30322 240 240 241 241 if (FAILED(rc)) 242 return errorArgument(" could not find interface '%s'", a->argv[iStart]);242 return errorArgument("Could not find interface '%s'", a->argv[iStart]); 243 243 244 244 if (bDhcp)
Note:
See TracChangeset
for help on using the changeset viewer.