From: Dario Faggioli <dario.faggioli@citrix.com>
To: Juergen Gross <jgross@suse.com>, xen-devel@lists.xen.org
Cc: ian.jackson@eu.citrix.com, wei.liu2@citrix.com
Subject: Re: [PATCH v3] libxl: add "xl qemu-monitor-command"
Date: Tue, 6 Sep 2016 14:16:30 +0200 [thread overview]
Message-ID: <1473164190.19612.108.camel@citrix.com> (raw)
In-Reply-To: <1473159066-26227-1-git-send-email-jgross@suse.com>
[-- Attachment #1.1: Type: text/plain, Size: 2136 bytes --]
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@suse.com>
> ---
> 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@citrix.com>
if possible, with the above 'return 1' converted to 'return
EXIT_FAILURE' (either by resending or done upon commit).
If a maintainer wants to ack and commit this as is, my R-b still
stands. In fact, as I said, xl is still not yet 100% consistent wrt
this, and although I think new code should comply with the rule, I
won't stand in the way of a patch for something like this.
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-09-06 12:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 10:51 [PATCH v3] libxl: add "xl qemu-monitor-command" Juergen Gross
2016-09-06 12:16 ` Dario Faggioli [this message]
2016-09-09 10:05 ` Wei Liu
2016-09-15 10:25 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473164190.19612.108.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jgross@suse.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.