Lines Matching refs:fdm
64 int fdm;
67 if ((fdm = open("/dev/ptm", O_RDWR)) == -1) {
73 REQUIRE_ERRNO(fstat(fdm, &stm), -1);
75 REQUIRE_ERRNO(ioctl(fdm, TIOCPTMGET, &ptm), -1);
103 (void)close(fdm);
129 int fdm, fds;
132 if ((fdm = posix_openpt(O_RDWR|O_NOCTTY)) == -1) {
139 REQUIRE_ERRNO(fstat(fdm, &stm), -1);
148 REQUIRE_ERRNO(grantpt(fdm), -1);
149 REQUIRE_ERRNO(unlockpt(fdm), -1);
150 REQUIRE_ERRNO((pty = ptsname(fdm)), NULL);
178 int fdm;
180 if ((fdm = posix_openpt(O_RDWR|O_NOCTTY|O_NONBLOCK|O_CLOEXEC)) == -1) {
188 ATF_CHECK_EQ(O_RDWR|O_NONBLOCK, fcntl(fdm, F_GETFL));
189 ATF_CHECK_EQ(FD_CLOEXEC, fcntl(fdm, F_GETFD));