MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ttydev_read

Function ttydev_read

freebsd/kern/tty.c:503–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503static int
504ttydev_read(struct cdev *dev, struct uio *uio, int ioflag)
505{
506 struct tty *tp = dev->si_drv1;
507 int error;
508
509 error = ttydev_enter(tp);
510 if (error)
511 goto done;
512 error = ttydisc_read(tp, uio, ioflag);
513 tty_unlock(tp);
514
515 /*
516 * The read() call should not throw an error when the device is
517 * being destroyed. Silently convert it to an EOF.
518 */
519done: if (error == ENXIO)
520 error = 0;
521 return (error);
522}
523
524static int
525ttydev_write(struct cdev *dev, struct uio *uio, int ioflag)

Callers

nothing calls this directly

Calls 2

ttydev_enterFunction · 0.85
ttydisc_readFunction · 0.85

Tested by

no test coverage detected