Lines Matching refs:fd
644 static char* find_and_open_tombstone(int* fd)
674 *fd = open(path, O_CREAT | O_EXCL | O_WRONLY, 0600);
675 if (*fd < 0)
678 fchown(*fd, AID_SYSTEM, AID_SYSTEM);
684 *fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
685 if (*fd < 0) {
689 fchown(*fd, AID_SYSTEM, AID_SYSTEM);
706 int fd;
707 char* path = find_and_open_tombstone(&fd);
714 log.tfd = fd;
719 close(fd);