[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3] libxl: add "xl qemu-monitor-command"



On Fri, Sep 09, 2016 at 11:05:19AM +0100, Wei Liu wrote:
> On Tue, Sep 06, 2016 at 02:16:30PM +0200, Dario Faggioli wrote:
> > On Tue, 2016-09-06 at 12:51 +0200, Juergen Gross wrote:
> > > Add a new xl command "qemu-monitor-command" to issue arbitrary
> > > commands
> > > to a domain's device model. Syntax is:
> > > 
> > > xl qemu-monitor-command <domain> <command>
> > > 
> > > The command is issued via qmp human-monitor-command command. Any
> > > information returned by the command is printed to stdout.
> > > 
> > > Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> > > ---
> > > V3: - add GC_FREE as requested by Dario Faggioli
> > >     - return with EXIT_FAILURE/SUCCESS as requested by Dario Faggioli
> > >
> > I think you missed one...
> > 
> > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> > > index 7540fb1..d1a2a14 100644
> > > --- a/tools/libxl/xl_cmdimpl.c
> > > +++ b/tools/libxl/xl_cmdimpl.c
> > > @@ -9536,6 +9536,35 @@ int main_psr_hwinfo(int argc, char **argv)
> > >  
> > >  #endif
> > >  
> > > +int main_qemu_monitor_command(int argc, char **argv)
> > > +{
> > > +    int opt;
> > > +    uint32_t domid;
> > > +    char *cmd;
> > > +    char *output;
> > > +    int ret;
> > > +
> > > +    SWITCH_FOREACH_OPT(opt, "", NULL, "qemu-monitor-command", 2) {
> > > +        /* No options */
> > > +    }
> > > +
> > > +    domid = find_domain(argv[optind]);
> > > +    cmd = argv[optind + 1];
> > > +
> > > +    if (argc - optind > 2) {
> > > +        fprintf(stderr, "Invalid arguments.\n");
> > > +        return 1;
> > >
> > ...here.
> > 
> > Anyway, this is
> > 
> > Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> 
> Thanks for reviewing.
> 
> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> 
> > 
> > if possible, with the above 'return 1' converted to 'return
> > EXIT_FAILURE' (either by resending or done upon commit).
> > 
> 
> I can fix that up, no need to resend.
> 
 
Fixed up the patch and pushed.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.