Lines Matching refs:fd
317 int fd;
319 if ((fd = open(psfile, O_RDONLY)) == -1)
322 if (fstat(fd, &sbuf1) < 0 || sbuf1.st_size == 0 ||
327 (void) close(fd);
333 if (read_tmp_file(fd, (char *) &ndev, sizeof (ndev)) == 0) {
334 (void) close(fd);
345 if (read_tmp_file(fd, (char *)devl, ndev * sizeof (*devl)) == 0) {
346 (void) close(fd);
350 (void) close(fd);
479 int fd;
489 if ((fd = open(tfname, O_WRONLY|O_CREAT|O_EXCL, 0664)) < 0) {
501 write_tmp_file(fd, (char *) &ndev, sizeof (ndev));
502 write_tmp_file(fd, (char *)devl, ndev * sizeof (*devl));
504 (void) close(fd);
537 read_tmp_file(fd, bp, bs)
538 int fd;
544 if ((rbs = read(fd, bp, bs)) != bs) {
557 write_tmp_file(fd, bp, bs)
558 int fd;
564 if ((wbs = write(fd, bp, bs)) != bs) {