aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xs.h
diff options
context:
space:
mode:
authorIan Jackson <Ian.Jackson@eu.citrix.com>2010-12-14 16:56:54 +0000
committerIan Jackson <Ian.Jackson@eu.citrix.com>2010-12-14 16:56:54 +0000
commitd310383831923070727745af97776dcb6078e4f7 (patch)
treeef7d1bfbeb7de4ecd05df033c1a6987ddc6f222d /tools/xenstore/xs.h
parent467a09d50d6768c8637e532a960f940fb9df2233 (diff)
downloadxen-d310383831923070727745af97776dcb6078e4f7.tar.gz
xen-d310383831923070727745af97776dcb6078e4f7.tar.bz2
xen-d310383831923070727745af97776dcb6078e4f7.zip
xenstore: new XS_OPEN_SOCKETONLY flag; honour "-s" on tools' cmdline
The "-s" option to xenstore-ls is used by the xencommons startup script to check whether xenstored is already running, before starting it. Since 22498:a40455ae9ad3, "-s" has been a no-op, and libxenstore will always fall back to using xenbus. The combined effect is that the xencommons script deadlocks: xenstore-ls hangs waiting for xenstored, which isn't started by xencommons because xencommons is waiting for xenstore-ls. In this patch, we: * Introduce a new XS_OPEN_SOCKETONLY flag which disables the fallback behaviour; * Make the xenstore command line tools use the new xs_open call rather than the old, deprecated xs_open_* calls (which are now identical). * Plumb the xenstore command line tools "-s" option to set the XS_OPEN_SOCKETONLY flag. * Change the type of the XS_OPEN_* flags so that they naturally have type unsigned long. The "-s" option to xenstore-ls et al, and the XS_OPEN_SOCKETONLY flag, are intended for use by toolstack infrastructure and should not normally be used by higher-level code. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/xenstore/xs.h')
-rw-r--r--tools/xenstore/xs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/xenstore/xs.h b/tools/xenstore/xs.h
index 1e28849eac..1cbe255a41 100644
--- a/tools/xenstore/xs.h
+++ b/tools/xenstore/xs.h
@@ -24,7 +24,8 @@
#define XBT_NULL 0
-#define XS_OPEN_READONLY 1<<0
+#define XS_OPEN_READONLY 1UL<<0
+#define XS_OPEN_SOCKETONLY 1UL<<1
struct xs_handle;
typedef uint32_t xs_transaction_t;