All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	xen-devel@lists.xenproject.org, wei.liu2@citrix.com,
	ian.jackson@eu.citrix.com
Subject: Re: [PATCH 3/3] tools/libxl: run_helper - add #define for arguments.
Date: Tue, 26 Jan 2016 16:23:33 +0000	[thread overview]
Message-ID: <1453825413.25257.33.camel@citrix.com> (raw)
In-Reply-To: <1453756017-8747-4-git-send-email-konrad.wilk@oracle.com>

On Mon, 2016-01-25 at 16:06 -0500, Konrad Rzeszutek Wilk wrote:
> Describe what the four (or more in the future) arguments
> are for.

I'd say that a code comment on the definition would be sufficient here, but
I'll defer to Ian J as author of this code.

> 
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
>  tools/libxl/libxl_save_callout.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/libxl/libxl_save_callout.c
> b/tools/libxl/libxl_save_callout.c
> index 3af99af..45b9727 100644
> --- a/tools/libxl/libxl_save_callout.c
> +++ b/tools/libxl/libxl_save_callout.c
> @@ -119,13 +119,22 @@ void
> libxl__save_helper_init(libxl__save_helper_state *shs)
>  
>  /*----- helper execution -----*/
>  
> +/*
> + * Both save and restore share four parameters:
> + * 1) Path to libxl-save-helper.
> + * 2) --[restore|save]-domain.
> + * 3) stream file descriptor.
> + * n) save/restore specific parameters.
> + * 4) A \0 at the end.
> + */
> +#define HELPER_NR_ARGS 4
>  static void run_helper(libxl__egc *egc, libxl__save_helper_state *shs,
>                         const char *mode_arg, int stream_fd,
>                         const int *preserve_fds, int num_preserve_fds,
>                         const unsigned long *argnums, int num_argnums)
>  {
>      STATE_AO_GC(shs->ao);
> -    const char *args[4 + num_argnums];
> +    const char *args[HELPER_NR_ARGS + num_argnums];
>      const char **arg = args;
>      int i, rc;
>  

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

  reply	other threads:[~2016-01-26 16:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 21:30 [PATCH] various updates/fixes. (v2) Konrad Rzeszutek Wilk
2016-01-26 21:30 ` [PATCH 1/4] libxl: Use libxl_strdup instead of strdup on libxl_version_info Konrad Rzeszutek Wilk
2016-02-01 12:13   ` Wei Liu
2016-02-03 11:46     ` Ian Campbell
2016-01-26 21:30 ` [PATCH 2/4] libxc/xc_domain_resume: Update comment Konrad Rzeszutek Wilk
2016-02-01 12:14   ` Wei Liu
2016-02-03 11:47     ` Ian Campbell
2016-01-26 21:30 ` [PATCH 3/4] libxl/remus: Change the assert for info to an return Konrad Rzeszutek Wilk
2016-02-01 12:13   ` Wei Liu
2016-01-25 21:06     ` [PATCH] toolstack documentation/asserts cleanups. (v1) Konrad Rzeszutek Wilk
2016-01-25 21:06       ` [PATCH 1/3] libxc/xc_domain_resume: Update comment Konrad Rzeszutek Wilk
2016-01-26 16:19         ` Ian Campbell
2016-01-26 16:22           ` Ian Jackson
2016-01-26 16:36             ` Ian Campbell
2016-01-26 16:52               ` Ian Jackson
2016-01-26 19:37                 ` Konrad Rzeszutek Wilk
2016-01-26 19:47           ` Konrad Rzeszutek Wilk
2016-01-27  9:52             ` Ian Campbell
2016-01-25 21:06       ` [PATCH 2/3] libxl/remus: Move the assert before the info is used Konrad Rzeszutek Wilk
2016-01-26 16:21         ` Ian Campbell
2016-01-26 16:23           ` Ian Jackson
2016-02-01 14:14             ` [PATCH 2/3] libxl/remus: Move the assert before the info is used. [and 1 more messages] Ian Jackson
2016-01-25 21:06       ` [PATCH 3/3] tools/libxl: run_helper - add #define for arguments Konrad Rzeszutek Wilk
2016-01-26 16:23         ` Ian Campbell [this message]
2016-01-26 16:25           ` Ian Jackson
2016-02-03 11:48             ` Ian Campbell
2016-01-26 21:31 ` [PATCH 4/4] " Konrad Rzeszutek Wilk
2016-02-03 11:47   ` Ian Campbell

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=1453825413.25257.33.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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.