Searched refs:fd (Results 1 - 25 of 136) sorted by last modified time

123456

/bionic/libc/bionic/
H A Dclose.cpp34 int close(int fd) { argument
35 int rc = ___close(fd);
37 // POSIX says that if close returns with EINTR, the fd must not be closed.
H A Ddirent.cpp59 static DIR* __allocate_DIR(int fd) { argument
64 d->fd_ = fd;
76 DIR* fdopendir(int fd) { argument
77 // Is 'fd' actually a directory?
79 if (fstat(fd, &sb) == -1) {
87 return __allocate_DIR(fd);
91 int fd = open(path, O_CLOEXEC | O_DIRECTORY | O_RDONLY); local
92 return (fd != -1) ? __allocate_DIR(fd) : NULL;
152 int fd local
[all...]
H A Depoll_pwait.cpp35 int epoll_pwait(int fd, epoll_event* events, int max_events, int timeout, const sigset_t* ss) { argument
42 return __epoll_pwait(fd, events, max_events, timeout, kernel_ss_ptr, sizeof(kernel_ss));
H A Depoll_wait.cpp31 int epoll_wait(int fd, struct epoll_event* events, int max_events, int timeout) { argument
32 return epoll_pwait(fd, events, max_events, timeout, NULL);
H A Deventfd_read.cpp32 int eventfd_read(int fd, eventfd_t* value) { argument
33 return (read(fd, value, sizeof(*value)) == sizeof(*value)) ? 0 : -1;
H A Deventfd_write.cpp32 int eventfd_write(int fd, eventfd_t value) { argument
33 return (write(fd, &value, sizeof(value)) == sizeof(value)) ? 0 : -1;
H A Dfchmod.cpp38 int fchmod(int fd, mode_t mode) { argument
40 int result = ___fchmod(fd, mode);
46 // fd could be an O_PATH file descriptor, and the kernel
48 // Use /proc/self/fd instead to emulate this support.
54 int fd_flag = fcntl(fd, F_GETFL);
61 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd);
H A Dfchmodat.cpp50 int fd = openat(dirfd, pathname, O_PATH | O_NOFOLLOW | O_CLOEXEC); local
51 if (fd == -1) {
60 int result = fchmod(fd, mode);
62 close(fd);
H A Dfgetxattr.cpp38 ssize_t fgetxattr(int fd, const char *name, void *value, size_t size) { argument
40 ssize_t result = ___fgetxattr(fd, name, value, size);
46 // fd could be an O_PATH file descriptor, and the kernel
48 // Use /proc/self/fd instead to emulate this support.
49 int fd_flag = fcntl(fd, F_GETFL);
56 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd);
H A Dflistxattr.cpp38 ssize_t flistxattr(int fd, char *list, size_t size) { argument
40 ssize_t result = ___flistxattr(fd, list, size);
46 // fd could be an O_PATH file descriptor, and the kernel
48 // Use /proc/self/fd instead to emulate this support.
49 int fd_flag = fcntl(fd, F_GETFL);
56 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd);
H A Dfortify.cpp84 int __FD_ISSET_chk(int fd, fd_set* set, size_t set_size) { argument
85 __check_fd_set("FD_ISSET", fd, set_size);
86 return FD_ISSET(fd, set);
89 void __FD_CLR_chk(int fd, fd_set* set, size_t set_size) { argument
90 __check_fd_set("FD_CLR", fd, set_size);
91 FD_CLR(fd, set);
94 void __FD_SET_chk(int fd, fd_set* set, size_t set_size) { argument
95 __check_fd_set("FD_SET", fd, set_size);
96 FD_SET(fd, set);
177 ssize_t __pread64_chk(int fd, voi argument
183 __pread_chk(int fd, void* buf, size_t count, off_t offset, size_t buf_size) argument
189 __pwrite64_chk(int fd, const void* buf, size_t count, off64_t offset, size_t buf_size) argument
196 __pwrite_chk(int fd, const void* buf, size_t count, off_t offset, size_t buf_size) argument
203 __read_chk(int fd, void* buf, size_t count, size_t buf_size) argument
455 __write_chk(int fd, const void* buf, size_t count, size_t buf_size) argument
[all...]
H A Dfsetxattr.cpp38 int fsetxattr(int fd, const char* name, const void* value, size_t size, int flags) { argument
40 int result = ___fsetxattr(fd, name, value, size, flags);
46 // fd could be an O_PATH file descriptor, and the kernel
48 // Use /proc/self/fd instead to emulate this support.
49 int fd_flag = fcntl(fd, F_GETFL);
56 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd);
H A Dfts.c65 #define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd))
225 /* Stash the original directory fd if needed. */
467 int fd; local
520 if ((fd = open(".", O_RDONLY, 0)) < 0)
523 if (fchdir(fd)) {
524 (void)close(fd);
527 (void)close(fd);
768 * the saved fd; if one of fts_open()'s arguments is a relative path
1020 * Change to dir specified by fd o
1025 fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path) argument
[all...]
H A Dfutimens.cpp32 int futimens(int fd, const struct timespec times[2]) { argument
33 return utimensat(fd, NULL, times, 0);
H A Dgetentropy_linux.c128 * of the chroot-unavailable fd-using /proc mechanism --
221 int fd, cnt, flags; local
233 fd = open("/dev/urandom", flags, 0);
234 if (fd == -1) {
240 fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
244 if (fstat(fd, &st) == -1 || !S_ISCHR(st.st_mode)) {
245 close(fd);
248 if (ioctl(fd, RNDGETENTCNT, &cnt) == -1) {
249 close(fd);
[all...]
H A Dioctl.cpp34 int ioctl(int fd, int request, ...) { argument
39 return __ioctl(fd, request, arg);
H A Disatty.c34 isatty (int fd) argument
38 return tcgetattr (fd, &term) == 0;
H A Dlegacy_32_bit_support.cpp51 int fcntl(int fd, int cmd, ...) { argument
58 return __fcntl64(fd, cmd, arg);
63 off64_t lseek64(int fd, off64_t off, int whence) { argument
67 if (__llseek(fd, off_hi, off_lo, &result, whence) < 0) {
74 ssize_t pread(int fd, void* buf, size_t byte_count, off_t offset) { argument
75 return pread64(fd, buf, byte_count, static_cast<off64_t>(offset));
79 ssize_t pwrite(int fd, const void* buf, size_t byte_count, off_t offset) { argument
80 return pwrite64(fd, buf, byte_count, static_cast<off64_t>(offset));
87 ssize_t preadv(int fd, const struct iovec* ios, int count, off_t offset) { argument
88 return __preadv64(fd, io
90 preadv64(int fd, const struct iovec* ios, int count, off64_t offset) argument
93 pwritev(int fd, const struct iovec* ios, int count, off_t offset) argument
96 pwritev64(int fd, const struct iovec* ios, int count, off64_t offset) argument
101 fallocate(int fd, int mode, off_t offset, off_t length) argument
[all...]
H A Dlibc_logging.cpp106 explicit FdOutputStream(int fd) : total(0), fd_(fd) { argument
428 int __libc_format_fd(int fd, const char* format, ...) { argument
429 FdOutputStream os(fd);
H A Dlockf.cpp35 int lockf64(int fd, int cmd, off64_t length) { argument
46 return fcntl(fd, F_SETLK64, &fl);
51 return fcntl(fd, F_SETLKW64, &fl);
56 return fcntl(fd, F_SETLK64, &fl);
61 if (fcntl(fd, F_GETLK64, &fl) == -1) return -1;
71 int lockf(int fd, int cmd, off_t length) { argument
72 return lockf64(fd, cmd, length);
H A Dmkfifo.cpp37 int mkfifoat(int fd, const char* path, mode_t mode) { argument
38 return mknodat(fd, path, (mode & ~S_IFMT) | S_IFIFO, 0);
H A Dmmap.cpp44 void* mmap64(void* addr, size_t size, int prot, int flags, int fd, off64_t offset) { argument
61 void* result = __mmap2(addr, size, prot, flags, fd, offset >> MMAP2_SHIFT);
75 void* mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset) { argument
76 return mmap64(addr, size, prot, flags, fd, static_cast<off64_t>(offset));
H A Dndk_cruft.cpp200 int fdprintf(int fd, const char* fmt, ...) { argument
203 int rc = vdprintf(fd, fmt, ap);
209 int vfdprintf(int fd, const char* fmt, va_list ap) { argument
210 return vdprintf(fd, fmt, ap);
264 int getdents(unsigned int fd, dirent* dirp, unsigned int count) { argument
265 return __getdents64(fd, dirp, count);
H A Dopen.cpp73 int openat(int fd, const char *pathname, int flags, ...) { argument
83 return __openat(fd, pathname, force_O_LARGEFILE(flags), mode);
87 int __openat_2(int fd, const char* pathname, int flags) { argument
92 return __openat(fd, pathname, force_O_LARGEFILE(flags), 0);
H A Dpathconf.cpp150 long fpathconf(int fd, int name) { argument
152 if (fstatfs(fd, &sb) == -1) {

Completed in 1408 milliseconds

123456