Lines Matching refs:fd
370 int fd;
377 if ((fd = mkstemp(path)) == -1) {
382 return fd;
391 int fd, i;
398 fd = lpr_mkstemp();
399 if (fd != -1) {
401 lp_displayq(fd, &lp, lng, jf);
402 if (lseek(fd, 0, SEEK_SET) == -1)
417 lpr_displayq_res(connid, fd, lp.lp_host, cmd);
420 lpr_displayq_res(connid, fd, NULL, NULL);
426 lpr_displayq_res(uint32_t connid, int fd, const char *host, const char *cmd)
428 m_create(p_frontend, IMSG_LPR_DISPLAYQ, connid, 0, fd);
440 int fd, i, restart = 0;
447 fd = lpr_mkstemp();
448 if (fd != -1) {
450 restart = lp_rmjob(fd, &lp, agent, jf);
451 if (lseek(fd, 0, SEEK_SET) == -1)
466 lpr_rmjob_res(connid, fd, lp.lp_host, cmd);
469 lpr_rmjob_res(connid, fd, NULL, NULL);
479 lpr_rmjob_res(uint32_t connid, int fd, const char *host, const char *cmd)
481 m_create(p_frontend, IMSG_LPR_RMJOB, connid, 0, fd);
542 int fd;
544 fd = -1;
575 fd = lp_create(&j->lp, 1, size, j->cfname);
576 if (fd == -1) {
586 m_create(p_frontend, IMSG_LPR_RECVJOB_CF, connid, 0, fd);
587 m_add_int(p_frontend, (fd == -1) ? LPR_NACK : LPR_ACK);
597 int fd;
599 fd = -1;
624 fd = lp_create(&j->lp, 0, size, f->dfname);
625 if (fd == -1) {
640 m_create(p_frontend, IMSG_LPR_RECVJOB_DF, connid, 0, fd);
641 m_add_int(p_frontend, (fd == -1) ? LPR_NACK : LPR_ACK);