Lines Matching refs:fd
568 int fd = open("/proc/meminfo", O_RDONLY);
570 if (fd < 0) {
575 int len = read(fd, buffer, sizeof(buffer)-1);
576 close(fd);
633 fd = open("/sys/block/zram0/mem_used_total", O_RDONLY);
634 if (fd >= 0) {
635 len = read(fd, buffer, sizeof(buffer)-1);
636 close(fd);
857 jniThrowNullPointerException(env, "fd == null");
867 int fd = dup(origFd);
868 if (fd < 0) {
874 FILE* fp = fdopen(fd, "w");
876 ALOGW("fdopen(%d) failed: %s\n", fd, strerror(errno));
877 close(fd);
904 int fd = open(fileName8.string(), O_CREAT | O_WRONLY | O_NOFOLLOW, 0666); /* -rw-rw-rw- */
905 if (fd < 0) {
910 if (lseek(fd, 0, SEEK_END) < 0) {
913 dump_backtrace_to_file(pid, fd);
916 close(fd);