]> git.baikalelectronics.ru Git - kernel.git/commit
virtio: console: replace EMFILE with EBUSY for already-open port
authorAmit Shah <amit.shah@redhat.com>
Mon, 15 Apr 2013 02:30:15 +0000 (12:00 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 15 Apr 2013 05:47:39 +0000 (15:17 +0930)
commit93233fb9eac4c0b248e949e7d710b11af7b2a440
treed3a4222a562e7ee16b5ac053461fb5132a3b63f6
parentfa059520815f44e286a87c41119d6fdef20f4d69
virtio: console: replace EMFILE with EBUSY for already-open port

Returning EMFILE (process has too many open files) is incorrect to
indicate a port is already open by another process.  Use EBUSY for that.

This does change what we report to userspace, but I believe userspace
can look at it this way: it gets EBUSY, a new error code, instead of
EMFILE.  It's still an error, and that's not changing.

Reported-by: Mateusz Guzik <mguzik@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c