mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.423 (3f5f5d57h4flymvui_FJq1j1W4oYnw)
Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/tlh20/xeno.bk into labyrinth.cl.cam.ac.uk:/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xeno.bk
This commit is contained in:
commit
ea0145702f
4 files changed
+18
-10
No files matched your search
@@ -6,6 +6,7 @@ import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.NumberFormatException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
@@ -182,7 +183,14 @@ public class CommandDomainNew extends Command {
|
||||
br =
|
||||
new BufferedReader(
|
||||
new InputStreamReader(create_p.getInputStream()));
|
||||
domain_id = Integer.parseInt(br.readLine());
|
||||
try
|
||||
{
|
||||
domain_id = Integer.parseInt(br.readLine());
|
||||
}
|
||||
catch (NumberFormatException nfe)
|
||||
{
|
||||
domain_id = -1;
|
||||
}
|
||||
create_rc = create_p.waitFor();
|
||||
}
|
||||
d.domainNumber = domain_id;
|
||||
|
||||
@@ -42,11 +42,11 @@ public class CommandPhysicalGrant extends Command {
|
||||
public String execute() throws CommandFailedException {
|
||||
Runtime r = Runtime.getRuntime();
|
||||
String output = null;
|
||||
|
||||
Partition partition = PartitionManager.IT.getPartition(StringPattern.parse(partition_name).resolve(domain_id));
|
||||
String resolved = StringPattern.parse(partition_name).resolve(domain_id);
|
||||
Partition partition = PartitionManager.IT.getPartition(resolved);
|
||||
|
||||
if ( partition == null ) {
|
||||
throw new CommandFailedException("Partition " + partition_name + " does not exist.");
|
||||
throw new CommandFailedException("Partition " + partition_name + " (resolved to " + resolved + ") does not exist.");
|
||||
}
|
||||
|
||||
// Check if this partition belongs to the VDM
|
||||
|
||||
@@ -29,12 +29,11 @@ public class CommandPhysicalRevoke extends Command {
|
||||
public String execute() throws CommandFailedException {
|
||||
Runtime r = Runtime.getRuntime();
|
||||
String output = null;
|
||||
|
||||
Partition partition = PartitionManager.IT.getPartition(StringPattern.parse(partition_name).resolve(domain_id));
|
||||
String resolved = StringPattern.parse(partition_name).resolve(domain_id);
|
||||
Partition partition = PartitionManager.IT.getPartition(resolved);
|
||||
|
||||
if (partition == null) {
|
||||
throw new CommandFailedException(
|
||||
"Partition " + partition_name + " does not exist.");
|
||||
throw new CommandFailedException("Partition " + partition_name + " (resolved to " + resolved + ") does not exist.");
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -38,10 +38,11 @@ public class CommandVbdCreatePhysical extends Command {
|
||||
* @see org.xenoserver.control.Command#execute()
|
||||
*/
|
||||
public String execute() throws CommandFailedException {
|
||||
Partition partition = PartitionManager.IT.getPartition(StringPattern.parse(partition_name).resolve(domain_id));
|
||||
String resolved = StringPattern.parse(partition_name).resolve(domain_id);
|
||||
Partition partition = PartitionManager.IT.getPartition(resolved);
|
||||
if (partition == null) {
|
||||
throw new CommandFailedException(
|
||||
"No partition " + partition_name + " exists");
|
||||
"No partition " + partition_name + " (resolved to " + resolved + ") exists");
|
||||
}
|
||||
|
||||
VirtualDisk vd = new VirtualDisk("vbd:" + partition.getName());
|
||||
|
||||