diff options
author | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-09-06 17:00:25 +0000 |
---|---|---|
committer | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-09-06 17:00:25 +0000 |
commit | 3e9b41a1b52b4d9d2c2ee51af768393051ef79fa (patch) | |
tree | ce295aa684dcda4ce3e49c0b23afdbd70175ad44 /tools/xenstore | |
parent | 0ee3c3bafcf1d98295781a7199ba27da3dc8d37a (diff) | |
parent | 412ce402aee45b9cf898413d82f3e4701b0aa93e (diff) | |
download | xen-3e9b41a1b52b4d9d2c2ee51af768393051ef79fa.tar.gz xen-3e9b41a1b52b4d9d2c2ee51af768393051ef79fa.tar.bz2 xen-3e9b41a1b52b4d9d2c2ee51af768393051ef79fa.zip |
merge?
Diffstat (limited to 'tools/xenstore')
-rw-r--r-- | tools/xenstore/Makefile | 2 | ||||
-rw-r--r-- | tools/xenstore/xenstored_core.c | 14 | ||||
-rw-r--r-- | tools/xenstore/xs.c | 3 |
3 files changed, 14 insertions, 5 deletions
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile index 13164f08d6..82c64dfc6f 100644 --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -12,7 +12,7 @@ BASECFLAGS=-Wall -W -g -Werror # Make gcc generate dependencies. BASECFLAGS += -Wp,-MD,.$(@F).d PROG_DEP = .*.d -#BASECFLAGS+= -O3 $(PROFILE) +BASECFLAGS+= -O3 $(PROFILE) #BASECFLAGS+= -I$(XEN_ROOT)/tools BASECFLAGS+= -I$(XEN_ROOT)/tools/libxc BASECFLAGS+= -I$(XEN_ROOT)/xen/include/public diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 219748e8f1..c9cc84b4c3 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -1310,8 +1310,12 @@ static int out_of_mem(void *data) static void consider_message(struct connection *conn) { - struct buffered_data *in = NULL; - enum xsd_sockmsg_type type = conn->in->hdr.msg.type; + /* + * 'volatile' qualifier prevents register allocation which fixes: + * warning: variable 'xxx' might be clobbered by 'longjmp' or 'vfork' + */ + struct buffered_data *volatile in = NULL; + enum xsd_sockmsg_type volatile type = conn->in->hdr.msg.type; jmp_buf talloc_fail; assert(conn->state == OK); @@ -1449,7 +1453,11 @@ static void unblock_connections(void) struct connection *new_connection(connwritefn_t *write, connreadfn_t *read) { - struct connection *new; + /* + * 'volatile' qualifier prevents register allocation which fixes: + * warning: variable 'xxx' might be clobbered by 'longjmp' or 'vfork' + */ + struct connection *volatile new; jmp_buf talloc_fail; new = talloc(talloc_autofree_context(), struct connection); diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c index ff31244166..5d36a8d642 100644 --- a/tools/xenstore/xs.c +++ b/tools/xenstore/xs.c @@ -628,7 +628,8 @@ bool xs_shutdown(struct xs_handle *h) if (ret) { char c; /* Wait for it to actually shutdown. */ - read(h->fd, &c, 1); + while ((read(h->fd, &c, 1) < 0) && (errno == EINTR)) + continue; } return ret; } |