[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] ioemu: Do not sue xce_handle directly as a file descriptor.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1204037217 0
# Node ID ca2cf5c1adccba39aba6b08d5107cd4c5d1dfd42
# Parent  76479f25cdac507f35cf703d46fdd00026dd4dc3
ioemu: Do not sue xce_handle directly as a file descriptor.

xce handles are not supposed to be used as file descriptors, but
xc_evtchn_fd() be used.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 tools/ioemu/hw/xen_console.c |    2 +-
 tools/ioemu/hw/xenfb.c       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -r 76479f25cdac -r ca2cf5c1adcc tools/ioemu/hw/xen_console.c
--- a/tools/ioemu/hw/xen_console.c      Tue Feb 26 14:46:07 2008 +0000
+++ b/tools/ioemu/hw/xen_console.c      Tue Feb 26 14:46:57 2008 +0000
@@ -381,7 +381,7 @@ static void xencons_startup(void *opaque
        qemu_set_fd_handler2(xs_fileno(dom->xsh), NULL, NULL, NULL, NULL);
 
        fprintf(stderr, "Console: connected to guest frontend\n");
-       if (qemu_set_fd_handler2(dom->xce_handle, NULL, xencons_ring_read, 
NULL, dom) < 0)
+       if (qemu_set_fd_handler2(xc_evtchn_fd(dom->xce_handle), NULL, 
xencons_ring_read, NULL, dom) < 0)
                return;
 
        qemu_chr_add_handlers(dom->chr, xencons_can_receive, xencons_receive,
diff -r 76479f25cdac -r ca2cf5c1adcc tools/ioemu/hw/xenfb.c
--- a/tools/ioemu/hw/xenfb.c    Tue Feb 26 14:46:07 2008 +0000
+++ b/tools/ioemu/hw/xenfb.c    Tue Feb 26 14:46:57 2008 +0000
@@ -1160,7 +1160,7 @@ static int xenfb_register_console(struct
                             xenfb);
        dpy_resize(xenfb->ds, xenfb->width, xenfb->height);
 
-       if (qemu_set_fd_handler2(xenfb->evt_xch, NULL, xenfb_dispatch_channel, 
NULL, xenfb) < 0)
+       if (qemu_set_fd_handler2(xc_evtchn_fd(xenfb->evt_xch), NULL, 
xenfb_dispatch_channel, NULL, xenfb) < 0)
                return -1;
        if (qemu_set_fd_handler2(xs_fileno(xenfb->xsh), NULL, 
xenfb_dispatch_store, NULL, xenfb) < 0)
                return -1;

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.