mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
KVM: Return -ENOTTY on unrecognized ioctls
Not the incorrect -EINVAL. Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
680b3648ba
commit
367e1319b2
4 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue