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

[Xen-changelog] [xen master] mini-os: fixed format string error in unbind_evtchn



commit 549a29fcd81ff10783e6c9bce93255218fed79fb
Author:     Thomas Leonard <talex5@xxxxxxxxx>
AuthorDate: Thu Jun 26 12:28:20 2014 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Jun 27 13:38:33 2014 +0100

    mini-os: fixed format string error in unbind_evtchn
    
    Would crash if HYPERVISOR_event_channel_op returned an error code.
    The other changes in this commit are just fixing indentation.
    
    Signed-off-by: Thomas Leonard <talex5@xxxxxxxxx>
    Acked-by: Ian Campbell <ian.cammpbell@xxxxxxxxxx>
    Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
---
 extras/mini-os/events.c |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/extras/mini-os/events.c b/extras/mini-os/events.c
index d60630b..f708cb4 100644
--- a/extras/mini-os/events.c
+++ b/extras/mini-os/events.c
@@ -109,24 +109,23 @@ evtchn_port_t bind_evtchn(evtchn_port_t port, 
evtchn_handler_t handler,
 
 void unbind_evtchn(evtchn_port_t port )
 {
-       struct evtchn_close close;
+    struct evtchn_close close;
     int rc;
 
-       if ( ev_actions[port].handler == default_handler )
-               printk("WARN: No handler for port %d when unbinding\n", port);
-       mask_evtchn(port);
-       clear_evtchn(port);
+    if ( ev_actions[port].handler == default_handler )
+        printk("WARN: No handler for port %d when unbinding\n", port);
+    mask_evtchn(port);
+    clear_evtchn(port);
 
-       ev_actions[port].handler = default_handler;
-       wmb();
-       ev_actions[port].data = NULL;
-       clear_bit(port, bound_ports);
+    ev_actions[port].handler = default_handler;
+    wmb();
+    ev_actions[port].data = NULL;
+    clear_bit(port, bound_ports);
 
-       close.port = port;
-       rc = HYPERVISOR_event_channel_op(EVTCHNOP_close, &close);
+    close.port = port;
+    rc = HYPERVISOR_event_channel_op(EVTCHNOP_close, &close);
     if ( rc )
-        printk("WARN: close_port %s failed rc=%d. ignored\n", port, rc);
-        
+        printk("WARN: close_port %d failed rc=%d. ignored\n", port, rc);
 }
 
 evtchn_port_t bind_virq(uint32_t virq, evtchn_handler_t handler, void *data)
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.