| /src/lib/libutil/ |
| login.c | 56 int tty; local 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);
|
| /src/usr.bin/mesg/ |
| mesg.c | 65 char *tty; local 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/distrib/utils/more/ |
| ttyin.c | 51 static int tty; variable 60 tty = 2; 74 result = iread(tty, &c, 1);
|
| /src/lib/libutil/compat/ |
| compat_login.c | 63 int tty; local 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/external/mit/libuv/dist/docs/code/tty/ |
| main.c | 7 uv_tty_t tty; variable 16 uv_tty_init(loop, &tty, STDOUT_FILENO, 0); 17 uv_tty_set_mode(&tty, UV_TTY_MODE_NORMAL); 22 uv_write(&req1, (uv_stream_t*) &tty, &buf1, 1, NULL); 25 buf.base = "Hello TTY\n"; 27 uv_write(&req, (uv_stream_t*) &tty, &buf, 1, NULL);
|
| /src/lib/libpam/modules/pam_login_access/ |
| pam_login_access.c | 64 const void *rhost, *tty, *user; local 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/usr.bin/talk/ |
| init_disp.c | 106 struct termios tty; local 108 tcgetattr(0, &tty); 109 my_win.cerase = tty.c_cc[VERASE]; 110 my_win.kill = tty.c_cc[VKILL]; 111 if (tty.c_cc[VWERASE] == (unsigned char) -1) 114 my_win.werase = tty.c_cc[VWERASE];
|
| /src/lib/libpam/modules/pam_securetty/ |
| pam_securetty.c | 68 const void *tty; local 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 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/usr.sbin/irdaattach/ |
| irdaattach.c | 57 struct termios tty; local 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/usr.sbin/sti/ |
| sti.c | 148 const char *tty; local 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/external/bsd/openpam/dist/bin/su/ |
| su.c | 74 const char *user, *tty; local 109 tty = ttyname(STDERR_FILENO); 110 if ((pam_err = pam_set_item(pamh, PAM_TTY, tty)) != PAM_SUCCESS)
|
| /src/external/mit/libuv/dist/docs/code/tty-gravity/ |
| main.c | 7 uv_tty_t tty; variable 12 char *message = " Hello TTY "; 23 uv_write(&write_req, (uv_stream_t*) &tty, &buf, 1, NULL); 35 uv_tty_init(loop, &tty, STDOUT_FILENO, 0); 36 uv_tty_set_mode(&tty, 0); 38 if (uv_tty_get_winsize(&tty, &width, &height)) { 39 fprintf(stderr, "Could not get TTY information\n");
|
| /src/external/mit/libuv/dist/test/ |
| test-handle-fileno.c | 27 /* Make sure we have an FD that refers to a tty */ 41 return open("/dev/tty", O_RDONLY, 0); 54 uv_tty_t tty; local 105 fprintf(stderr, "Cannot open a TTY fd"); 108 r = uv_tty_init(loop, &tty, tty_fd, 0); 110 ASSERT(uv_is_readable((uv_stream_t*) &tty)); 111 ASSERT(!uv_is_writable((uv_stream_t*) &tty)); 112 r = uv_fileno((uv_handle_t*) &tty, &fd); 114 uv_close((uv_handle_t*) &tty, NULL); 115 r = uv_fileno((uv_handle_t*) &tty, &fd) [all...] |
| test-osx-select.c | 55 uv_tty_t tty; local 57 fd = open("/dev/tty", O_RDONLY); 59 fprintf(stderr, "Cannot open /dev/tty as read-only: %s\n", strerror(errno)); 64 r = uv_tty_init(uv_default_loop(), &tty, fd, 1); 67 uv_read_start((uv_stream_t*) &tty, alloc_cb, read_cb); 94 uv_tty_t tty; local 110 fd = open("/dev/tty", O_RDONLY); 112 fprintf(stderr, "Cannot open /dev/tty as read-only: %s\n", strerror(errno)); 117 r = uv_tty_init(uv_default_loop(), &tty, fd, 1); 120 r = uv_read_start((uv_stream_t*) &tty, alloc_cb, read_cb) [all...] |
| test-tty.c | 44 TEST_IMPL(tty) { 50 /* Make sure we have an FD that refers to a tty */ 74 ttyin_fd = open("/dev/tty", O_RDONLY, 0); 76 fprintf(stderr, "Cannot open /dev/tty as read-only: %s\n", strerror(errno)); 81 ttyout_fd = open("/dev/tty", O_WRONLY, 0); 83 fprintf(stderr, "Cannot open /dev/tty as write-only: %s\n", strerror(errno)); 174 /* Make sure we have an FD that refers to a tty */ 226 /* Make sure we have an FD that refers to a tty */ 272 /* Make sure we have an FD that refers to a tty */ 316 /* Make sure we have an FD that refers to a tty */ 348 uv_tty_t tty; local [all...] |
| /src/usr.bin/rwall/ |
| rwall.c | 161 const char *tty; local 185 tty = ttyname(STDERR_FILENO); 186 if (tty == NULL) 187 tty = "??"; 188 (void)fprintf(fp, " (%s) at %d:%02d ...\n", tty, lt->tm_hour,
|
| /src/crypto/external/bsd/heimdal/dist/lib/hcrypto/ |
| ui.c | 114 FILE *tty; local 134 if((tty = fopen("/dev/tty", "r")) != NULL) 135 rk_cloexec_file(tty); 137 tty = stdin; 143 tcgetattr(fileno(tty), &t_old); 146 tcsetattr(fileno(tty), TCSANOW, &t_new); 151 c = getc(tty); 153 if(!ferror(tty)) 169 tcsetattr(fileno(tty), TCSANOW, &t_old) [all...] |
| /src/external/bsd/less/dist/ |
| ttyin.c | 29 public HANDLE tty; variable 31 public int tty; variable 44 /* The __open() system call translates "/dev/tty" to "con". */ 52 * Open the tty device. 53 * Try ttyname(), then try /dev/tty, then use file descriptor 2. 73 fd = open_tty_device("/dev/tty"); 91 tty = CreateFile("CONIN$", GENERIC_READ | GENERIC_WRITE, 94 GetConsoleMode(tty, &console_mode); 96 SetConsoleMode(tty, ENABLE_PROCESSED_INPUT | ENABLE_MOUSE_INPUT); 106 tty = open("CON", OPEN_READ) [all...] |
| /src/external/bsd/tmux/usr.bin/tmux/ |
| utempter.c | 60 doutmpx(const char *username, const char *hostname, const char *tty, 71 (void)strncpy(ut.ut_line, tty, sizeof(ut.ut_line)); 74 t = tty + strlen(tty); 75 if ((size_t)(t - tty) >= sizeof(ut.ut_id)) 76 tty = t - sizeof(ut.ut_id); 77 (void)strncpy(ut.ut_id, tty, sizeof(ut.ut_id)); 82 login_utmpx(const char *username, const char *hostname, const char *tty, 85 doutmpx(username, hostname, tty, now, USER_PROCESS, getpid()); 89 logout_utmpx(const char *username, const char *tty, const struct timeval *now 123 char tty[128], *ttyp; local 147 char tty[128], *ttyp; local [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 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/libexec/utmp_update/ |
| utmp_update.c | 83 char tty[MAXPATHLEN]; local 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/finger/ |
| finger.h | 62 short writable; /* tty is writable */ 65 char *tty; /* tty line */ member in struct:where
|
| /src/external/gpl2/xcvs/dist/lib/ |
| getpass.c | 90 FILE *tty; local 101 tty = fopen ("/dev/tty", "w+"); 102 if (tty == NULL) 110 __fsetlocking (tty, FSETLOCKING_BYCALLER); 112 out = in = tty; 171 call_fclose (tty);
|
| /src/lib/libpam/modules/pam_lastlog/ |
| pam_lastlog.c | 119 const char *user, *rhost, *tty, *nuser; local 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 [all...] |