[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] RE: [Xen-devel] Failed to create a domain with xen-unstable (Error 22:Invalid argument)



>>> "Xu, Dongxiao" <dongxiao.xu@xxxxxxxxx> 14.01.10 13:26 >>>
>Oops...
>Maybe some issue with my test bed last time...
>Change ENOTTY to EINVAL works now.

Indeed. Yet another way to confuse readers I overlooked: privcmd_ioctl()
sets "ret" to -ENOSYS at the very top of the function, but overwrites it
with -EINVAL in default: handler. And it even returns this -ENOSYS value
in a case where this really isn't an appropriate error code. I'll also prepare
a patch to consolidate this.

Jan

Subject: libxc: fix IOCTL_PRIVCMD_MMAPBATCH_V2 fallback check

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2010-01-06.orig/tools/libxc/xc_linux.c      2010-01-12 10:19:59.000000000 
+0100
+++ 2010-01-06/tools/libxc/xc_linux.c   2010-01-14 14:05:14.000000000 +0100
@@ -180,7 +180,7 @@ void *xc_map_foreign_bulk(int xc_handle,
         }
     }
 
-    if ( rc < 0 && errno == ENOTTY && (int)num > 0 )
+    if ( rc < 0 && errno == EINVAL && (int)num > 0 )
     {
         /*
          * IOCTL_PRIVCMD_MMAPBATCH_V2 is not supported - fall back to



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.