Expose the exception thrown by xen.lowlevel.xs.
Quoted 4 lines · Xen patchbot-unstable
diff -r
647d012b9a36-rda81a493c8e5tools/python/xen/lowlevel/xs/xs.ctools/python/xen/lowlevel/xs/xs.c Thu Jun 01 12:13:11 2006 +0100 renamed from tools/python/xen/lowlevel/xs/xs.c Thu Jun 01 12:11:59 2006 +0100 +0
-0
...
Quoted 6 lines
tools/python/xen/lowlevel/xs/xs.c Thu Jun 01 12:13:11 2006 +0100 renamed from tools/python/xen/lowlevel/xs/xs.c Thu Jun 01 12:11:59 2006 +0100 +1
-1@@ -324,13 +333,13 @@ static PyObject *xspy_set_permissions(Xs th = strtoul(thstr, NULL, 16); if (!PyList_Check(perms)) { - PyErr_SetString(PyExc_RuntimeError, "perms must be a list"); + xs_set_error(EINVAL);
tools/python/xen/lowlevel/xs/xs.c Thu Jun 01 12:13:11 2006 +0100 static PyObject *xspy_set_permissions(Xs · line 345
Quoted 10 lines
tools/python/xen/lowlevel/xs/xs.c Thu Jun 01 12:13:11 2006 +0100 renamed from tools/python/xen/lowlevel/xs/xs.c Thu Jun 01 12:11:59 2006 +0100 +1
-1goto exit; } xsperms_n = PyList_Size(perms); xsperms = calloc(xsperms_n, sizeof(struct xs_permissions)); if (!xsperms) { - PyErr_SetString(PyExc_RuntimeError, "out of memory"); + xs_set_error(ENOMEM); goto exit; } tuple0 = PyTuple_New(0);
I couldn't help but notice some inconsistent tab/spacing going on... seems to change throughout the file.
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center