Skip to contentSkip to conversation

xl: don't ignore return value from libxl_device_events_handler

PATCH In review Wei Liu 4 participants 4 messages May 11, 2017

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 xl: don't ignore return value from libxl_device_events_handler

That function can return a whole slew of error codes. Translate them to EXIT_FAILURE.

---
Cc: Ian Jackson <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Roger Pau Monné <[email protected]>

---
 tools/xl/xl_misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/xl/xl_misc.c +1 -1
index 9037e2b2f0..9c6227af23 100644
@@ -182,7 +182,7 @@ int main_devd(int argc, char **argv)
         }
     }
 
-    libxl_device_events_handler(ctx, 0);
+    ret = libxl_device_events_handler(ctx, 0) ? EXIT_FAILURE : EXIT_SUCCESS;
 
 out:
     return ret;
Signature · 1 line
2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
In reply to Wei Liu

Hi Wei,

Quoted 4 lines · Wei Liu

That function can return a whole slew of error codes. Translate them to EXIT_FAILURE.

Cheers,

Quoted 22 lines

---
Cc: Ian Jackson <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Roger Pau Monné <[email protected]>

---
 tools/xl/xl_misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/xl/xl_misc.c +1 -1
index 9037e2b2f0..9c6227af23 100644
@@ -182,7 +182,7 @@ int main_devd(int argc, char **argv)
         }
     }
 
-    libxl_device_events_handler(ctx, 0);
+    ret = libxl_device_events_handler(ctx, 0) ? EXIT_FAILURE : EXIT_SUCCESS;
 
 out:
     return ret;
Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel