Lines Matching refs:fd
217 int fd;
222 fd = open(proc_path, O_RDONLY | O_CLOEXEC);
223 if (fd >= 0) {
224 int rc = read(fd, cmdline, sizeof(cmdline)-1);
226 close(fd);
558 int fd = open(text, O_WRONLY | O_CLOEXEC);
559 if (fd >= 0) {
561 write(fd, text, strlen(text));
562 close(fd);
606 int fd = open("/proc/meminfo", O_RDONLY | O_CLOEXEC);
608 if (fd < 0) {
614 const int len = read(fd, buffer, sizeof(buffer)-1);
615 close(fd);
719 int fd = open(file.string(), O_RDONLY | O_CLOEXEC);
721 if (fd >= 0) {
724 int len = read(fd, buffer, BUFFER_SIZE-1);
725 close(fd);
1026 int fd = open(file8, O_RDONLY | O_CLOEXEC);
1028 if (fd < 0) {
1038 const int len = read(fd, buffer, sizeof(buffer)-1);
1039 close(fd);
1043 ALOGW("Unable to open process file: %s fd=%d\n", file8, fd);
1160 int fd = open(path, O_RDONLY | O_CLOEXEC);
1161 if (fd < 0) {
1164 const int len = read(fd, data, sizeof(data)-1);
1165 close(fd);