Skip to contentSkip to conversation

libxl: fix xenstore connection when run in domU

PATCH Applied Daniel De Graaf 2 participants 2 messages Aug 26, 2010 – Aug 30, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: fix xenstore connection when run in domU

When used in a domain other than the one running xenstore, libxl_ctx_init will fail to connect even when xenstore is actually available. Add a call to xs_domain_open to handle this case.

Signature · 2 lines
Daniel De Graaf
National Security Agency
tools/libxl/libxl.c +2 -0
diff -r 3c4c3d48a835 tools/libxl/libxl.c
@@ -54,6 +54,8 @@
     }
 
     ctx->xsh = xs_daemon_open();
+    if (!ctx->xsh)
+        ctx->xsh = xs_domain_open();
     if (!ctx->xsh) {
         XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno, 
                         "cannot connect to xenstore");

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 4 lines · Daniel De Graaf

When used in a domain other than the one running xenstore, libxl_ctx_init will fail to connect even when xenstore is actually available. Add a call to xs_domain_open to handle this case.

applied, thanks