Lines Matching defs:fd
618 int fd;
621 if ((fd = open(asecFileName, O_RDONLY)) < 0) {
627 if (fstat(fd, &info) < 0) {
629 close(fd);
649 close(fd);
657 if (lseek(fd, ((oldNumSec - 1) * 512), SEEK_SET) < 0) {
659 close(fd);
662 if (read(fd, &sb, sizeof(struct asec_superblock)) != sizeof(struct asec_superblock)) {
664 close(fd);
667 close(fd);
867 int fd = open(ftsent->fts_accpath, O_NOFOLLOW);
868 if (fd < 0) {
874 result |= fchown(fd, AID_SYSTEM, privateFile? gid : AID_SYSTEM);
877 result |= fchmod(fd, 0755);
879 result |= fchmod(fd, privateFile ? 0640 : 0644);
887 close(fd);
1219 int dirfd, fd;
1300 int fd;
1406 int fd;
1409 if ((fd = open(loopDevice, O_RDWR)) < 0) {
1415 if (ioctl(fd, BLKGETSIZE, &nr_sec)) {
1418 close(fd);
1422 close(fd);
1497 int fd = open(device, O_RDONLY);
1498 if (fd >= 0) {
1500 if (ioctl(fd, LOOP_GET_STATUS64, &li) >= 0) {
1504 close(fd);
1575 int fd;
1586 if ((fd = open(MASS_STORAGE_FILE_PATH, O_WRONLY)) < 0) {
1591 if (write(fd, nodepath, strlen(nodepath)) < 0) {
1593 close(fd);
1597 close(fd);
1635 int fd;
1636 if ((fd = open(MASS_STORAGE_FILE_PATH, O_WRONLY)) < 0) {
1642 if (write(fd, &ch, 1) < 0) {
1644 close(fd);
1648 close(fd);