Skip to contentSkip to conversation

Expose the exception thrown by xen.lowlevel.xs.

Xen-changelog Hollis Blanchard 1 participant 1 message Jun 7, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 4 lines · Xen patchbot-unstable

diff -r 647d012b9a36 -r da81a493c8e5 tools/python/xen/lowlevel/xs/xs.c

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 +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 -1
         goto 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