Lines Matching refs:fd
75 int fd = open(filename, O_RDONLY); in read_data() local
76 if (fd < 0) { in read_data()
81 int len = read(fd, buf, sizeof(buf)); in read_data()
84 close(fd); in read_data()
89 close(fd); in read_data()
107 int fd = open(filename, O_RDONLY); in read_lines() local
108 if (fd < 0) return 0; in read_lines()
110 int len = read(fd, buf, sizeof(buf) - 1); in read_lines()
113 close(fd); in read_lines()
117 close(fd); in read_lines()
162 int fd = open("/proc/yaffs", O_RDONLY); in read_proc_yaffs() local
163 if (fd < 0) return 0; in read_proc_yaffs()
165 int len = read(fd, buf, sizeof(buf) - 1); in read_proc_yaffs()
168 close(fd); in read_proc_yaffs()
172 close(fd); in read_proc_yaffs()
244 int fd = open(filename, O_RDONLY); in read_stats() local
245 if (fd < 0) { in read_stats()
250 int len = read(fd, cmdline, sizeof(cmdline) - 1); in read_stats()
253 close(fd); in read_stats()
257 close(fd); in read_stats()