/bionic/libc/bionic/ |
H A D | close.cpp | 34 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 D | dirent.cpp | 59 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 D | epoll_pwait.cpp | 35 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 D | epoll_wait.cpp | 31 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 D | eventfd_read.cpp | 32 int eventfd_read(int fd, eventfd_t* value) { argument 33 return (read(fd, value, sizeof(*value)) == sizeof(*value)) ? 0 : -1;
|
H A D | eventfd_write.cpp | 32 int eventfd_write(int fd, eventfd_t value) { argument 33 return (write(fd, &value, sizeof(value)) == sizeof(value)) ? 0 : -1;
|
H A D | fchmod.cpp | 38 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 D | fchmodat.cpp | 50 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 D | fgetxattr.cpp | 38 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 D | flistxattr.cpp | 38 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 D | fortify.cpp | 84 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 D | fsetxattr.cpp | 38 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 D | fts.c | 65 #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 D | futimens.cpp | 32 int futimens(int fd, const struct timespec times[2]) { argument 33 return utimensat(fd, NULL, times, 0);
|
H A D | getentropy_linux.c | 128 * 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 D | ioctl.cpp | 34 int ioctl(int fd, int request, ...) { argument 39 return __ioctl(fd, request, arg);
|
H A D | isatty.c | 34 isatty (int fd) argument 38 return tcgetattr (fd, &term) == 0;
|
H A D | legacy_32_bit_support.cpp | 51 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 D | libc_logging.cpp | 106 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 D | lockf.cpp | 35 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 D | mkfifo.cpp | 37 int mkfifoat(int fd, const char* path, mode_t mode) { argument 38 return mknodat(fd, path, (mode & ~S_IFMT) | S_IFIFO, 0);
|
H A D | mmap.cpp | 44 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 D | ndk_cruft.cpp | 200 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 D | open.cpp | 73 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 D | pathconf.cpp | 150 long fpathconf(int fd, int name) { argument 152 if (fstatfs(fd, &sb) == -1) {
|