Lines Matching refs:fd
234 /* take care of the possible partial open fd */
456 static void tfaillog(int fd, const char *s);
463 * returns fd to remote uucp daemon
471 int fd;
496 fd = t_open(devname, O_RDWR, &tinfo);
498 if (fd < 0) {
499 tfaillog(fd, "t_open");
503 if (fd_mklock(fd) != SUCCESS) {
504 (void) t_close(fd);
512 if ((bind_ret = (struct t_bind *)t_alloc(fd, T_BIND, T_ALL)) == NULL ||
513 (sndcall = (struct t_call *)t_alloc(fd, T_CALL, T_ALL)) == NULL ||
514 (rcvcall = (struct t_call *)t_alloc(fd, T_CALL, T_ALL)) == NULL) {
515 tfaillog(fd, "t_alloc");
525 if (t_bind(fd, (struct t_bind *)0, bind_ret) < 0) {
526 tfaillog(fd, "t_bind");
531 fd_rmlock(fd);
532 (void) t_close(fd);
570 fd_rmlock(fd);
571 (void) t_close(fd);
595 fd_rmlock(fd);
596 (void) t_close(fd);
606 if (t_connect(fd, sndcall, rcvcall) == 0)
608 if ((t_errno == TLOOK) && (t_look(fd) == T_DISCONNECT)) {
609 (void) t_rcvdis(fd, NULL);
613 tfaillog(fd, "t_connect");
618 fd_rmlock(fd);
619 (void) t_close(fd);
628 tfaillog(fd, "t_connect");
630 fd_rmlock(fd);
631 (void) t_close(fd);
636 return (fd);