| /src/sys/dev/sun/ | 
| kbd_ms_ttyvar.h | 45  * driver as a `tty' device (line discipline). 48 struct tty;
 54 	struct tty *kmta_tp;	/* tty to take over */
 
 | 
| /src/lib/libcompat/4.1/ | 
| gtty.c | 47  * Get tty modes. 49  *	#define	gtty(fd, tty)	ioctl(fd, TIOCGETP, tty)
 52 gtty(fd, tty)
 54 	struct sgttyb *tty;
 58 	_DIAGASSERT(tty != 0);
 60 	return (ioctl(fd, TIOCGETP, tty));
 
 | 
| stty.c | 47  * Set tty modes. 49  *	#define	stty(fd, tty)	ioctl(fd, TIOCSETP, tty)
 52 stty(fd, tty)
 54 	struct sgttyb *tty;
 58 	_DIAGASSERT(tty != 0);
 60 	return (ioctl(fd, TIOCSETP, tty));
 
 | 
| /src/usr.bin/tty/ | 
| Makefile | 4 PROG=	tty 
 | 
| /src/sys/sys/ | 
| tty.h | 1 /*	$NetBSD: tty.h,v 1.104 2023/04/12 06:35:26 riastradh Exp $	*/ 62  *	@(#)tty.h	8.7 (Berkeley) 1/9/95
 94 /* tty signal types */
 103  * Per-tty structure.
 105  * Should be split in two, into device and tty drivers.
 109 struct tty {  struct
 110 	TAILQ_ENTRY(tty) tty_link;	/* Link in global tty list. */
 128 	int	t_flags;		/* Tty flags. */
 129 	int	t_qsize;		/* Tty character queue size *
 [all...]
 | 
| conf.h | 53 struct tty; 96 	void		(*d_stop)(struct tty *, int);
 97 	struct tty *	(*d_tty)(dev_t);
 126 typedef void dev_stop_t(struct tty *, int);  typedef in typeref:typename:void dev_stop_t (struct *,int)
 127 typedef struct tty *dev_tty_t(dev_t);
 155 int ttyenodev(struct tty *, ...);
 156 void ttyvenodev(struct tty *, ...);
 157 void ttyvnullop(struct tty *, ...);
 233 	int	(*l_open)	(dev_t, struct tty *);
 234 	int	(*l_close)	(struct tty *, int)
 [all...]
 | 
| /src/etc/etc.sun2/ | 
| ttyaction | 4 # tty	action	command... 5 kd	*	chown ${USER}:tty /dev/kbd /dev/mouse /dev/fb
 
 | 
| /src/etc/etc.sun3/ | 
| ttyaction | 4 # tty	action	command... 5 kd	*	chown ${USER}:tty /dev/kbd /dev/mouse /dev/fb
 
 | 
| /src/distrib/utils/more/ | 
| ttyin.c | 51 static int tty;  variable in typeref:typename:int 60 	tty = 2;
 74 		result = iread(tty, &c, 1);
 
 | 
| /src/usr.bin/mesg/ | 
| mesg.c | 65 	char *tty;  local in function:main 79 	if ((tty = ttyname(STDIN_FILENO)) == NULL &&
 80 	    (tty = ttyname(STDOUT_FILENO)) == NULL &&
 81 	    (tty = ttyname(STDERR_FILENO)) == NULL)
 83 	if (stat(tty, &sb) == -1)
 84 		err(2, "%s", tty);
 97 		if (chmod(tty, sb.st_mode | S_IWGRP) == -1)
 98 			err(2, "%s", tty);
 101 		if (chmod(tty, sb.st_mode & ~S_IWGRP) == -1)
 102 			err(2, "%s", tty);
 [all...]
 | 
| /src/sys/compat/sys/ | 
| ttycom.h | 42 struct tty; 61 int compat_60_ttioctl(struct tty *, u_long, void *, int, struct lwp *);
 69 int compat_43_ttioctl(struct tty *, u_long, void *, int, struct lwp *);
 
 | 
| /src/lib/libpam/modules/pam_securetty/ | 
| pam_securetty.c | 68 	const void *tty;  local in function:pam_sm_acct_mgmt 88 	pam_err = pam_get_item(pamh, PAM_TTY, &tty);
 92 	PAM_LOG("Got TTY: %s", (const char *)tty);
 95 	if (tty != NULL && strncmp(TTY_PREFIX, tty, sizeof(TTY_PREFIX)) == 0) {
 97 		tty = (const char *)tty + sizeof(TTY_PREFIX) - 1;
 100 	if (tty != NULL && (ty = getttynam(tty)) != NULL &
 [all...]
 | 
| /src/sbin/slattach/ | 
| slattach.c | 81 	struct termios tty;  local in function:main 129 	tty.c_cflag = CREAD | CS8 | cflag;
 130 	tty.c_iflag = 0;
 131 	tty.c_lflag = 0;
 132 	tty.c_oflag = 0;
 133 	tty.c_cc[VMIN] = 1;
 134 	tty.c_cc[VTIME] = 0;
 135 	cfsetspeed(&tty, speed);
 136 	if (tcsetattr(fd, TCSADRAIN, &tty) < 0)
 
 | 
| /src/lib/libpam/modules/pam_lastlog/ | 
| pam_lastlog.c | 119 	const char *user, *rhost, *tty, *nuser;  local in function:pam_sm_open_session 152 	tty = (const char *)vtty;
 154 	if (tty == NULL) {
 164 	if (strncmp(tty, _PATH_DEV, strlen(_PATH_DEV)) == 0)
 165 		tty = tty + strlen(_PATH_DEV);
 167 	if (*tty == '\0') {
 188 		doutmpx(user, rhost, tty, ss, &now);
 189 		dolastlogx(pamh, quiet, pwd, rhost, tty, ss, &now);
 193 		doutmp(user, rhost, tty, &now)
 208  const char *tty, *nuser;  local in function:pam_sm_close_session
 [all...]
 | 
| /src/lib/libc/gen/ | 
| getttyent.c | 69 getttynam(const char *tty) 73 	_DIAGASSERT(tty != NULL);
 77 		if (!strcmp(tty, t->ty_name))
 86 	static struct ttyent tty;  local in function:getttyent
 114 	tty.ty_name = p;
 116 	if (*(tty.ty_getty = p) == '\0')
 117 		tty.ty_getty = tty.ty_type = NULL;
 120 		if (*(tty.ty_type = p) == '\0')
 121 			tty.ty_type = NULL
 [all...]
 | 
| /src/lib/libutil/compat/ | 
| compat_login.c | 63 	int tty;  variable in typeref:typename:int 68 	tty = ttyslot();
 69 	if (tty > 0 && (fd = open(_PATH_UTMP, O_WRONLY|O_CREAT, 0644)) >= 0) {
 70 		(void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
 
 | 
| /src/lib/libutil/ | 
| login.c | 56 	int tty;  local in function:login 60 	tty = ttyslot();
 61 	if (tty > 0 && (fd = open(_PATH_UTMP, O_WRONLY|O_CREAT, 0644)) >= 0) {
 62 		(void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
 
 | 
| pidlock.c | 182 checktty(const char *tty) 188 	(void)strlcat(ttyfile, tty, sizeof(ttyfile));
 190 	/* make sure the tty exists */
 203 makelock(char *buf, size_t bufsiz, const char *tty)
 206 	(void)strlcat(buf, tty, bufsiz);
 212 ttylock(const char *tty, int flags, pid_t *locker)
 216 	_DIAGASSERT(tty != NULL);
 218 	if (checktty(tty) != 0)
 222 	return pidlock(makelock(lockfile, sizeof(lockfile), tty),
 227 ttyunlock(const char *tty)
 [all...]
 | 
| /src/tests/kernel/tty/ | 
| Makefile | 5 TESTSDIR=	${TESTSBASE}/kernel/tty 
 | 
| /src/usr.sbin/sti/ | 
| sti.c | 148 	const char *tty;  local in function:main 155 		(void)fprintf(stderr, "Usage: %s <tty> [arg ...]\n",
 163 	tty = *argv++;
 166 	if (strncmp(tty, "/dev/", 5) == 0)
 167 		(void)snprintf(ttydev, sizeof(ttydev), "%s", tty);
 168 	else if (strncmp(tty, "tty", 3) == 0 || strncmp(tty, "pty", 3) == 0 ||
 169 	    strncmp(tty, "pts/", 4) == 0)
 170 		(void)snprintf(ttydev, sizeof(ttydev), "/dev/%s", tty);
 [all...]
 | 
| /src/usr.sbin/irdaattach/ | 
| irdaattach.c | 57 	struct termios tty;  local in function:main 112 	tty.c_cflag = CREAD | CS8 | cflag;
 113 	tty.c_iflag = 0;
 114 	tty.c_lflag = 0;
 115 	tty.c_oflag = 0;
 116 	tty.c_cc[VMIN] = 1;
 117 	tty.c_cc[VTIME] = 0;
 118 	cfsetspeed(&tty, 9600);
 119 	if (tcsetattr(fd, TCSADRAIN, &tty) < 0)
 
 | 
| /src/lib/libpam/modules/pam_login_access/ | 
| pam_login_access.c | 64 	const void *rhost, *tty, *user;  local in function:pam_sm_acct_mgmt 81 	pam_err = pam_get_item(pamh, PAM_TTY, &tty);
 88 		PAM_LOG("Checking login.access for user %s on tty %s",
 89 		    (const char *)user, (const char *)tty);
 90 		if (login_access(user, tty) != 0)
 93 		    (const char *)user, (const char *)tty);
 
 | 
| /src/libexec/utmp_update/ | 
| utmp_update.c | 83 	char tty[MAXPATHLEN];  local in function:main 136 	(void)snprintf(tty, sizeof(tty), "%s%s", _PATH_DEV, utx->ut_line);
 137 	fd = open(tty, O_RDONLY|O_NONBLOCK, 0);
 140 			logerr(errno, "Cannot stat `%s'", tty);
 142 			logerr(0, "%s: Is not owned by you", tty);
 144 			logerr(0, "%s: Not a tty device", tty);
 146 		if (access(tty, W_OK|R_OK) == -1)
 147 			logerr(errno, "Can't access `%s'", tty);
 [all...]
 | 
| /src/usr.bin/resize/ | 
| resize.c | 178 static int tty;  variable in typeref:typename:int 210     (void) ioctl(tty, TCSETAW, &tioorig);
 212     (void) tcsetattr(tty, TCSADRAIN, &tioorig);
 214     (void) ioctl(tty, TIOCSETP, &sgorig);
 419 	name_of_tty = x_strdup("/dev/tty");
 426     tty = fileno(ttyfp);
 452     rc = ioctl(tty, TCGETA, &tioorig);
 460     rc = tcgetattr(tty, &tioorig);
 468     rc = ioctl(tty, TIOCGETP, &sgorig);
 474 	failed("get tty settings")
 [all...]
 | 
| /src/sys/arch/sparc64/dev/ | 
| cons.h | 39 	struct tty *of_tty; 
 |