Lines Matching refs:fd
488 int fd;
502 fd = open(path, O_CREAT|O_TRUNC|O_WRONLY, S_IRWXU|S_IRWXO|S_IRWXG);
503 if (fd < 0) {
515 rval = write(fd, &val, 1);
526 rval = write(fd, &val, 1);
536 rval = write(fd, &val, 1);
545 rval = write(fd, &val, 1);
550 (void) close(fd);
563 int fd;
569 fd = open(path, O_RDONLY);
570 if (fd < 0) {
575 rval = fstat(fd, &sb);
578 close(fd);
585 close(fd);
593 rval = read(fd, p, len);
601 (void) close(fd);
605 close(fd);
642 int fd;
662 fd = open(datapath, O_RDONLY);
663 if (fd < 0) {
669 rval = fstat(fd, &sb);
673 close(fd);
681 close(fd);
688 rval = read(fd, p, len);
694 (void) close(fd);