Skip to contentSkip to conversation

libxl: handle the return value of wait_for_dev_destroy select and pass it to caller function

PATCH In review Roger Pau Monne 2 participants 2 messages Oct 19, 2011 – Nov 2, 2011

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 libxl: handle the return value of wait_for_dev_destroy select and pass it to caller function

# HG changeset patch
# User Roger Pau Monne <[email protected]>
# Date 1319033430 -7200
# Node ID 52c8717d2e0841e08e3569ca7bdac0b8309b6cf2
# Parent a2a3c4d7333ec15b818b3403f148ad61c254ea82
libxl: handle the return value of wait_for_dev_destroy select and pass it to caller function.

Handle the return value of the select call inside wait_for_dev_destroy properly, and return 0 if a device is removed, or ERROR_* if a timeout or error happened. Use the return value of wait_for_dev_destroy inside libxl__device_remove to properly return from that function.

This patch should be applied after Ian Campbell's v3 "libxl: rationalise libxl_device_* APIs".

tools/libxl/libxl.h +1 -0
diff -r a2a3c4d7333e -r 52c8717d2e08 tools/libxl/libxl.h
@@ -221,6 +221,7 @@ enum {
     ERROR_INVAL = -6,
     ERROR_BADFAIL = -7,
     ERROR_GUEST_TIMEDOUT = -8,
+    ERROR_TIMEDOUT = -9,
 };
 
 #define LIBXL_VERSION 0
tools/libxl/libxl_device.c +39 -13

81 lines not on this page · raw message

#1 lore raw

Roger Pau Monne writes ("[Xen-devel] [PATCH v2] libxl: handle the return value of wait_for_dev_destroy select and pass it to caller function"):

Quoted 1 line

libxl: handle the return value of wait_for_dev_destroy select and pass it to caller function.

Thanks. I have applied this, although it will probably benefit from some rework after my event patches go in.

Ian.