Mailing List Archive

Cope with -1 eventchn_fd -- this occurs when using --no-domain-init (a
# HG changeset patch
# User emellor@leeni.uk.xensource.com
# Node ID 47013962e41102677b95d1422a5e7bddfd1e125f
# Parent 52b2dc7fb9b731562002c09f59453f7c0ad6fe59
Cope with -1 eventchn_fd -- this occurs when using --no-domain-init (a
command line debugging option).

Signed-off-by: Ewan Mellor <ewan@xensource.com>

diff -r 52b2dc7fb9b7 -r 47013962e411 tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c Fri Feb 10 01:09:19 2006
+++ b/tools/xenstore/xenstored_core.c Fri Feb 10 02:23:36 2006
@@ -339,6 +339,8 @@

static void set_fd(int fd, fd_set *set, int *max)
{
+ if (fd < 0)
+ return;
FD_SET(fd, set);
if (fd > *max)
*max = fd;
@@ -1670,7 +1672,7 @@
if (FD_ISSET(*ro_sock, &inset))
accept_connection(*ro_sock, false);

- if (FD_ISSET(eventchn_fd, &inset))
+ if (eventchn_fd > 0 && FD_ISSET(eventchn_fd, &inset))
handle_event();

list_for_each_entry(i, &connections, list) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xensource.com
http://lists.xensource.com/xen-changelog