| 572 | } |
| 573 | |
| 574 | static int |
| 575 | ptsdev_close(struct file *fp, struct thread *td) |
| 576 | { |
| 577 | struct tty *tp = fp->f_data; |
| 578 | |
| 579 | /* Deallocate TTY device. */ |
| 580 | tty_lock(tp); |
| 581 | tty_rel_gone(tp); |
| 582 | |
| 583 | /* |
| 584 | * Open of /dev/ptmx or /dev/ptyXX changes the type of file |
| 585 | * from DTYPE_VNODE to DTYPE_PTS. vn_open() increases vnode |
| 586 | * use count, we need to decrement it, and possibly do other |
| 587 | * required cleanup. |
| 588 | */ |
| 589 | if (fp->f_vnode != NULL) |
| 590 | return (vnops.fo_close(fp, td)); |
| 591 | |
| 592 | return (0); |
| 593 | } |
| 594 | |
| 595 | static int |
| 596 | ptsdev_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) |
nothing calls this directly
no test coverage detected