/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 | 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 | futimens.cpp | 32 int futimens(int fd, const struct timespec times[2]) { argument 33 return utimensat(fd, NULL, times, 0);
|
H A D | isatty.c | 34 isatty (int fd) argument 38 return tcgetattr (fd, &term) == 0;
|
H A D | signalfd.cpp | 33 extern "C" int __signalfd4(int fd, kernel_sigset_t* mask, size_t sizemask, int flags); 35 int signalfd(int fd, const sigset_t* mask, int flags) { argument 37 return __signalfd4(fd, &in_set, sizeof(in_set), flags);
|
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 | ioctl.cpp | 34 int ioctl(int fd, int request, ...) { argument 39 return __ioctl(fd, request, arg);
|
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 | sync_file_range.cpp | 34 int sync_file_range(int fd, off64_t offset, off64_t length, unsigned int flags) { argument 36 return __sync_file_range2(fd, flags, offset, length); 38 return __sync_file_range(fd, offset, length, flags);
|
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 | 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 | posix_fadvise.cpp | 37 int posix_fadvise(int fd, off_t offset, off_t length, int advice) { argument 38 return posix_fadvise64(fd, offset, length, advice); 42 int posix_fadvise64(int fd, off64_t offset, off64_t length, int advice) { argument 44 return (__arm_fadvise64_64(fd, advice, offset, length) == 0) ? 0 : errno; 47 int posix_fadvise64(int fd, off64_t offset, off64_t length, int advice) { argument 49 return (__fadvise64(fd, offset, length, advice) == 0) ? 0 : errno;
|
H A D | posix_fallocate.cpp | 33 int posix_fallocate(int fd, off_t offset, off_t length) { argument 35 return (fallocate(fd, 0, offset, length) == 0) ? 0 : errno; 38 int posix_fallocate64(int fd, off64_t offset, off64_t length) { argument 40 return (fallocate64(fd, 0, offset, length) == 0) ? 0 : errno;
|
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 | 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 | 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 | sys_time.cpp | 37 static int futimesat(int fd, const char* path, const timeval tv[2], int flags) { argument 43 return utimensat(fd, path, tv ? ts : nullptr, flags); 54 int futimesat(int fd, const char* path, const timeval tv[2]) { argument 55 return futimesat(fd, path, tv, 0); 58 int futimes(int fd, const timeval tv[2]) { argument 64 return futimens(fd, tv ? ts : nullptr);
|
/bionic/libc/upstream-openbsd/lib/libc/gen/ |
H A D | daemon.c | 39 int fd; local 56 if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { 57 (void)dup2(fd, STDIN_FILENO); 58 (void)dup2(fd, STDOUT_FILENO); 59 (void)dup2(fd, STDERR_FILENO); 60 if (fd > 2) 61 (void)close(fd);
|
/bionic/tests/ |
H A D | eventfd_test.cpp | 39 int fd = eventfd(initial_value, O_NONBLOCK); local 40 ASSERT_NE(fd, -1); 43 ASSERT_EQ(0, eventfd_read(fd, &value)); 47 ASSERT_EQ(-1, eventfd_read(fd, &value)); 51 ASSERT_EQ(0, eventfd_write(fd, 1)); 52 ASSERT_EQ(0, eventfd_write(fd, 1)); 53 ASSERT_EQ(0, eventfd_write(fd, 1)); 55 ASSERT_EQ(0, eventfd_read(fd, &value)); 58 close(fd);
|
H A D | sys_statvfs_test.cpp | 54 int fd = open("/proc", O_RDONLY); local 55 ASSERT_EQ(0, fstatvfs(fd, &sb)); 56 close(fd); 62 int fd = open("/proc", O_RDONLY); local 63 ASSERT_EQ(0, fstatvfs64(fd, &sb)); 64 close(fd);
|
H A D | sys_vfs_test.cpp | 55 int fd = open("/proc", O_RDONLY); local 56 ASSERT_EQ(0, fstatfs(fd, &sb)); 57 close(fd); 63 int fd = open("/proc", O_RDONLY); local 64 ASSERT_EQ(0, fstatfs64(fd, &sb)); 65 close(fd);
|
H A D | sys_xattr_test.cpp | 38 ASSERT_EQ(0, fsetxattr(tf.fd, "user.foo", "bar", 4, 0)); 39 ASSERT_EQ(4, fgetxattr(tf.fd, "user.foo", buf, sizeof(buf))); 46 ASSERT_EQ(0, fsetxattr(tf.fd, "user.foo", "", 0, 0)); 47 ASSERT_EQ(0, fgetxattr(tf.fd, "user.foo", buf, sizeof(buf))); 53 ASSERT_EQ(0, fsetxattr(tf.fd, "user.foo", "01234567890123456789", 21, 0)); 54 ASSERT_EQ(-1, fgetxattr(tf.fd, "user.foo", buf, sizeof(buf))); 70 int fd = open(tf.filename, O_PATH); local 71 ASSERT_NE(-1, fd); 73 int res = fsetxattr(fd, "user.foo", "bar", 4, 0); 77 ASSERT_EQ(4, fgetxattr(fd, "use 88 int fd = open(tf.filename, O_PATH); local 117 int fd = open(tf.filename, O_PATH); local [all...] |