Lines Matching refs:fd
192 int fd;
197 fd = open(proc_path, O_RDONLY);
198 if (fd >= 0) {
199 int rc = read(fd, cmdline, sizeof(cmdline)-1);
201 close(fd);
353 int fd = open(text, O_WRONLY);
354 if (fd >= 0) {
356 write(fd, text, strlen(text));
357 close(fd);
380 int fd = open(text, O_WRONLY);
381 if (fd >= 0) {
383 write(fd, text, strlen(text));
384 close(fd);
427 int fd = open("/proc/meminfo", O_RDONLY);
429 if (fd < 0) {
435 const int len = read(fd, buffer, sizeof(buffer)-1);
436 close(fd);
540 int fd = open(file.string(), O_RDONLY);
542 if (fd >= 0) {
545 int len = read(fd, buffer, BUFFER_SIZE-1);
546 close(fd);
838 int fd = open(file8, O_RDONLY);
841 if (fd < 0) {
847 const int len = read(fd, buffer, sizeof(buffer)-1);
848 close(fd);
851 //ALOGW("Unable to open process file: %s fd=%d\n", file8, fd);
973 int fd = open(path, O_RDONLY);
974 if (fd < 0) {
977 const int len = read(fd, data, sizeof(data)-1);
978 close(fd);