Home
last modified time | relevance | path

Searched refs:nfd (Results 1 – 25 of 25) sorted by relevance

/illumos-gate/usr/src/cmd/sendmail/libmilter/
H A Dworker.c337 int nfd, rfd, i; local
392 nfd = 0;
395 pfd[nfd].fd = RD_PIPE;
396 pfd[nfd].events = MI_POLL_RD_FLAGS;
397 pfd[nfd].revents = 0;
398 nfd++;
419 if (nfd >= dim_pfd)
442 if (nfd < dim_pfd)
445 pfd[nfd].fd = ctx->ctx_sd;
446 pfd[nfd].events = MI_POLL_RD_FLAGS;
[all …]
/illumos-gate/usr/src/cmd/ipf/tools/
H A Dipfs.c569 int nfd, i; local
574 nfd = -1;
582 nfd = open(file, O_RDONLY);
583 if (nfd == -1) {
595 i = read(nfd, &ipn, sizeof(ipn));
598 close(nfd);
606 close(nfd);
618 i = read(nfd, s, n);
625 close(nfd);
662 close(nfd);
[all …]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dpoll.c34 ppoll(struct pollfd *_RESTRICT_KYWD fds, nfds_t nfd, in ppoll() argument
38 return (_pollsys(fds, nfd, tsp, sigmask)); in ppoll()
42 poll(struct pollfd *fds, nfds_t nfd, int timeout) in poll() argument
55 return (_pollsys(fds, nfd, tsp, NULL)); in poll()
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/nc/
H A Dnetcat.c689 readwrite(int nfd) in readwrite() argument
700 pfd[0].fd = nfd; in readwrite()
712 (void) close(nfd); in readwrite()
720 if ((n = read(nfd, buf, plen)) < 0) in readwrite()
723 (void) shutdown(nfd, SHUT_RD); in readwrite()
728 atelnet(nfd, buf, n); in readwrite()
745 (void) shutdown(nfd, SHUT_WR); in readwrite()
749 if (atomicio(vwrite, nfd, buf, n) != n) in readwrite()
758 atelnet(int nfd, unsigned char *buf, unsigned int size) in atelnet() argument
782 if (atomicio(vwrite, nfd, obuf, 3) != 3) in atelnet()
/illumos-gate/usr/src/cmd/sgs/libld/common/
H A Dsupport.c178 int nfd = *ofd; in ld_sup_open() local
207 (*flp->fl_fptr)(&npath, &nfile, &nfd, _flags, &nelf, ref, off, in ld_sup_open()
216 if ((npath != *opath) || (nfd != *ofd) || (nelf != *oelf)) { in ld_sup_open()
218 *opath, npath, *ofd, nfd, *oelf, nelf)); in ld_sup_open()
223 *ofd = nfd; in ld_sup_open()
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/in.routed/
H A Dtrace.c278 int nfd; in set_tracefile() local
345 nfd = open(fn, O_CREAT|O_EXCL|O_WRONLY, 0644); in set_tracefile()
346 if (nfd != -1 && fstat(nfd, &stbuf) == -1) { in set_tracefile()
347 (void) close(nfd); in set_tracefile()
351 nfd = open(fn, O_APPEND|O_WRONLY, 0644); in set_tracefile()
356 if (nfd == -1 || (n_ftrace = fdopen(nfd, "a")) == NULL) { in set_tracefile()
361 if (nfd != -1) in set_tracefile()
362 (void) close(nfd); in set_tracefile()
366 if (fstat(nfd, &stbuf2) == -1 || !S_ISREG(stbuf2.st_mode) || in set_tracefile()
375 (void) dup2(nfd, STDOUT_FILENO); in set_tracefile()
[all …]
/illumos-gate/usr/src/lib/libdladm/common/
H A Dlibdlflow.c326 int nfd, fn_rc, lock_fd; in i_dladm_flow_walk_rw_db() local
354 if ((nfd = open(tmp_db_file, O_WRONLY|O_CREAT|O_TRUNC, in i_dladm_flow_walk_rw_db()
361 if ((nfp = fdopen(nfd, "w")) == NULL) { in i_dladm_flow_walk_rw_db()
362 (void) close(nfd); in i_dladm_flow_walk_rw_db()
402 if (fchmod(nfd, DLADM_FLOW_DB_PERMS) == -1) in i_dladm_flow_walk_rw_db()
405 if (fchown(nfd, DLADM_FLOW_DB_OWNER, DLADM_FLOW_DB_GROUP) == -1) in i_dladm_flow_walk_rw_db()
H A Dlibdladm.c754 int nfd, lock_fd; in i_dladm_rw_db() local
785 if ((nfd = open(newfile, O_WRONLY | O_CREAT | O_TRUNC, in i_dladm_rw_db()
792 if ((nfp = fdopen(nfd, "w")) == NULL) { in i_dladm_rw_db()
793 (void) close(nfd); in i_dladm_rw_db()
805 if (fchmod(nfd, db_perms) < 0) { in i_dladm_rw_db()
814 if (fchown(nfd, UID_DLADM, GID_NETADM) < 0) { in i_dladm_rw_db()
/illumos-gate/usr/src/uts/common/exec/elf/
H A Delf_notes.c79 int nfd; in setup_note_header() local
87 nfd = 0; in setup_note_header()
92 nfd++; in setup_note_header()
99 v[0].p_filesz = (sizeof (Note) * (10 + 3 * nlwp + nzomb + nfd)) in setup_note_header()
113 + nfd * roundup(sizeof (prfdinfo_core_t), sizeof (Word)); in setup_note_header()
/illumos-gate/usr/src/lib/libnsl/rpc/
H A Dclnt_generic.c758 int nfd; in __rpc_raise_fd() local
760 if ((nfd = fcntl(fd, F_DUPFD, RPC_MINFD)) == -1) in __rpc_raise_fd()
763 if (t_sync(nfd) == -1) { in __rpc_raise_fd()
764 (void) close(nfd); in __rpc_raise_fd()
774 return (nfd); in __rpc_raise_fd()
/illumos-gate/usr/src/cmd/sgs/liblddbg/common/
H A Dfiles.c723 const char *nname, int ofd, int nfd, Elf *oelf, Elf *nelf) in Dbg_file_modified() argument
737 if (nfd != ofd) { in Dbg_file_modified()
738 if (nfd == -1) in Dbg_file_modified()
742 dbg_print(lml, MSG_INTL(MSG_FIL_FDCHANGE), ofd, nfd, str); in Dbg_file_modified()
/illumos-gate/usr/src/uts/common/fs/sockfs/
H A Dsocksyscalls.c438 int nfd; in so_socketpair() local
491 error = falloc(nvp, FWRITE|FREAD, &nfp, &nfd); in so_socketpair()
510 setf(nfd, nfp); in so_socketpair()
525 f_setfd(nfd, FD_CLOEXEC); in so_socketpair()
533 svs[0] = nfd; in so_socketpair()
536 (void) closeandsetf(nfd, NULL); in so_socketpair()
632 int nfd; in accept() local
676 if ((nfd = ufalloc(0)) == -1) { in accept()
683 setf(nfd, NULL); in accept()
707 setf(nfd, NULL); in accept()
[all …]
/illumos-gate/usr/src/cmd/ttymon/
H A Dttymon.c519 int nfd = 0; in set_poll() local
526 nfd++; in set_poll()
529 return (nfd); in set_poll()
/illumos-gate/usr/src/lib/libipadm/common/
H A Dipadm_persist.c867 int nfd; in ipadm_rw_db() local
882 if ((nfd = open(newfile, O_WRONLY | O_CREAT | O_TRUNC, in ipadm_rw_db()
889 if ((nfp = fdopen(nfd, "w")) == NULL) { in ipadm_rw_db()
891 (void) close(nfd); in ipadm_rw_db()
/illumos-gate/usr/src/cmd/ptools/pfiles/
H A Dpfiles.c309 ulong_t nfd = rlim.rlim_cur; in show_files() local
310 if (nfd == RLIM_INFINITY) in show_files()
315 " Current rlimit: %lu file descriptors\n", nfd); in show_files()
/illumos-gate/usr/src/cmd/zlogin/
H A Dzlogin.c2082 int nfd; in main() local
2084 if ((nfd = open(_PATH_DEVNULL, O_RDONLY)) < 0) { in main()
2088 if (nfd != STDIN_FILENO) { in main()
2089 if (dup2(nfd, STDIN_FILENO) < 0) { in main()
2094 (void) close(nfd); in main()
/illumos-gate/usr/src/lib/libdtrace/common/
H A Ddt_printf.c809 dt_pfargd_t *pfd, *nfd = NULL; in dt_printf_create() local
841 nfd->pfd_next = pfd; in dt_printf_create()
847 nfd = pfd; in dt_printf_create()
989 nfd->pfd_next = pfd; in dt_printf_create()
1006 dt_pfargd_t *pfd, *nfd; in dt_printf_destroy() local
1008 for (pfd = pfv->pfv_argv; pfd != NULL; pfd = nfd) { in dt_printf_destroy()
1009 nfd = pfd->pfd_next; in dt_printf_destroy()
/illumos-gate/usr/src/uts/common/inet/sockmods/
H A Dsocksctp.c1678 int nfd; in sosctp_ioctl() local
1708 if ((nfd = ufalloc(0)) == -1) { in sosctp_ioctl()
1717 if (so_copyout(&nfd, (void *)arg, sizeof (nfd), in sosctp_ioctl()
1783 setf(nfd, nfp); in sosctp_ioctl()
1801 setf(nfd, NULL); in sosctp_ioctl()
1814 setf(nfd, NULL); in sosctp_ioctl()
/illumos-gate/usr/src/lib/libc/port/stdio/
H A Dflush.c950 int nfd = fcntl(fd, F_BADFD, action); in enable_extended_FILE_stdio() local
951 if (nfd < 0 || nfd != fd) in enable_extended_FILE_stdio()
/illumos-gate/usr/src/lib/brand/solaris10/s10_brand/common/
H A Ds10_deleted.c176 s10_poll(sysret_t *rval, struct pollfd *fds, nfds_t nfd, int timeout) in s10_poll() argument
190 fds, nfd, tsp, NULL)); in s10_poll()
/illumos-gate/usr/src/lib/libc/port/threads/
H A Dscalls.c1009 _pollsys(struct pollfd *fds, nfds_t nfd, const timespec_t *timeout, in _pollsys() argument
1017 rv = __pollsys(fds, nfd, timeout, sigmask); in _pollsys()
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/sh/
H A Dio.c810 int nfd= -1; in sh_open() local
815 nfd = open(path,flags,st.st_mode); in sh_open()
818 nfd = open(path,flags); in sh_open()
819 if(nfd>=0) in sh_open()
821 fd = nfd; in sh_open()
/illumos-gate/usr/src/uts/common/io/iprb/
H A Diprb.c1122 iprb_dma_t *rfd, *nfd, *lfd; in iprb_rx_add() local
1135 nfd = &ip->rxb[next]; in iprb_rx_add()
1137 PUTRFD32(rfd, RFD_LNK_OFFSET, nfd->paddr); in iprb_rx_add()
/illumos-gate/usr/src/cmd/sgs/ar/common/
H A Dfile.c1612 arwrite(const char *name, int nfd, const char *dst, size_t size) in arwrite() argument
1614 if (write(nfd, dst, size) != size) { in arwrite()
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/vrrpd/
H A Dvrrpd.c2000 int nfd; in vrrpd_updateconf() local
2026 if ((nfd = open(newfile, O_WRONLY | O_CREAT | O_TRUNC, in vrrpd_updateconf()
2034 if ((nfp = fdopen(nfd, "wF")) == NULL) { in vrrpd_updateconf()