Displaying 20 results from an estimated 80 matches for "xs_handl".
Did you mean:
xs_handle
2012 Dec 14
1
[PATCH V5] libxenstore: filter watch events in libxenstore when we unwatch
...a subpath (/foo/bar) with the
+ * same path until a successful
+ * xs_unwatch for the first watch
+ * has returned.
+ */
+#define XS_UNWATCH_FILTER 1UL<<2
+
struct xs_handle;
typedef uint32_t xs_transaction_t;
diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index b951015..86ef6c7 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -67,6 +67,8 @@ struct xs_handle {
/* Clients can select() on this pipe to wait for a watch to fire. */
int watch_...
2012 Dec 14
1
[PATCH V4] libxenstore: filter watch events in libxenstore when we unwatch
...a subpath (/foo/bar) with the
+ * same path until a successful
+ * xs_unwatch for the first watch
+ * has returned.
+ */
+#define XS_UNWATCH_FILTER 1UL<<2
+
struct xs_handle;
typedef uint32_t xs_transaction_t;
diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index b951015..5368769 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -67,6 +67,8 @@ struct xs_handle {
/* Clients can select() on this pipe to wait for a watch to fire. */
int watch_...
2012 Sep 25
2
[PATCH V2] libxenstore: filter watch events in libxenstore when we unwatch
...store/xs.c | 73 +++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 65 insertions(+), 8 deletions(-)
diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index b951015..df89e37 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -753,6 +753,19 @@ bool xs_watch(struct xs_handle *h, const char *path, const char *token)
ARRAY_SIZE(iov), NULL));
}
+
+/* Clear the pipe token if there are no more pending watchs.
+ * We suppose the watch_mutex is already taken.
+ */
+static void xs_clear_watch_pipe(struct xs_handle *h)
+{
+ char c;
+
+ if (list_empty(&h->watch_l...
2011 Mar 30
2
[PATCH] xenstore-stat v2
..."watch " : "";
errx(1, "Usage: %s %s[-h] [-n NR] key", progname, mstr);
+ case MODE_stat:
+ mstr = incl_mode ? "stat " : "";
+ errx(1, "Usage: %s %s[-h] [-s] key [...]", progname, mstr);
}
}
@@ -286,6 +290,52 @@ do_watch(struct xs_handle *xsh, int max_events)
}
}
+static const char *
+perm_type_str(int perm_type)
+{
+ switch (perm_type) {
+ case XS_PERM_WRITE:
+ return "-w";
+ case XS_PERM_READ:
+ return "r-";
+ case XS_PERM_READ|XS_PERM_WRITE:
+ return "rw";
+...
2010 Sep 02
7
[PATCH] libxl: make libxl communicate with xenstored by socket or xenbus driver
...------------------
diff -r eff592364826 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Wed Sep 01 11:23:49 2010 +0100
+++ b/tools/libxl/libxl.c Thu Sep 02 14:51:46 2010 +0100
@@ -1387,10 +1387,8 @@
{
libxl_device_model_starting *starting = for_spawn;
char *kvs[3];
- int rc;
struct xs_handle *xsh;
- xsh = xs_daemon_open();
/* we mustn''t use the parent''s handle in the child */
kvs[0] = "image/device-model-pid";
@@ -1398,9 +1396,10 @@
return;
kvs[2] = NULL;
- rc = xs_writev(xsh, XBT_NULL, starting->dom_path, kvs);
- i...
2012 Dec 13
4
[PATCH V3] libxenstore: filter watch events in libxenstore when we unwatch
...t;<0
#define XS_OPEN_SOCKETONLY 1UL<<1
+/*
+ * Avoid race condition with unwatch - Not enabled by default
+ *
+ * If you want to enable it please be sure to watch a path (/foo) and
+ * a sub-path (/foo/bar) with the same token.
+ */
+#define XS_UNWATCH_SAFE 1UL<<2
struct xs_handle;
typedef uint32_t xs_transaction_t;
diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index b951015..591fe79 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -67,6 +67,8 @@ struct xs_handle {
/* Clients can select() on this pipe to wait for a watch to fire. */
int watch_pi...
2013 Jul 06
1
[PATCH 1/2] xenstore: don't die on access-denied child nodes in 'xenstore ls'
...+++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/tools/xenstore/xenstore_client.c b/tools/xenstore/xenstore_client.c
index 3ac214b..996ee64 100644
--- a/tools/xenstore/xenstore_client.c
+++ b/tools/xenstore/xenstore_client.c
@@ -134,8 +134,13 @@ static void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms
unsigned int num, len;
e = xs_directory(h, XBT_NULL, path, &num);
- if (e == NULL)
+ if (e == NULL) {
+ if(errno == EACCES && cur_depth)
+ /* Don''t stop listing just because access was denied to...
2007 Sep 11
6
xs transaction
Seems currently xenstore transaction provides confusing message
in different places:
a) comment of xs_transaction_start says "You can only have one
transaction at any time." However do_transaction_start allows up to
10 transactions created, as long as all other existing transaction
channel is idle at the time (conn->transaction == NULL)
b) when multiple transactions can be
2011 Jun 29
5
[PATCH] xen: introduce xen_change_state_handler
...xen-all.c b/xen-all.c
index 3fd04ef..e8da35f 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -797,12 +797,17 @@ void xenstore_store_pv_console_info(int i, CharDriverState *chr)
}
}
-static void xenstore_record_dm_state(XenIOState *s, const char *state)
+static void xenstore_record_dm_state(struct xs_handle *xs, const char *state)
{
char path[50];
+ if (xs == NULL) {
+ fprintf(stderr, "xenstore connection not initialized\n");
+ exit(1);
+ }
+
snprintf(path, sizeof (path), "/local/domain/0/device-model/%u/state", xen_domid);
- if (!xs_write(s->...
2010 Jun 30
6
Xen 4 - Error 111 Refused Connection
...lete
t = xstransact(path)
File
"/usr/lib64/python2.6/site-packages/xen/xend/xenstore/xstransact.py",
line 29, in __init__
self.transaction = xshandle().transaction_start()
File "/usr/lib64/python2.6/site-packages/xen/xend/xenstore/xsutil.py",
line 18, in xshandle
xs_handle = xen.lowlevel.xs.xs()
Error: (111, ''Connection refused'')
tail -f xend-debug.log
cat: /sys/bus/scsi/devices/host5/model: No such file or directory
cat: /sys/bus/scsi/devices/host5/type: No such file or directory
cat: /sys/bus/scsi/devices/host5/rev: No such file or directory
ca...
2006 Aug 02
0
[PATCH] xenstore-chmod
...name);
#elif defined(CLIENT_exists) || defined(CLIENT_list)
errx(1, "Usage: %s [-h] [-s] key [...]", progname);
+#elif defined(CLIENT_chmod)
+ errx(1, "Usage: %s [-h] [-s] key <mode [modes...]>", progname);
#endif
}
@@ -78,10 +80,61 @@ do_rm(char *path, struct xs_handle *xsh,
}
#endif
+#if defined(CLIENT_chmod)
+#define PATH_SEP ''/''
+#define MAX_PATH_LEN 256
+
+static void
+do_chmod(char *path, struct xs_permissions *perms, int nperms, int upto,
+ int recurse, struct xs_handle *xsh, xs_transaction_t xth)
+{
+ int ret;
+
+ if (!path[0]...
2011 Aug 10
2
xend fails on Open SUSE 11.4
...ine 361, in complete
t = xstransact(path)
File "/usr/lib64/python2.7/site-packages/xen/xend/xenstore/xstransact.py",
line 29, in __init__
self.transaction = xshandle().transaction_start()
File "/usr/lib64/python2.7/site-packages/xen/xend/xenstore/xsutil.py", line
18, in xshandle
xs_handle = xen.lowlevel.xs.xs()
Error: (111, ''Connection refused'')
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
2012 Jun 06
3
[PATCH 0 of 2 V3] xs: fixes to watch thread creation
A pair of patches to the xenstore library that:
1) blocks signal delivery before creating the watch wakeup thread
2) reduces the stack size of the watch wakeup thread.
2007 Oct 24
16
PATCH 0/10: Merge PV framebuffer & console into QEMU
The following series of 10 patches is a merge of the xenfb and xenconsoled
functionality into the qemu-dm code. The general approach taken is to have
qemu-dm provide two machine types - one for xen paravirt, the other for
fullyvirt. For compatability the later is the default. The goals overall
are to kill LibVNCServer, remove alot of code duplication and/or parallel
impls of the same concepts, and
2012 Dec 13
3
[PATCH] xenconsoled: use grant references instead of map_foreign_range
...og_hv_fd = -1;
static evtchn_port_or_error_t log_hv_evtchn = -1;
static xc_interface *xch; /* why does xenconsoled have two xc handles ? */
static xc_evtchn *xce_handle = NULL;
+static xc_gnttab *xcg_handle = NULL;
struct buffer {
char *data;
@@ -501,6 +503,17 @@ static int xs_gather(struct xs_handle *xs, const char *dir, ...)
va_end(ap);
return ret;
}
+
+static void domain_unmap_interface(struct domain *dom)
+{
+ if (dom->interface == NULL)
+ return;
+ if (xcg_handle && dom->ring_ref == -1)
+ xc_gnttab_munmap(xcg_handle, dom->interface, 1);
+ else
+ munmap(dom->int...
2010 Mar 31
1
Xend not starting (Lenny backport of Xen 3.4.3-rc3)
...e 361, in complete
t = xstransact(path)
File "/usr/lib/xen-3.4/lib/python/xen/xend/xenstore/xstransact.py",
line 29, in __init__
self.transaction = xshandle().transaction_start()
File "/usr/lib/xen-3.4/lib/python/xen/xend/xenstore/xsutil.py", line
18, in xshandle
xs_handle = xen.lowlevel.xs.xs()
Error: (111, 'Connection refused')
[2010-03-31 22:40:52 8813] INFO (SrvDaemon:220) Xend exited with status 1.
2005 Aug 04
0
[PATCH 6/11] Xenstore watch rework
...wd_spec[] = { "path", "priority", "token", NULL };
+ static char *kwd_spec[] = { "path", "token", NULL };
static char *arg_spec = "s|is";
char *path = NULL;
- int priority = 0;
char *token = "";
struct xs_handle *xh = xshandle(self);
@@ -365,9 +363,9 @@
if (!xh)
goto exit;
if (!PyArg_ParseTupleAndKeywords(args, kwds, arg_spec, kwd_spec,
- &path, &priority, &token))
- goto exit;
- xsval = xs_watch(xh, path, token, priority);
+...
2009 Jan 02
0
Question Regarding xs_read()
...d to worry about what the DOMID is. When
I try to use this technique in the xs_read function, it returns NULL. It
works fine if I give the absolute path, but I can''t really do that
dynamically since I don''t know the DOMID ahead of time.
Basically I''m trying this:
struct xs_handle* xs;
xs_transaction_t t;
void* domid;
char temp[] = "domid";
xs = xs_daemon_open();
t = xs_transaction_start(xs);
domid = xs_read(xs, t, temp, NULL);
Could someone explain why this doesn''t work or maybe let me know of an
alternative way to read XenStore in a C application with...
2006 Dec 02
3
Bug#401249: xen-utils-common: xenbr0 not being created
...t = xstransact(path)
File "/usr/lib/xen-3.0-unstable-1/lib/python/xen/xend/xenstore/xstransact.py", line 20, in __init__
self.transaction = xshandle().transaction_start()
File "/usr/lib/xen-3.0-unstable-1/lib/python/xen/xend/xenstore/xsutil.py", line 18, in xshandle
xs_handle = xen.lowlevel.xs.xs()
Error: (111, 'Connection refused')
[2006-12-02 02:26:50 xend 2940] INFO (__init__:1072) Xend exited with status 1.
I have another Debian sid which I installed last week and does not show that behavior.
Just in case i am adding here all the xen packages i have insta...
2006 May 11
0
"Exception starting xend ((2, ''No such file or directory''))" - what file?
...xstransact.py", line 323, in complete
t = xstransact(path)
File "/usr/lib/python/xen/xend/xenstore/xstransact.py", line 20, in __init__
self.transaction = xshandle().transaction_start()
File "/usr/lib/python/xen/xend/xenstore/xsutil.py", line 18, in xshandle
xs_handle = xen.lowlevel.xs.xs()
RuntimeError: (2, ''No such file or directory'')
(END)
--
Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xe...