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

[Xen-changelog] [xen-unstable] minios: Error case when unbinding unknown port in xc_evtchn_unbind is



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1217579905 -3600
# Node ID 1c39d42dcce86aa921e827a5e88a47aa5527c4bb
# Parent  6314450a73c79b7dc143d20655e254115a1a7f1b
minios: Error case when unbinding unknown port in xc_evtchn_unbind is
missing a return statement.

Signed-off-by: Diego Ongaro <diego.ongaro@xxxxxxxxxx>
---
 tools/libxc/xc_minios.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -r 6314450a73c7 -r 1c39d42dcce8 tools/libxc/xc_minios.c
--- a/tools/libxc/xc_minios.c   Fri Aug 01 09:37:10 2008 +0100
+++ b/tools/libxc/xc_minios.c   Fri Aug 01 09:38:25 2008 +0100
@@ -259,8 +259,11 @@ int xc_evtchn_unbind(int xce_handle, evt
            files[xce_handle].evtchn.ports[i].port = -1;
            break;
        }
-    if (i == MAX_EVTCHN_PORTS)
+    if (i == MAX_EVTCHN_PORTS) {
        printf("Warning: couldn't find port %"PRId32" for xc handle %x\n", 
port, xce_handle);
+       errno = -EINVAL;
+       return -1;
+    }
     files[xce_handle].evtchn.ports[i].bound = 0;
     unbind_evtchn(port);
     return 0;

_______________________________________________
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®.