提交 367e1319 编写于 作者: A Avi Kivity

KVM: Return -ENOTTY on unrecognized ioctls

Not the incorrect -EINVAL.
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 680b3648
......@@ -941,7 +941,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
{
struct kvm *kvm = filp->private_data;
void __user *argp = (void __user *)arg;
int r = -EINVAL;
int r = -ENOTTY;
switch (ioctl) {
case KVM_SET_MEMORY_REGION: {
......
......@@ -421,7 +421,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
switch (ioctl) {
default:
r = -EINVAL;
r = -ENOTTY;
}
return r;
......
......@@ -150,7 +150,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
break;
}
default:
r = -EINVAL;
r = -ENOTTY;
}
return r;
......
......@@ -2176,7 +2176,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
{
struct kvm *kvm = filp->private_data;
void __user *argp = (void __user *)arg;
int r = -EINVAL;
int r = -ENOTTY;
/*
* This union makes it completely explicit to gcc-3.x
* that these two variables' stack usage should be
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册