From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] RE: Failed to create a domain with xen-unstable (Error 22:Invalid argument) Date: Thu, 14 Jan 2010 13:07:54 +0000 Message-ID: <4B4F253A0200007800029FA1@vpn.id2.novell.com> References: <6CADD16F56BC954D8E28F3836FA7ED7112A7932FF8@shzsmsx501.ccr.corp.intel.com> <4B4EF5DB0200007800029E9B@vpn.id2.novell.com> <6CADD16F56BC954D8E28F3836FA7ED7112A7933050@shzsmsx501.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <6CADD16F56BC954D8E28F3836FA7ED7112A7933050@shzsmsx501.ccr.corp.intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , Dongxiao Xu Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> "Xu, Dongxiao" 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 --- 2010-01-06.orig/tools/libxc/xc_linux.c 2010-01-12 10:19:59.0000000= 00 +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, } } =20 - if ( rc < 0 && errno =3D=3D ENOTTY && (int)num > 0 ) + if ( rc < 0 && errno =3D=3D EINVAL && (int)num > 0 ) { /* * IOCTL_PRIVCMD_MMAPBATCH_V2 is not supported - fall back to