/src/lib/libc/gen/ |
closedir.c | 64 int fd; local in function:__weak_alias 72 fd = dirp->dd_fd; 84 return(close(fd));
|
daemon.c | 54 int fd; local in function:__weak_alias 71 if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { 72 (void)dup2(fd, STDIN_FILENO); 73 (void)dup2(fd, STDOUT_FILENO); 74 (void)dup2(fd, STDERR_FILENO); 75 if (fd > STDERR_FILENO) 76 (void)close(fd);
|
rewinddir.c | 58 int fd; local in function:__weak_alias 65 fd = dirp->dd_fd; 67 dirp->dd_seek = lseek(fd, (off_t)0, SEEK_SET); 68 _initdir(dirp, fd, NULL);
|
/src/lib/libc/stdio/ |
mkostemp.c | 33 int fd; local in function:mkostemp 35 return GETTEMP(path, &fd, 0, 0, oflags) ? fd : -1;
|
mkostemps.c | 33 int fd; local in function:mkostemps 35 return GETTEMP(path, &fd, 0, slen, oflags) ? fd : -1;
|
mkstemp.c | 51 int fd; local in function:__weak_alias 55 return GETTEMP(path, &fd, 0, 0, 0) ? fd : -1;
|
mkstemps.c | 35 int fd; local in function:mkstemps 37 return GETTEMP(path, &fd, 0, slen, 0) ? fd : -1;
|
/src/usr.sbin/sesd/srcs/ |
inienc.c | 47 int fd; local in function:main 50 fd = open(*v, O_RDWR); 51 if (fd < 0) { 55 if (ioctl(fd, SESIOC_INIT, NULL) < 0) { 58 (void) close(fd);
|
/src/tests/compat/linux/ |
h_inotify_init.c | 44 int fd; local in function:_start 47 RS(fd = syscall(LINUX_SYS_inotify_init)); 48 REQUIRE(fcntl(fd, LINUX_F_GETFD) == 0); 49 REQUIRE((fcntl(fd, LINUX_F_GETFL) & LINUX_O_NONBLOCK) == 0); 50 RS(close(fd)); 53 RS(fd = syscall(LINUX_SYS_inotify_init1, LINUX_IN_NONBLOCK)); 54 REQUIRE(fcntl(fd, LINUX_F_GETFD) == 0); 55 REQUIRE((fcntl(fd, LINUX_F_GETFL) & LINUX_O_NONBLOCK) != 0); 56 RS(close(fd)); 59 RS(fd = syscall(LINUX_SYS_inotify_init1, LINUX_IN_CLOEXEC)) [all...] |
/src/distrib/utils/libhack/ |
opendir.c | 61 int fd; variable in typeref:typename:int 64 if ((fd = open(name, O_RDONLY | O_NONBLOCK)) == -1) 66 if (fstat(fd, &sb) || !S_ISDIR(sb.st_mode)) { 68 close(fd); 71 if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1 || 73 close(fd); 86 close (fd); 93 dirp->dd_fd = fd;
|
/src/lib/libutil/compat/ |
compat_login.c | 62 int fd; variable in typeref:typename:int 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); 71 (void)write(fd, &ut, sizeof(ut)); 72 (void)close(fd); 74 if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) >= 0) { 75 (void)write(fd, &ut, sizeof(ut)); 76 (void)close(fd);
|
/src/lib/libutil/ |
login.c | 55 int fd; local in function:login 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); 63 (void)write(fd, ut, sizeof(struct utmp)); 64 (void)close(fd); 66 if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) >= 0) { 67 (void)write(fd, ut, sizeof(struct utmp)); 68 (void)close(fd);
|
logout.c | 56 int fd, rval; local in function:logout 61 if ((fd = open(_PATH_UTMP, O_RDWR, 0)) < 0) 64 while (read(fd, &ut, sizeof(ut)) == sizeof(ut)) { 71 (void)lseek(fd, -(off_t)sizeof(ut), SEEK_CUR); 72 (void)write(fd, &ut, sizeof(ut)); 75 (void)close(fd);
|
logwtmp.c | 58 int fd; local in function:logwtmp 64 if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) < 0) 66 if (fstat(fd, &buf) == 0) { 71 if (write(fd, &ut, sizeof(struct utmp)) != sizeof(struct utmp)) 72 (void) ftruncate(fd, buf.st_size); 74 (void) close(fd);
|
/src/regress/sys/kern/kqueue/vnode/ |
write.c | 45 int fd, n; local in function:main 51 fd = open(argv[1], O_WRONLY); 52 if (fd < 0) 55 lseek(fd, 0, SEEK_SET); 58 n = write(fd, buffer, sizeof(buffer)); 64 close(fd);
|
/src/sbin/nvmectl/ |
reset.c | 63 int ch, fd; local in function:reset 76 open_dev(argv[optind], &fd, 1, 1); 77 if (ioctl(fd, NVME_RESET_CONTROLLER) < 0)
|
/src/share/examples/pud/intro/ |
doioctl.c | 16 int fd, i; local in function:main 21 fd = open(argv[1], O_RDWR); 22 if (fd == -1) 28 if (ioctl(fd, INTROTOGGLE, &i) == -1) 31 if (ioctl(fd, INTROTOGGLE_R, &i) == -1)
|
/src/sys/arch/alpha/stand/common/ |
bootxx.c | 89 int fd; local in function:main 101 fd = open("boot", 0); 102 if (fd == -1 || (fstat(fd, &sb) == -1)) { 112 if (read(fd, (void*)SECONDARY_LOAD_ADDRESS, sb.st_size) != sb.st_size) {
|
/src/sys/arch/evbmips/stand/sbmips/common/ |
bootxx.c | 85 int fd; local in function:main 98 fd = open("boot", 0); 99 if (fd == -1 || (fstat(fd, &sb) == -1)) { 109 if (read(fd, (void*)SECONDARY_LOAD_ADDRESS, sb.st_size) != sb.st_size) {
|
/src/sys/arch/sbmips/stand/common/ |
bootxx.c | 85 int fd; local in function:main 98 fd = open("boot", 0); 99 if (fd == -1 || (fstat(fd, &sb) == -1)) { 109 if (read(fd, (void*)SECONDARY_LOAD_ADDRESS, sb.st_size) != sb.st_size) {
|
/src/sys/dev/microcode/ral/ |
build.c | 34 int fd; local in function:output 38 fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644); 39 if (fd == -1) 42 rlen = write(fd, ucode, size); 48 close(fd);
|
/src/sys/dev/microcode/rum/ |
build.c | 34 int fd; local in function:output 38 fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644); 39 if (fd == -1) 42 rlen = write(fd, ucode, size); 48 close(fd);
|
/src/sys/dev/microcode/run/ |
build.c | 34 int fd; local in function:output 38 fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644); 39 if (fd == -1) 42 rlen = write(fd, ucode, size); 48 close(fd);
|
/src/sys/dev/microcode/zyd/ |
build.c | 33 int fd; local in function:output 37 fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644); 38 if (fd == -1) 41 rlen = write(fd, ucode, size); 47 close(fd);
|
/src/sys/lib/libsa/ |
getfile.c | 40 int fd; local in function:getfile 48 } while ((fd = open(buf, mode)) < 0); 50 return fd;
|