projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1d6207
)
block/swim: Don't log an error message for an invalid ioctl
author
Finn Thain
<
[email protected]
>
Thu, 12 Apr 2018 00:50:14 +0000
(20:50 -0400)
committer
Jens Axboe
<
[email protected]
>
Tue, 17 Apr 2018 03:49:35 +0000
(21:49 -0600)
The 'eject' shell command may send various different ioctl commands.
This leads to error messages on the console even though the FDEJECT
ioctl succeeds.
~# eject floppy
SWIM floppy_ioctl: unknown cmd 21257
SWIM floppy_ioctl: unknown cmd 1
Don't log an error message for an invalid ioctl, just do as the
swim3 driver does and return -ENOTTY.
Cc: Laurent Vivier <
[email protected]
>
Cc: Jens Axboe <
[email protected]
>
Cc:
[email protected]
# v4.14+
Tested-by: Stan Johnson <
[email protected]
>
Signed-off-by: Finn Thain <
[email protected]
>
Acked-by: Laurent Vivier <
[email protected]
>
Reviewed-by: Geert Uytterhoeven <
[email protected]
>
Signed-off-by: Jens Axboe <
[email protected]
>
drivers/block/swim.c
patch
|
blob
|
history
diff --git
a/drivers/block/swim.c
b/drivers/block/swim.c
index 0258a96e0c46ef52bb1295db11972b3e7c9e5597..7b847170cf7181388e799deb17ae2aabda0b2d69 100644
(file)
--- a/
drivers/block/swim.c
+++ b/
drivers/block/swim.c
@@
-727,14
+727,9
@@
static int floppy_ioctl(struct block_device *bdev, fmode_t mode,
if (copy_to_user((void __user *) param, (void *) &floppy_type,
sizeof(struct floppy_struct)))
return -EFAULT;
- break;
-
- default:
- printk(KERN_DEBUG "SWIM floppy_ioctl: unknown cmd %d\n",
- cmd);
- return -ENOSYS;
+ return 0;
}
- return
0
;
+ return
-ENOTTY
;
}
static int floppy_getgeo(struct block_device *bdev, struct hd_geometry *geo)