[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 10/11] xl: xl block-attach -N (dry run) option
On Fri, 2011-06-03 at 15:54 +0100, Ian Jackson wrote: > @@ -4042,6 +4042,22 @@ int main_blockattach(int argc, char **argv) > > 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.is_cdrom = %d\n", disk.is_cdrom); > + if (ferror(stdout) || fflush(stdout)) { perror("stdout"); exit(-1); } > + return 0; With my recent IDL JSON series the incremental patch below produces output like: # xl -N block-attach 0 phy:sda xvda r disk: { "backend_domid": 0, "pdev_path": "sda", "vdev": "xvda", "backend": "phy", "format": "unknown", "script": null, "removable": 1, "readwrite": 0, "is_cdrom": 0 } This will obviously have a knockon effect on your subsequent test harness patch. diff -r 0ab76e3fed8e tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Fri Jun 03 15:54:26 2011 +0100 +++ b/tools/libxl/xl_cmdimpl.c Thu Jun 23 17:31:09 2011 +0100 @@ -4201,17 +4201,9 @@ int main_blockattach(int argc, char **ar 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); + char *json = libxl_device_disk_to_json(ctx, &disk); + printf("disk: %s\n", json); + free(json); if (ferror(stdout) || fflush(stdout)) { perror("stdout"); exit(-1); } return 0; } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |