slave
static char slave[sizeof(((struct ptmget *)NULL)->sn)];
strlcpy(slave, _PATH_DEV, sizeof(slave));
strlcat(slave, master, sizeof(slave));
slave[sizeof(_PATH_DEV) - 1] = 't';
return slave;
int master, slave;
if (fdopenpty(ptmfd, &master, &slave, name, termp, winp) == -1)
(void) close(slave);
login_tty(slave);
(void) close(slave);
int master, slave;
slave = ptm.sfd;
*aslave = slave;
(void) tcsetattr(slave, TCSAFLUSH, termp);
(void) ioctl(slave, TIOCSWINSZ, winp);
int master, res, slave;
res = openpty(&master, &slave, NULL, NULL, NULL);
res = fcntl(slave, F_SETLKW, &fl);
res = fcntl(slave, F_SETLKW, &fl);
res = fcntl(slave, F_SETLKW, &fl);
close(slave);
ASSX(pty_check(kq, ev, 4, -massa, -slave, massa, slave) == 0);
ASSX(pty_check(kq, ev, 4, -massa, slave, -massa, slave) == 0);
read(slave, buf, 1);
ASSX(pty_check(kq, ev, 4, -massa, slave, massa, slave) == 0);
while (read(slave, buf, sizeof(buf)) > 0)
ASSX(pty_check(kq, ev, 4, -massa, -slave, massa, slave) == 0);
int kq, massa, n, slave;
if (openpty(&massa, &slave, NULL, NULL, NULL) == -1)
close(slave);
int fd, kq, massa, slave;
if (openpty(&massa, &slave, NULL, &tt, NULL) < 0)
if (fcntl(slave, F_SETFL, O_NONBLOCK) < 0)
EV_SET(&ev[2], slave, EVFILT_READ, EV_ADD|EV_ENABLE, 0, 0, NULL);
EV_SET(&ev[3], slave, EVFILT_WRITE, EV_ADD|EV_ENABLE, 0, 0, NULL);
ASSX(pty_check(kq, ev, 4, -massa, -slave, massa, slave) == 0);
ASSX(pty_check(kq, ev, 4, -massa, slave, massa, slave) == 0);
read(slave, buf, sizeof(buf));
int master, slave;
slave = open(ptsname(master), O_RDWR);
if (slave == -1) {
pty->slave = slave;
close(pty->slave);
if (ioctl(pty->slave, TIOCSCTTY, NULL) == -1) {
int slave;
static struct slave *slp;
struct slave *tslp;
int ch, fd, master = -1, slave, pty = 0, ldisc, nodaemon = 0;
if (openpty(&master, &slave, ptyn, NULL, NULL))
close(slave);
uint64_t mmap, uint slave)
*awrreg = mmap | slave;
struct ahd_softc *slave;
slave = ahd;
slave = list_ahd;
slave->flags &= ~AHD_BIOS_ENABLED;
slave->flags |=
struct ahc_softc *slave;
slave = ahc;
slave = list_ahc;
slave->flags &= ~AHC_BIOS_ENABLED;
slave->flags |=
slave->flags &= ~AHC_PRIMARY_CHANNEL;
slave->flags |=
bool slave = !!(ttm->page_flags & TTM_TT_FLAG_EXTERNAL);
if (slave && ttm->sg) {
bool slave = !!(ttm->page_flags & TTM_TT_FLAG_EXTERNAL);
if (slave)
int slave;
openpty(&master, &slave, NULL, NULL, &ws);
login_tty(slave);
if (openpty(&master, &slave, NULL, &tt, &win) == -1)
ioctl(slave, TIOCSWINSZ, &win);
if (ioctl(slave, TIOCGPGRP, &pgrp) != -1)
login_tty(slave);
int master, slave;