|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 7/9] xenstore: add init-xenstore-domain parameter to specify cmdline
On Fri, 2015-12-11 at 16:47 +0100, Juergen Gross wrote:
> Add a parameter to init-xenstore-domain for support of arbitrary
> parameters for the xenstore domain.
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> ---
> Âtools/xenstore/init-xenstore-domain.c | 21 ++++++++++++++++-----
> Â1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/tools/xenstore/init-xenstore-domain.c b/tools/xenstore/init-
> xenstore-domain.c
> index 0ca7eed..eedcf32 100644
> --- a/tools/xenstore/init-xenstore-domain.c
> +++ b/tools/xenstore/init-xenstore-domain.c
> @@ -17,6 +17,7 @@ static uint32_t domid = -1;
> Âstatic char *kernel;
> Âstatic char *ramdisk;
> Âstatic char *flask;
> +static char *param;
> Âstatic int memory;
> Â
> Âstatic struct option options[] = {
> @@ -24,6 +25,7 @@ static struct option options[] = {
> Â { "memory", 1, NULL, 'm' },
> Â { "flask", 1, NULL, 'f' },
> Â { "ramdisk", 1, NULL, 'r' },
> + { "param", 1, NULL, 'p' },
> Â { NULL, 0, NULL, 0 }
> Â};
> Â
> @@ -36,10 +38,11 @@ static void usage(void)
> Â"\n"
> Â"where options may include:\n"
> Â"\n"
> -"ÂÂ--kernel ÂÂkernel file of the xenstore domain, mandatory\n"
> -"ÂÂ--memory ÂÂÂÂÂÂsize of the domain in MB, mandatory\n"
> -"ÂÂ--flask ÂÂÂÂÂÂÂoptional flask label of the domain\n"
> -"ÂÂ--ramdisk ÂÂÂÂoptional ramdisk file for the domain\n");
> +"ÂÂ--kernel kernel file of the xenstore domain, mandatory\n"
> +"ÂÂ--memory ÂÂÂÂÂsize of the domain in MB, mandatory\n"
> +"ÂÂ--flask ÂÂÂÂÂÂoptional flask label of the domain\n"
> +"ÂÂ--ramdisk ÂÂÂoptional ramdisk file for the domain\n"
> +"ÂÂ--param <cmdline>ÂÂÂÂÂÂÂÂÂÂoptional additional parameters for the
> domain\n");
This seems spurious, either get the indent right when you add the original
block or leave it alone here I think.
Otherwise this looks good to me:
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Â}
> Â
> Âstatic int build(xc_interface *xch)
> @@ -93,7 +96,12 @@ static int build(xc_interface *xch)
> Â fprintf(stderr, "Xenbus setup ioctl failed\n");
> Â goto err;
> Â }
> - snprintf(cmdline, 512, "--event %d --internal-db", rv);
> +
> + if (param)
> + snprintf(cmdline, 512, "--event %d --internal-db %s",
> rv,
> + Âparam);
> + else
> + snprintf(cmdline, 512, "--event %d --internal-db", rv);
> Â
> Â dom = xc_dom_allocate(xch, cmdline, NULL);
> Â rv = xc_dom_kernel_file(dom, kernel);
> @@ -203,6 +211,9 @@ int main(int argc, char** argv)
> Â case 'r':
> Â ramdisk = optarg;
> Â break;
> + case 'p':
> + param = optarg;
> + break;
> Â }
> Â }
> Â
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |