Lines Matching refs:fd
564 int fd = open(ftsent->fts_accpath, O_NOFOLLOW);
565 if (fd < 0) {
571 result |= fchown(fd, AID_SYSTEM, privateFile? gid : AID_SYSTEM);
574 result |= fchmod(fd, 0755);
576 result |= fchmod(fd, privateFile ? 0640 : 0644);
578 close(fd);
826 int dirfd, fd;
901 int fd;
1038 int fd;
1041 if ((fd = open(loopDevice, O_RDWR)) < 0) {
1047 if (ioctl(fd, BLKGETSIZE, &nr_sec)) {
1050 close(fd);
1054 close(fd);
1145 int fd = open(device, O_RDONLY);
1146 if (fd >= 0) {
1148 if (ioctl(fd, LOOP_GET_STATUS64, &li) >= 0) {
1152 close(fd);
1223 int fd;
1229 if ((fd = open(MASS_STORAGE_FILE_PATH, O_WRONLY)) < 0) {
1234 if (write(fd, nodepath, strlen(nodepath)) < 0) {
1236 close(fd);
1240 close(fd);
1278 int fd;
1279 if ((fd = open(MASS_STORAGE_FILE_PATH, O_WRONLY)) < 0) {
1285 if (write(fd, &ch, 1) < 0) {
1287 close(fd);
1291 close(fd);