Lines Matching refs:fd
96 int fd;
106 if ((fd = open_locked(pstatus, "r", 0)) >= 0) {
119 (f < PST_MAX) && (tmp = fdgets(buf, BUFSIZ, fd));
205 close(fd);
244 if (fd >= 0) {
246 close(fd);
250 close(fd);
284 int fd;
296 if ((fd = open_locked(fault_status, "r", 0)) >= 0) {
297 while (fdgets(buf, BUFSIZ, fd)) {
323 close(fd);
349 int fd;
358 if ((fd = open_locked(cstatus, "r", 0)) >= 0) {
370 (f < CST_MAX) && (tmp = fdgets(buf, BUFSIZ, fd));
413 close(fd);
433 if (fd >= 0) {
435 close(fd);
439 close(fd);
562 int fd;
569 if ((fd = open_locked(pstatus, "w", MODE_READ)) < 0) {
580 (void)fdprintf(fd, "+%s\n", STATUS_BREAK);
583 (void)fdprintf(fd, "%s\n",
587 (void)fdprintf(fd, "%s %s\n",
594 (void)fdprintf(fd, "%ld %ld\n", pps->dis_date,
598 put_multi_line(fd, pps->dis_reason);
601 put_multi_line(fd, pps->rej_reason);
604 (void)fdprintf(fd, "%s\n",
610 (void)fdprintf(fd, "%s\n", (list ? list : ""));
617 close(fd);
629 int fd;
635 if ((fd = open_locked(fault_status, "w", MODE_READ)) < 0) {
638 fdprintf(fd, "%s\n", pps->fault_reason);
639 close(fd);
654 int fd;
661 if ((fd = open_locked(cstatus, "w", MODE_READ)) < 0) {
672 (void)fdprintf(fd, "%s\n", STATUS_BREAK);
675 (void)fdprintf(fd, "%s\n",
679 (void)fdprintf(fd, "%s\n",
685 (void)fdprintf(fd, "%ld\n", pcs->rej_date);
688 put_multi_line(fd, pcs->rej_reason);
692 close(fd);
702 put_multi_line(int fd, char *buf)
708 (void)fdprintf(fd, "\n");
714 (void)fdprintf(fd, "%s\\\n", p);
717 (void)fdprintf(fd, "%s\n", p);