• Home
  • Raw
  • Download

Lines Matching refs:ret

18 	int ret;  in terminal_dup2()  local
20 ret = dup2(duplicate, original); in terminal_dup2()
21 if (ret < 0) in terminal_dup2()
44 int ret; in login_pty() local
48 ret = ioctl(fd, TIOCSCTTY, NULL); in login_pty()
49 if (ret < 0) in login_pty()
52 ret = terminal_set_stdfds(fd); in login_pty()
53 if (ret < 0) in login_pty()
64 int status, ret; in wait_for_pid() local
67 ret = waitpid(pid, &status, 0); in wait_for_pid()
68 if (ret == -1) { in wait_for_pid()
73 if (ret != pid) in wait_for_pid()
84 int ret; in resolve_procfd_symlink() local
87 ret = snprintf(procfd, 4096, "/proc/self/fd/%d", fd); in resolve_procfd_symlink()
88 if (ret < 0 || ret >= 4096) in resolve_procfd_symlink()
91 ret = readlink(procfd, buf, buflen); in resolve_procfd_symlink()
92 if (ret < 0 || (size_t)ret >= buflen) in resolve_procfd_symlink()
95 buf[ret] = '\0'; in resolve_procfd_symlink()
102 int ret; in do_tiocgptpeer() local
116 ret = unlockpt(master); in do_tiocgptpeer()
117 if (ret < 0) { in do_tiocgptpeer()
145 ret = login_pty(slave); in do_tiocgptpeer()
146 if (ret < 0) { in do_tiocgptpeer()
151 ret = resolve_procfd_symlink(STDIN_FILENO, buf, sizeof(buf)); in do_tiocgptpeer()
152 if (ret < 0) { in do_tiocgptpeer()
172 ret = wait_for_pid(pid); in do_tiocgptpeer()
173 if (ret < 0) in do_tiocgptpeer()
190 int ret = -1; in verify_non_standard_devpts_mount() local
194 ret = umount("/dev/pts"); in verify_non_standard_devpts_mount()
195 if (ret < 0) { in verify_non_standard_devpts_mount()
210 ret = mount("devpts", mntpoint, "devpts", MS_NOSUID | MS_NOEXEC, in verify_non_standard_devpts_mount()
212 if (ret < 0) { in verify_non_standard_devpts_mount()
220 ret = snprintf(ptmx, sizeof(ptmx), "%s/ptmx", devpts); in verify_non_standard_devpts_mount()
221 if (ret < 0 || (size_t)ret >= sizeof(ptmx)) { in verify_non_standard_devpts_mount()
226 ret = do_tiocgptpeer(ptmx, mntpoint); in verify_non_standard_devpts_mount()
228 if (ret < 0) in verify_non_standard_devpts_mount()
236 int ret; in verify_ptmx_bind_mount() local
238 ret = mount("/dev/pts/ptmx", "/dev/ptmx", NULL, MS_BIND, NULL); in verify_ptmx_bind_mount()
239 if (ret < 0) { in verify_ptmx_bind_mount()
245 ret = do_tiocgptpeer("/dev/ptmx", "/dev/pts/"); in verify_ptmx_bind_mount()
246 if (ret < 0) in verify_ptmx_bind_mount()
254 int ret; in verify_invalid_ptmx_bind_mount() local
265 ret = mount("/dev/pts/ptmx", ptmx, NULL, MS_BIND, NULL); in verify_invalid_ptmx_bind_mount()
267 if (ret < 0) { in verify_invalid_ptmx_bind_mount()
273 ret = do_tiocgptpeer(ptmx, "/dev/pts/"); in verify_invalid_ptmx_bind_mount()
274 if (ret == 0) in verify_invalid_ptmx_bind_mount()
282 int ret; in main() local
290 ret = unshare(CLONE_NEWNS); in main()
291 if (ret < 0) { in main()
296 ret = mount("", "/", NULL, MS_PRIVATE | MS_REC, 0); in main()
297 if (ret < 0) { in main()
303 ret = verify_ptmx_bind_mount(); in main()
304 if (ret < 0) in main()
307 ret = verify_invalid_ptmx_bind_mount(); in main()
308 if (ret < 0) in main()
311 ret = verify_non_standard_devpts_mount(); in main()
312 if (ret < 0) in main()