/openbsd-current/lib/libc/gen/ |
H A D | opendir.c | 50 int fd; local 52 if ((fd = open(name, O_RDONLY | O_DIRECTORY | O_CLOEXEC)) == -1) 54 dirp = __fdopendir(fd); 56 close(fd); 65 fdopendir(int fd) argument 70 if ((flags = fcntl(fd, F_GETFL)) == -1) 76 dirp = __fdopendir(fd); 79 dirp->dd_bufpos = dirp->dd_curpos = lseek(fd, 0, SEEK_CUR); 85 (void)fcntl(fd, F_SETFD, FD_CLOEXEC); 92 __fdopendir(int fd) argument [all...] |
/openbsd-current/gnu/usr.bin/gcc/gcc/java/ |
H A D | win32-host.c | 53 WIN32_FIND_DATA fd; local 56 found_file_handle = FindFirstFile (filename, &fd); 61 found_file_len = strlen (fd.cFileName); 73 if (strcmp (filename + filename_len - found_file_len, fd.cFileName)) 76 /* printf("************\nRejected:\n%s\n%s\n************\n\n", filename, fd.cFileName); */
|
/openbsd-current/gnu/usr.bin/gcc/gcc/testsuite/gcc.c-torture/execute/ |
H A D | 950221-1.c | 3 long fd; member in struct:parsefile 36 if (parsefile->fd == 0L && el) 46 i = g2 (parsefile->fd); 53 parsefile->fd = 0xdeadbeefL;
|
/openbsd-current/lib/libc/termios/ |
H A D | tcsetattr.c | 36 tcsetattr(int fd, int opt, const struct termios *t) argument 47 return (ioctl(fd, TIOCSETA, t)); 49 return (ioctl(fd, TIOCSETAW, t)); 51 return (ioctl(fd, TIOCSETAF, t));
|
/openbsd-current/gnu/usr.bin/perl/vos/ |
H A D | vos.c | 29 int fd = open(path,O_WRONLY); local 31 if (fd >= 0) { 32 code = ftruncate(fd,len); 33 close(fd);
|
/openbsd-current/sbin/isakmpd/sysdep/openbsd/ |
H A D | sysdep.c | 48 sysdep_cleartext(int fd, int af) argument 101 if (monitor_setsockopt(fd, optsw[sw].ip_proto, optsw[sw].auth_level, 104 "setsockopt (%d, %d, IP_AUTH_LEVEL, ...) failed", fd, 108 if (monitor_setsockopt(fd, optsw[sw].ip_proto, optsw[sw].esp_trans_level, 111 "setsockopt (%d, %d, IP_ESP_TRANS_LEVEL, ...) failed", fd, 115 if (monitor_setsockopt(fd, optsw[sw].ip_proto, optsw[sw].esp_network_level, 118 "setsockopt (%d, %d, IP_ESP_NETWORK_LEVEL, ...) failed", fd, 123 monitor_setsockopt(fd, optsw[sw].ip_proto, optsw[sw].ipcomp_level, 127 "setsockopt (%d, %d, IP_IPCOMP_LEVEL, ...) failed,", fd,
|
/openbsd-current/regress/lib/libpthread/socket/2a/ |
H A D | socket2a.c | 64 int fd; local 72 CHECKe(fd = socket(AF_INET, SOCK_STREAM, 0)); 76 CHECKe(connect(fd, (struct sockaddr *) &a_sout, sizeof(a_sout))); 77 CHECKe(close(fd)); 79 CHECKe(fd = socket(AF_INET, SOCK_STREAM, 0)); 83 CHECKe(connect(fd, (struct sockaddr *) &a_sout, sizeof(a_sout))); 87 CHECKe(read(fd, buf, 1024)); 88 CHECKe(write(fd, MESSAGE6, sizeof(MESSAGE6))); 92 CHECKe(close(fd));
|
/openbsd-current/regress/sys/kern/rlimit-file/ |
H A D | rlim-file.c | 17 int lim, fd, fds[2]; local 25 fd = -1; 26 while (fd < lim - 2) 27 if ((fd = open("/dev/null", O_RDONLY)) < 0)
|
/openbsd-current/regress/sys/uvm/mmap_write_self/ |
H A D | mmap_write_self.c | 37 int fd; local 41 if ((fd = mkstemp(name)) == -1) 47 buf = mmap(NULL, ps, PROT_READ, MAP_FILE|MAP_SHARED, fd, 0); 51 if (pwrite(fd, buf, ps, 0) == ps)
|
/openbsd-current/usr.bin/sendbug/ |
H A D | atomicio.c | 39 atomicio(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n) argument 46 pfd.fd = fd; 49 res = (f) (fd, s + pos, n - pos);
|
/openbsd-current/sys/lib/libsa/ |
H A D | close.c | 69 close(int fd) argument 71 oclose(int fd) 74 struct open_file *f = &files[fd]; 77 if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
|
H A D | lseek.c | 68 lseek(int fd, off_t offset, int where) argument 70 olseek(int fd, off_t offset, int where) 73 struct open_file *f = &files[fd]; 75 if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
|
/openbsd-current/sys/dev/microcode/tusb3410/ |
H A D | build.c | 32 int fd; local 35 fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644); 36 if (fd == -1) 39 rlen = write(fd, uticom_fw_3410, sizeof uticom_fw_3410);
|
/openbsd-current/usr.sbin/rpc.lockd/ |
H A D | handles.c | 47 * need to find fd corresponding to <inode, device> 52 int fd; /* The file descriptor itself */ member in struct:fdinfo 53 int ref_count; /* Count of hosts using the fd - fd is */
|
/openbsd-current/regress/sys/kern/unveil-unmount/ |
H A D | unveil-unlink.c | 27 int fd; local 37 fd = open(path, O_WRONLY|O_CREAT, 0755); 38 if (fd == -1) 40 close(fd);
|
/openbsd-current/usr.bin/rsync/ |
H A D | client.c | 37 rsync_client(const struct opts *opts, int fd, const struct fargs *f) argument 52 if (!io_write_int(&sess, fd, sess.lver)) { 55 } else if (!io_read_int(&sess, fd, &sess.rver)) { 58 } else if (!io_read_int(&sess, fd, &sess.seed)) { 83 if (!rsync_sender(&sess, fd, fd, f->sourcesz, 91 if (!rsync_receiver(&sess, fd, fd, f->sink)) { 99 if (io_read_check(&sess, fd))
|
/openbsd-current/usr.bin/rdist/ |
H A D | isexec.c | 46 int fd, r; local 55 if ((fd = open(file, O_RDONLY)) == -1) 58 r = read(fd, &hdr, sizeof(hdr)) == sizeof(hdr) && 60 close(fd);
|
/openbsd-current/gnu/llvm/lldb/tools/lldb-vscode/ |
H A D | OutputRedirector.h | 24 llvm::Error RedirectFd(int fd, std::function<void(llvm::StringRef)> callback);
|
/openbsd-current/regress/lib/libc/sys/ |
H A D | t_truncate.c | 58 int fd; local 60 fd = open(path, O_RDWR | O_CREAT, 0600); 61 ATF_REQUIRE(fd >= 0); 67 ATF_REQUIRE(ftruncate(fd, sizes[i]) == 0); 68 ATF_REQUIRE(fstat(fd, &st) == 0); 76 (void)close(fd); 94 int fd; local 96 fd = open("/etc/passwd", O_RDONLY); 97 ATF_REQUIRE(fd >= 0); 103 ATF_REQUIRE_ERRNO(EINVAL, ftruncate(fd, 99 118 int fd; local [all...] |
/openbsd-current/lib/libfido2/src/ |
H A D | hid_unix.c | 23 int fd; local 26 if ((fd = open(path, O_RDWR)) == -1) { 32 if (fstat(fd, &st) == -1) { 34 if (close(fd) == -1) 41 if (close(fd) == -1) 46 return (fd); 50 fido_hid_unix_wait(int fd, int ms, const fido_sigset_t *sigmask) argument 58 pfd.fd = fd;
|
/openbsd-current/gnu/llvm/lldb/source/Host/common/ |
H A D | FileAction.cpp | 34 bool FileAction::Open(int fd, const FileSpec &file_spec, bool read, argument 36 if ((read || write) && fd >= 0 && file_spec) { 38 m_fd = fd; 53 bool FileAction::Close(int fd) { argument 55 if (fd >= 0) { 57 m_fd = fd; 62 bool FileAction::Duplicate(int fd, int dup_fd) { argument 64 if (fd >= 0 && dup_fd >= 0) { 66 m_fd = fd; 76 stream.Printf("close fd [all...] |
H A D | FileCache.cpp | 38 lldb::user_id_t fd = file.get()->GetDescriptor(); local 39 m_cache[fd] = std::move(file.get()); 40 return fd; 43 bool FileCache::CloseFile(lldb::user_id_t fd, Status &error) { argument 44 if (fd == UINT64_MAX) { 48 FDToFileMap::iterator pos = m_cache.find(fd); 50 error.SetErrorStringWithFormat("invalid host file descriptor %" PRIu64, fd); 63 uint64_t FileCache::WriteFile(lldb::user_id_t fd, uint64_t offset, argument 66 if (fd == UINT64_MAX) { 70 FDToFileMap::iterator pos = m_cache.find(fd); 90 ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst, uint64_t dst_len, Status &error) argument [all...] |
/openbsd-current/usr.sbin/makefs/cd9660/ |
H A D | cd9660_write.c | 59 FILE *fd; local 63 if ((fd = fopen(image, "w+")) == NULL) 67 status = cd9660_copy_file(diskStructure, fd, 0, 77 status = cd9660_write_volume_descriptors(diskStructure, fd); 88 status = cd9660_write_path_tables(diskStructure, fd); 95 status = cd9660_write_file(diskStructure, fd, diskStructure->rootNode); 102 cd9660_write_boot(diskStructure, fd); 107 cd9660_write_filedata(diskStructure, fd, 110 fclose(fd); 114 fclose(fd); 120 cd9660_write_volume_descriptors(iso9660_disk *diskStructure, FILE *fd) argument 140 cd9660_write_path_table(iso9660_disk *diskStructure, FILE *fd, off_t sector, int mode) argument 209 cd9660_write_path_tables(iso9660_disk *diskStructure, FILE *fd) argument 235 cd9660_write_file(iso9660_disk *diskStructure, FILE *fd, cd9660node *writenode) argument 353 cd9660_write_filedata(iso9660_disk *diskStructure, FILE *fd, off_t sector, const unsigned char *buf, int numsecs) argument 387 cd9660_copy_file(iso9660_disk *diskStructure, FILE *fd, off_t start_sector, const char *filename) argument 431 cd9660_write_rr(iso9660_disk *diskStructure, FILE *fd, cd9660node *writenode, off_t offset, off_t sector) argument [all...] |
/openbsd-current/gnu/lib/libreadline/examples/ |
H A D | rl.c | 3 * (or another fd) using readline. 80 int opt, fd, nch; local 91 fd = nch = 0; 102 fd = atoi(optarg); 103 if (fd < 0) 126 if (fd != 0) 128 if (fstat (fd, &sb) < 0) 130 fprintf (stderr, "%s: %d: bad file descriptor\n", progname, fd); 133 ifp = fdopen (fd, "r");
|
/openbsd-current/gnu/usr.bin/cvs/emx/ |
H A D | startserver.c | 33 int fd, port; local 62 fd = rcmd (&rcmd_host, port, 67 if (fd < 0) 70 *tofd = fd; 71 *fromfd = fd; 76 os2_shutdown_server (int fd) argument 79 if (shutdown (fd, 2) < 0 && errno != ENOTSOCK) 81 if (close (fd) < 0)
|