Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1579945 > unrolled thread
| Started by | Paul Durrant <paul.durrant@citrix.com> |
|---|---|
| First post | 2017-02-13 18:10 +0100 |
| Last post | 2017-02-13 20:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 1/3] xen/privcmd: return -ENOTTY for unimplemented IOCTLs Paul Durrant <paul.durrant@citrix.com> - 2017-02-13 18:10 +0100
Re: [PATCH v3 1/3] xen/privcmd: return -ENOTTY for unimplemented IOCTLs Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-13 20:00 +0100
| From | Paul Durrant <paul.durrant@citrix.com> |
|---|---|
| Date | 2017-02-13 18:10 +0100 |
| Subject | [PATCH v3 1/3] xen/privcmd: return -ENOTTY for unimplemented IOCTLs |
| Message-ID | <tasiu-6AY-7@gated-at.bofh.it> |
The code sets the default return code to -ENOSYS but then overrides this
to -EINVAL in the switch() statement's default case, which is clearly
silly.
This patch removes the override and sets the default return code to
-ENOTTY, which is the conventional return for an unimplemented ioctl.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>
v2:
- Use -ENOTTY rather than -ENOSYS
---
drivers/xen/privcmd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index 6e3306f..5e5c7ae 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -551,7 +551,7 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version)
static long privcmd_ioctl(struct file *file,
unsigned int cmd, unsigned long data)
{
- int ret = -ENOSYS;
+ int ret = -ENOTTY;
void __user *udata = (void __user *) data;
switch (cmd) {
@@ -572,7 +572,6 @@ static long privcmd_ioctl(struct file *file,
break;
default:
- ret = -EINVAL;
break;
}
--
2.1.4
[toc] | [next] | [standalone]
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
|---|---|
| Date | 2017-02-13 20:00 +0100 |
| Subject | Re: [PATCH v3 1/3] xen/privcmd: return -ENOTTY for unimplemented IOCTLs |
| Message-ID | <tau0V-7vg-1@gated-at.bofh.it> |
| In reply to | #1579945 |
On 02/13/2017 12:03 PM, Paul Durrant wrote: > The code sets the default return code to -ENOSYS but then overrides this > to -EINVAL in the switch() statement's default case, which is clearly > silly. > > This patch removes the override and sets the default return code to > -ENOTTY, which is the conventional return for an unimplemented ioctl. > > Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Applied to for-linus-4.11. -boris
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web