| 496 | } |
| 497 | |
| 498 | static int ttydev_read(struct lwp_tty *tp, struct uio *uio, int ioflag) |
| 499 | { |
| 500 | int error; |
| 501 | |
| 502 | error = ttydev_enter(tp); |
| 503 | if (error) |
| 504 | goto done; |
| 505 | error = ttydisc_read(tp, uio, ioflag); |
| 506 | tty_unlock(tp); |
| 507 | |
| 508 | /* |
| 509 | * The read() call should not throw an error when the device is |
| 510 | * being destroyed. Silently convert it to an EOF. |
| 511 | */ |
| 512 | done: |
| 513 | if (error == -ENXIO) |
| 514 | error = 0; |
| 515 | return error; |
| 516 | } |
| 517 | |
| 518 | static int ttydev_write(struct lwp_tty *tp, struct uio *uio, int ioflag) |
| 519 | { |
nothing calls this directly
no test coverage detected