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

[PATCH 21/29] tools: tell xenstore-stubdom its own domid



Pass the domid as a boot parameter when starting xenstore-stubdom.
It will be needed to administrate its own Xenstore entries.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
 tools/helpers/init-xenstore-domain.c | 4 ++--
 tools/xenstored/core.c               | 9 +++++++++
 tools/xenstored/core.h               | 1 +
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/tools/helpers/init-xenstore-domain.c 
b/tools/helpers/init-xenstore-domain.c
index a65abae2ac..718cb3ba4e 100644
--- a/tools/helpers/init-xenstore-domain.c
+++ b/tools/helpers/init-xenstore-domain.c
@@ -240,9 +240,9 @@ static int build(xc_interface *xch)
     }
 
     if ( param )
-        snprintf(cmdline, 512, "--event %d %s", rv, param);
+        snprintf(cmdline, 512, "--event %d --domid %u %s", rv, domid, param);
     else
-        snprintf(cmdline, 512, "--event %d", rv);
+        snprintf(cmdline, 512, "--event %d --domid %u", rv, domid);
 
     dom->guest_domid = domid;
     dom->cmdline = xc_dom_strdup(dom, cmdline);
diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c
index edd07711db..bb4612455d 100644
--- a/tools/xenstored/core.c
+++ b/tools/xenstored/core.c
@@ -2732,12 +2732,16 @@ static struct option options[] = {
        { "watch-nb", 1, NULL, 'W' },
 #ifndef NO_LIVE_UPDATE
        { "live-update", 0, NULL, 'U' },
+#endif
+#ifdef __MINIOS__
+       { "domid", 1, NULL, 2 },
 #endif
        { NULL, 0, NULL, 0 } };
 
 int dom0_domid = 0;
 int dom0_event = 0;
 int priv_domid = 0;
+int stub_domid = -1;
 
 static unsigned int get_optval_uint(const char *arg)
 {
@@ -2927,6 +2931,11 @@ int main(int argc, char *argv[])
                case 'U':
                        live_update = true;
                        break;
+#endif
+#ifdef __MINIOS__
+               case 2:
+                       stub_domid = get_optval_uint(optarg);
+                       break;
 #endif
                }
        }
diff --git a/tools/xenstored/core.h b/tools/xenstored/core.h
index 480b0f5f7b..f7a27a4131 100644
--- a/tools/xenstored/core.h
+++ b/tools/xenstored/core.h
@@ -359,6 +359,7 @@ do {                                                \
 extern int dom0_domid;
 extern int dom0_event;
 extern int priv_domid;
+extern int stub_domid;
 extern bool keep_orphans;
 
 extern unsigned int timeout_watch_event_msec;
-- 
2.35.3




 


Rackspace

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