xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RE: Failed to create a domain with xen-unstable (Error 22:Invalid argument)
       [not found]   ` <6CADD16F56BC954D8E28F3836FA7ED7112A7933050@shzsmsx501.ccr.corp.intel.com>
@ 2010-01-14 13:07     ` Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2010-01-14 13:07 UTC (permalink / raw)
  To: Keir Fraser, Dongxiao Xu; +Cc: xen-devel

>>> "Xu, Dongxiao" <dongxiao.xu@intel.com> 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@novell.com>

--- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-14 13:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <6CADD16F56BC954D8E28F3836FA7ED7112A7932FF8@shzsmsx501.ccr.corp.intel.com>
     [not found] ` <4B4EF5DB0200007800029E9B@vpn.id2.novell.com>
     [not found]   ` <6CADD16F56BC954D8E28F3836FA7ED7112A7933050@shzsmsx501.ccr.corp.intel.com>
2010-01-14 13:07     ` [PATCH] RE: Failed to create a domain with xen-unstable (Error 22:Invalid argument) Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).