# HG changeset patch
# User vhanquez@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID 18fa851b6dc6ca5893709b480cf38ee7c5ef445e
# Parent a543a4778a7d9888fad13ffafff0aa9bc5541b48
When xc_linux_build fails without a meaninful errno, force errno to EINVAL
avoid message "Error creating domain: (0, 'Error')" in the case
domU version is too old or too new.
Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>
diff -r a543a4778a7d -r 18fa851b6dc6 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Thu Feb 16 15:46:21 2006
+++ b/tools/python/xen/lowlevel/xc/xc.c Thu Feb 16 16:19:38 2006
@@ -347,9 +347,11 @@
if ( xc_linux_build(self->xc_handle, dom, image,
ramdisk, cmdline, flags,
store_evtchn, &store_mfn,
- console_evtchn, &console_mfn) != 0 )
- return PyErr_SetFromErrno(xc_error);
-
+ console_evtchn, &console_mfn) != 0 ) {
+ if (!errno)
+ errno = EINVAL;
+ return PyErr_SetFromErrno(xc_error);
+ }
return Py_BuildValue("{s:i,s:i}",
"store_mfn", store_mfn,
"console_mfn", console_mfn);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|