| 593 | } |
| 594 | |
| 595 | static int |
| 596 | ptsdev_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) |
| 597 | { |
| 598 | struct tty *tp; |
| 599 | |
| 600 | kif->kf_type = KF_TYPE_PTS; |
| 601 | tp = fp->f_data; |
| 602 | kif->kf_un.kf_pts.kf_pts_dev = tty_udev(tp); |
| 603 | kif->kf_un.kf_pts.kf_pts_dev_freebsd11 = |
| 604 | kif->kf_un.kf_pts.kf_pts_dev; /* truncate */ |
| 605 | strlcpy(kif->kf_path, tty_devname(tp), sizeof(kif->kf_path)); |
| 606 | return (0); |
| 607 | } |
| 608 | |
| 609 | static struct fileops ptsdev_ops = { |
| 610 | .fo_read = ptsdev_read, |