[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: > Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> > --- > tools/libxl/xl_cmdimpl.c | 16 ++++++++++++++++ > tools/libxl/xl_cmdtable.c | 2 +- > 2 files changed, 17 insertions(+), 1 deletions(-) > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 5c63686..d22610c 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -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.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 --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c > index 924920b..e6ff877 100644 > --- a/tools/libxl/xl_cmdtable.c > +++ b/tools/libxl/xl_cmdtable.c > @@ -256,7 +256,7 @@ struct cmd_spec cmd_table[] = { > "<Domain> <DevId|mac>", > }, > { "block-attach", > - &main_blockattach, 0, > + &main_blockattach, 1, > "Create a new virtual block device", > "<Domain> <disk-spec-component(s)>...", > }, _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |