Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/tty_pts.c
Show First 20 Lines • Show All 586 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
ptsdev_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) | ptsdev_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) | ||||
{ | { | ||||
struct tty *tp; | struct tty *tp; | ||||
kif->kf_type = KF_TYPE_PTS; | kif->kf_type = KF_TYPE_PTS; | ||||
tp = fp->f_data; | tp = fp->f_data; | ||||
kif->kf_un.kf_pts.kf_pts_dev = tty_udev(tp); | kif->kf_un.kf_pts.kf_pts_dev = tty_udev(tp); | ||||
kif->kf_un.kf_pts.kf_pts_dev_freebsd11 = | |||||
kif->kf_un.kf_pts.kf_pts_dev; /* truncate */ | |||||
strlcpy(kif->kf_path, tty_devname(tp), sizeof(kif->kf_path)); | strlcpy(kif->kf_path, tty_devname(tp), sizeof(kif->kf_path)); | ||||
return (0); | return (0); | ||||
} | } | ||||
static struct fileops ptsdev_ops = { | static struct fileops ptsdev_ops = { | ||||
.fo_read = ptsdev_read, | .fo_read = ptsdev_read, | ||||
.fo_write = ptsdev_write, | .fo_write = ptsdev_write, | ||||
.fo_truncate = invfo_truncate, | .fo_truncate = invfo_truncate, | ||||
▲ Show 20 Lines • Show All 265 Lines • Show Last 20 Lines |