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

[Xen-changelog] [xen master] xenstore: add init-xenstore-domain parameter to specify cmdline



commit 83c365e6395f39c7ff91785b400682173d5e5d04
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Mon Jan 18 09:04:00 2016 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon Jan 18 16:34:21 2016 +0000

    xenstore: add init-xenstore-domain parameter to specify cmdline
    
    Add a parameter to init-xenstore-domain for support of arbitrary
    parameters for the xenstore domain.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
---
 tools/helpers/init-xenstore-domain.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/tools/helpers/init-xenstore-domain.c 
b/tools/helpers/init-xenstore-domain.c
index ecced04..238007b 100644
--- a/tools/helpers/init-xenstore-domain.c
+++ b/tools/helpers/init-xenstore-domain.c
@@ -17,6 +17,7 @@ static uint32_t domid = ~0;
 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 }
 };
 
@@ -39,7 +41,8 @@ static void usage(void)
 "  --kernel <xenstore-kernel> kernel file of the xenstore domain, mandatory\n"
 "  --memory <memory size>     size of the domain in MB, mandatory\n"
 "  --flask <flask-label>      optional flask label of the domain\n"
-"  --ramdisk <ramdisk-file>   optional ramdisk file for the domain\n");
+"  --ramdisk <ramdisk-file>   optional ramdisk file for the domain\n"
+"  --param <cmdline>          optional additional parameters for the 
domain\n");
 }
 
 static int build(xc_interface *xch)
@@ -103,7 +106,11 @@ 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);
@@ -233,6 +240,9 @@ int main(int argc, char** argv)
         case 'r':
             ramdisk = optarg;
             break;
+        case 'p':
+            param = optarg;
+            break;
         default:
             usage();
             return 2;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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