[Pkg-xen-changes] [xen] 28/30: tools-xenstore-compatibility.diff
Ian James Campbell
ijc at moszumanska.debian.org
Tue Jan 20 15:15:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
ijc pushed a commit to branch feature/experimental-4.5-final
in repository xen.
commit 4ad8b98cb36d4900dd47485f553e1f18d042f2e2
Author: Bastian Blank <waldi at debian.org>
Date: Sat Jul 5 11:47:36 2014 +0200
tools-xenstore-compatibility.diff
Patch-Name: tools-xenstore-compatibility.diff
---
tools/xenstore/include/xenstore.h | 1 +
tools/xenstore/xenstore_client.c | 2 +-
tools/xenstore/xs.c | 4 +++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/xenstore/include/xenstore.h b/tools/xenstore/include/xenstore.h
index b4b113e..be2491b 100644
--- a/tools/xenstore/include/xenstore.h
+++ b/tools/xenstore/include/xenstore.h
@@ -26,6 +26,7 @@
#define XS_OPEN_READONLY 1UL<<0
#define XS_OPEN_SOCKETONLY 1UL<<1
+#define XS_OPEN_DOMAINONLY 1UL<<2
/*
* Setting XS_UNWATCH_FILTER arranges that after xs_unwatch, no
diff --git a/tools/xenstore/xenstore_client.c b/tools/xenstore/xenstore_client.c
index 1054f18..e6fa58d 100644
--- a/tools/xenstore/xenstore_client.c
+++ b/tools/xenstore/xenstore_client.c
@@ -635,7 +635,7 @@ main(int argc, char **argv)
max_width = ws.ws_col - 2;
}
- xsh = xs_open(socket ? XS_OPEN_SOCKETONLY : 0);
+ xsh = xs_open(socket ? XS_OPEN_SOCKETONLY : XS_OPEN_DOMAINONLY);
if (xsh == NULL) err(1, "xs_open");
again:
diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index 968141d..738d86f 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -282,17 +282,19 @@ struct xs_handle *xs_daemon_open_readonly(void)
struct xs_handle *xs_domain_open(void)
{
- return xs_open(0);
+ return xs_open(XS_OPEN_DOMAINONLY);
}
struct xs_handle *xs_open(unsigned long flags)
{
struct xs_handle *xsh = NULL;
+ if (!(flags & XS_OPEN_DOMAINONLY)) {
if (flags & XS_OPEN_READONLY)
xsh = get_handle(xs_daemon_socket_ro());
else
xsh = get_handle(xs_daemon_socket());
+ }
if (!xsh && !(flags & XS_OPEN_SOCKETONLY))
xsh = get_handle(xs_domain_dev());
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-xen/xen.git
More information about the Pkg-xen-changes
mailing list