xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>, xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>
Subject: Re: [PATCHv1 1/2] xen/prvicmd: use ENOTTY if the IOCTL is not supported
Date: Thu, 4 Aug 2016 10:26:43 -0400	[thread overview]
Message-ID: <6d1df153-bfec-0348-093b-d24b24379779@oracle.com> (raw)
In-Reply-To: <1470243785-30523-2-git-send-email-david.vrabel@citrix.com>

On 08/03/2016 01:03 PM, David Vrabel wrote:
> The standard return value for ioctl(2) where the cmd is not supported
> is ENOTTY, not EINVAL.
>
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
> ---
>  drivers/xen/privcmd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
> index 702040f..ac76bc4 100644
> --- a/drivers/xen/privcmd.c
> +++ b/drivers/xen/privcmd.c
> @@ -572,7 +572,7 @@ static long privcmd_ioctl(struct file *file,
>  		break;
>  
>  	default:
> -		ret = -EINVAL;
> +		ret = -ENOTTY;
>  		break;
>  	}
>  

evtchn_ioctl() returns -ENOSYS so probably also should be fixed.

In fact, ioctls in drivers/xen/ should be made consistent in what they
do for unknown command.

-boris


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-08-04 14:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 17:03 [PATCHv1 0/2] xen/privcmd: prevent page migration for hypercall buffers David Vrabel
2016-08-03 17:03 ` [PATCHv1 1/2] xen/prvicmd: use ENOTTY if the IOCTL is not supported David Vrabel
2016-08-04 14:26   ` Boris Ostrovsky [this message]
2016-08-03 17:03 ` [PATCHv1 2/2] xen/privcmd: add ioctls for locking/unlocking hypercall buffers David Vrabel
2016-08-04  6:52   ` Jan Beulich

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=6d1df153-bfec-0348-093b-d24b24379779@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=jgross@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /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).