# HG changeset patch
# User Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
# Date 1309259957 -3600
# Node ID fa5277823f96da02ae7a26d7915c9e5b912a8db0
# Parent e5abe23f18443744389ce07603eb364f7c5a39ae
xl: xl block-attach -N (dry run) option
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
diff -r e5abe23f1844 -r fa5277823f96 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Tue Jun 28 12:19:16 2011 +0100
+++ b/tools/libxl/xl_cmdimpl.c Tue Jun 28 12:19:17 2011 +0100
@@ -4060,6 +4060,22 @@
disk.backend_domid = be_domid;
+ if (dryrun_only) {
+ /* fixme: this should be generated from the idl */
+ /* fixme: enums (backend, format) should be converted to strings */
+ printf("disk.backend_domid = %"PRIx32"\n", disk.backend_domid);
+ printf("disk.pdev_path = %s\n", disk.pdev_path);
+ printf("disk.vdev = %s\n", disk.vdev);
+ printf("disk.backend = %d\n", disk.backend);
+ printf("disk.format = %d\n", disk.format);
+ printf("disk.script = %s\n", disk.script);
+ printf("disk.removable = %d\n", disk.removable);
+ printf("disk.readwrite = %d\n", disk.readwrite);
+ printf("disk.is_cdrom = %d\n", disk.is_cdrom);
+ if (ferror(stdout) || fflush(stdout)) { perror("stdout"); exit(-1); }
+ return 0;
+ }
+
if (libxl_device_disk_add(ctx, fe_domid, &disk)) {
fprintf(stderr, "libxl_device_disk_add failed.\n");
}
diff -r e5abe23f1844 -r fa5277823f96 tools/libxl/xl_cmdtable.c
--- a/tools/libxl/xl_cmdtable.c Tue Jun 28 12:19:16 2011 +0100
+++ b/tools/libxl/xl_cmdtable.c Tue Jun 28 12:19:17 2011 +0100
@@ -256,7 +256,7 @@
"<Domain> <DevId|mac>",
},
{ "block-attach",
- &main_blockattach, 0,
+ &main_blockattach, 1,
"Create a new virtual block device",
"<Domain> <disk-spec-component(s)>...",
},
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|