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

Function tty_to_xtty

freebsd/kern/tty.c:1286–1305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1284 */
1285
1286static void
1287tty_to_xtty(struct tty *tp, struct xtty *xt)
1288{
1289
1290 tty_assert_locked(tp);
1291
1292 xt->xt_size = sizeof(struct xtty);
1293 xt->xt_insize = ttyinq_getsize(&tp->t_inq);
1294 xt->xt_incc = ttyinq_bytescanonicalized(&tp->t_inq);
1295 xt->xt_inlc = ttyinq_bytesline(&tp->t_inq);
1296 xt->xt_inlow = tp->t_inlow;
1297 xt->xt_outsize = ttyoutq_getsize(&tp->t_outq);
1298 xt->xt_outcc = ttyoutq_bytesused(&tp->t_outq);
1299 xt->xt_outlow = tp->t_outlow;
1300 xt->xt_column = tp->t_column;
1301 xt->xt_pgid = tp->t_pgrp ? tp->t_pgrp->pg_id : 0;
1302 xt->xt_sid = tp->t_session ? tp->t_session->s_sid : 0;
1303 xt->xt_flags = tp->t_flags;
1304 xt->xt_dev = tp->t_dev ? dev2udev(tp->t_dev) : (uint32_t)NODEV;
1305}
1306
1307static int
1308sysctl_kern_ttys(SYSCTL_HANDLER_ARGS)

Callers 1

sysctl_kern_ttysFunction · 0.85

Calls 5

ttyinq_getsizeFunction · 0.85
ttyinq_byteslineFunction · 0.85
ttyoutq_getsizeFunction · 0.85
ttyoutq_bytesusedFunction · 0.85

Tested by

no test coverage detected