xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>,
	Dongxiao Xu <dongxiao.xu@intel.com>
Cc: xen-devel@lists.xensource.com
Subject: [PATCH] RE: Failed to create a domain with xen-unstable (Error 22:Invalid argument)
Date: Thu, 14 Jan 2010 13:07:54 +0000	[thread overview]
Message-ID: <4B4F253A0200007800029FA1@vpn.id2.novell.com> (raw)
In-Reply-To: <6CADD16F56BC954D8E28F3836FA7ED7112A7933050@shzsmsx501.ccr.corp.intel.com>

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

           reply	other threads:[~2010-01-14 13:07 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <6CADD16F56BC954D8E28F3836FA7ED7112A7933050@shzsmsx501.ccr.corp.intel.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B4F253A0200007800029FA1@vpn.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=dongxiao.xu@intel.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).