Skip to contentSkip to conversation

Add more xc_error_code values.

PATCH New Gerd Hoffmann 1 participant 1 message Dec 8, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add more xc_error_code values.

XC_INVALID_PARAM
such as asking for features unsupported by either xen or guest kernel.
XC_OUT_OF_MEMORY
no comment ;)

With description texts this time.

---
 tools/libxc/xc_private.c |    4 ++++
 tools/libxc/xenctrl.h    |    2 ++
 2 files changed, 6 insertions(+)
tools/libxc/xenctrl.h +2 -0
Index: build-32-unstable-12809/tools/libxc/xenctrl.h
===================================================================
@@ -691,6 +691,8 @@ typedef enum {
   XC_ERROR_NONE = 0,
   XC_INTERNAL_ERROR = 1,
   XC_INVALID_KERNEL = 2,
+  XC_INVALID_PARAM = 3,
+  XC_OUT_OF_MEMORY = 4,
 } xc_error_code;
 
 #define XC_MAX_ERROR_MSG_LEN 1024
tools/libxc/xc_private.c +4 -0
Index: build-32-unstable-12809/tools/libxc/xc_private.c
===================================================================
@@ -45,6 +45,10 @@ const char *xc_error_code_to_desc(int co
         return "Internal error";
     case XC_INVALID_KERNEL:
         return "Invalid kernel";
+    case XC_INVALID_PARAM:
+        return "Invalid configuration";
+    case XC_OUT_OF_MEMORY:
+        return "Out of memory";
     }
 
     return "Unknown error code";