Searched refs:fd (Results 451 - 475 of 1995) sorted by relevance

<<11121314151617181920>>

/illumos-gate/usr/src/cmd/sendmail/libsm/
H A Drefill.c37 ** This #define uses a select() to wait for the 'fd' to become readable.
46 ** Note: if a valid 'fd' doesn't exist yet, don't use this (e.g. the
51 ** fd -- raw file descriptor (from 'fp') to use for select()
60 #define SM_IO_RD_TIMEOUT(fp, fd, to, timeout, sel_ret) \
70 if (FD_SETSIZE > 0 && (fd) >= FD_SETSIZE) \
76 FD_SET((fd), &sm_io_to_mask); \
78 FD_SET((fd), &sm_io_x_mask); \
83 (sel_ret) = select((fd) + 1, &sm_io_to_mask, NULL, \
148 int fd; local
174 SM_CONVERT_TIME(fp, fd, timeou
[all...]
/illumos-gate/usr/src/cmd/ttymon/
H A Dtmhandler.c79 * Child has pcpipe[0] pipe fd for reading and writing
80 * and closes pcpipe[1]. Parent has pcpipe[1] pipe fd for
108 * Wait for the parent process to close its fd
245 if ((pmptr = find_fd(fdp->fd)) == NULL) {
246 log("do_poll: cannot find fd %d in pmtab",
247 fdp->fd);
259 fatal("ttymon[%d]: do_poll: POLLERR on fd %d",
260 getpid(), fdp->fd);
437 * find_fd(fd) - find the corresponding pmtab entry for the fd
555 int fd; local
[all...]
H A Dttymon.c272 * - valid, fd = 0, and pid = 0
344 int fd, val = 0; local
359 if ((fd = open(pmptr->p_device, O_RDONLY|O_NONBLOCK|O_NOCTTY)) < 0) {
364 if (ioctl(fd, TIOCSSOFTCAR, &val) < 0)
368 close(fd);
384 int fd, tmpfd; local
394 if ((fd = open(pmptr->p_device, O_RDWR)) == -1)
406 fd = pmptr->p_fd;
408 } else if ((fd = open(pmptr->p_device, O_RDWR|O_NONBLOCK))
427 if (fcntl(fd, F_SETF
[all...]
/illumos-gate/usr/src/lib/sun_fc/common/
H A DFCHBA.cc70 int fd; local
89 if ((fd = open(port->getPath().c_str(), O_NDELAY | O_RDONLY)) ==
108 if (ioctl(fd, FCIO_CMD, &fcio) != 0) {
116 close(fd);
129 close(fd);
153 int fd; local
157 if ((fd = open(port->getPath().c_str(), O_NDELAY | O_RDONLY)) == -1) {
183 if (ioctl(fd, FCIO_CMD, &fcio) != 0) {
184 close(fd);
195 close(fd);
217 int fd; local
262 int fd; local
326 int fd; local
[all...]
/illumos-gate/usr/src/psm/promif/ieee1275/common/
H A Dprom_io.c74 prom_seek(int fd, unsigned long long offset) argument
81 ci[3] = p1275_uint2cell((uint_t)fd); /* Arg1: ihandle */
95 prom_read(ihandle_t fd, caddr_t buf, size_t len, uint_t startblk, char devtype) argument
116 ci[3] = p1275_size2cell((uint_t)fd); /* Arg1: ihandle */
143 prom_write(ihandle_t fd, caddr_t buf, size_t len, uint_t startblk, char devtype) argument
160 if (promif_redirect != NULL && fd == prom_stdout_ihandle()) {
221 ci[3] = p1275_uint2cell((uint_t)fd); /* Arg1: ihandle */
241 prom_close(int fd) argument
249 ci[3] = p1275_uint2cell((uint_t)fd); /* Arg1: ihandle */
/illumos-gate/usr/src/uts/common/syscall/
H A Dstat.c65 cstatat_getvp(int fd, char *name, int follow, vnode_t **vp, cred_t **cred) argument
76 * Only return EFAULT for fstatat when fd == AT_FDCWD && name == NULL
79 if (fd == AT_FDCWD) {
89 if ((fp = getf(fd)) == NULL) {
96 releasef(fd);
137 #define FSTAT_BODY(fd, sb, statfn) \
142 if (fd == AT_FDCWD) \
144 if ((fp = getf(fd)) == NULL) \
147 releasef(fd); \
154 fstat(int fd, struc argument
160 fstatat(int fd, char *name, struct stat *sb, int flags) argument
256 cstatat(int fd, char *name, struct stat *sb, int follow, int flags) argument
289 fstat32(int fd, struct stat32 *sb) argument
295 fstatat32(int fd, char *name, struct stat32 *sb, int flags) argument
379 cstatat32(int fd, char *name, struct stat32 *sb, int follow, int flags) argument
416 fstat64(int fd, struct stat64 *sb) argument
422 fstatat64(int fd, char *name, struct stat64 *sb, int flags) argument
487 cstatat64(int fd, char *name, struct stat64 *sb, int follow, int flags) argument
527 fstat64_32(int fd, struct stat64_32 *sb) argument
533 fstatat64_32(int fd, char *name, struct stat64_32 *sb, int flags) argument
606 cstatat64_32(int fd, char *name, struct stat64_32 *sb, int follow, int flags) argument
[all...]
H A Dutime.c52 cfutimesat(int fd, char *fname, int nmflag, vattr_t *vap, int flags, int follow) argument
59 if (fd == AT_FDCWD && fname == NULL)
69 if (fd == AT_FDCWD) {
76 if ((fp = getf(fd)) == NULL)
80 releasef(fd);
172 futimens(int fd, timespec_t *tsptr) argument
181 return (cfutimesat(fd, NULL, 2, &vattr, flags, FOLLOW));
185 utimensat(int fd, char *fname, timespec_t *tsptr, int flag) argument
194 return (cfutimesat(fd, fname, 1, &vattr, flags,
/illumos-gate/usr/src/lib/libast/common/misc/
H A Dprocopen.c106 short fd; member in struct:Fd_s
123 } fd; member in union:Mod_s::__anon2649
220 m->arg.fd.parent.fd = (short)arg1;
221 m->arg.fd.parent.flag = fcntl(arg1, F_GETFD, 0);
222 if ((m->arg.fd.child.fd = (short)arg2) != arg1)
226 m->arg.fd.child.flag = fcntl(arg2, F_GETFD, 0);
241 if (m->arg.fd.parent.flag)
245 else if (!m->arg.fd
[all...]
/illumos-gate/usr/src/cmd/lp/lib/filters/
H A Dloadfilters.c59 int fd; local
70 if ((fd = open_filtertable(file, "r")) < 0)
80 close(fd);
87 getfields(fd, filt, buf, sizeof(buf), FL_MAX, FL_SEP) != -1;
103 close(fd);
149 close(fd);
153 close(fd);
194 getfields(int fd, char *fields[], char *buf, int bufsiz, int max, char *seps) argument
202 while (fdgets(buf, bufsiz, fd) != NULL) {
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/
H A Dprompter.c38 int fd, i, scratchchar; local
60 fd = dup(STDIN_FILENO);
61 if (fd < 0)
63 fp = fdopen(fd, "r");
118 else if (fd >= 0)
119 close(fd);
158 int fd; local
163 fd = fileno(fp);
165 if (!isatty(fd)) {
169 if (tcgetattr(fd,
190 int ret, fd; local
[all...]
/illumos-gate/usr/src/lib/libnsl/nsl/
H A Dt_accept.c50 int fd,
66 if ((tiptr = _t_checkfd(fd, 0, api_semantics)) == NULL)
92 * For fd == resfd, state should be T_INCON
93 * For fd != resfd,
94 * fd state should be T_INCON
100 if ((fd == resfd && tiptr->ti_state != T_INCON) ||
101 (fd != resfd &&
113 * If fd != resfd, and a resfd bound to a protocol address is
118 if (fd != resfd && restiptr->ti_state == T_IDLE &&
126 if (fd
49 _tx_accept( int fd, int resfd, const struct t_call *call, int api_semantics ) argument
[all...]
/illumos-gate/usr/src/lib/libresolv2/common/isc/
H A Deventlib_p.h79 int fd; member in struct:evConn
83 #define EV_CONN_BLOCK 0x0004 /*%< Listener fd was blocking. */
90 int fd; member in struct:evAccept
115 int fd; member in struct:evFile
131 int fd; member in struct:evStream
191 extern short *__fd_eventfield(int fd, __evEmulMask *maskp);
193 extern void __fd_clr(int fd, __evEmulMask *maskp);
194 extern void __fd_set(int fd, __evEmulMask *maskp);
200 #define FD_SET(fd, maskp) \
201 __fd_set(fd, mask
[all...]
/illumos-gate/usr/src/lib/libipd/common/
H A Dlibipd.c106 int fd; local
111 fd = open(path, O_RDWR);
112 if (fd < 0) {
117 return (fd);
121 ipd_close(int fd) argument
123 (void) close(fd);
128 ipd_status_read(int fd, ipd_stathdl_t *ispp) argument
136 if (ioctl(fd, IPDIOC_LIST, &ipil) != 0) {
150 if (ioctl(fd, IPDIOC_LIST, &ipil) != 0) {
248 ipd_ctl(int fd, zoneid_ argument
[all...]
/illumos-gate/usr/src/cmd/sgs/libcrle/common/
H A Ddump.c209 int fd = 0, err, num, _num; local
218 if ((fd = open(MSG_ORIG(MSG_PTH_PROCSTATUS), O_RDONLY)) == -1) {
225 if (read(fd, &prstatus, sizeof (pstatus_t)) != sizeof (pstatus_t)) {
230 (void) close(fd);
233 (void) close(fd);
248 if ((fd = open(MSG_ORIG(MSG_PTH_PROCRMAP), O_RDONLY)) == -1) {
255 (void) fstat(fd, &status);
272 if (read(fd, (void *)maps, size) < 0) {
277 (void) close(fd);
280 (void) close(fd);
[all...]
/illumos-gate/usr/src/cmd/fs.d/ufs/fsirand/
H A Dfsirand.c63 int fd; local
86 fd = open64(dev, pflag ? O_RDONLY : O_RDWR);
87 if (fd == -1) {
92 if (llseek(fd, (offset_t)SBLOCK * DEV_BSIZE, 0) == -1) {
99 if ((n = read(fd, (char *)fs, SBSIZE)) != SBSIZE) {
140 if (llseek(fd, seekaddr, 0) == -1) {
147 n = read(fd, (char *)dibuf, bsize);
164 if (llseek(fd, seekaddr, 0) == -1) {
172 n = write(fd, (char *)dibuf, bsize);
185 if (llseek(fd, (offset_
[all...]
/illumos-gate/usr/src/cmd/sckmd/sparc/sun4u/
H A Dsckmd.c81 static int process_sckm_req(int fd, sckm_ioctl_getreq_t *msg);
82 static int send_sckm_status(int fd, sckm_ioctl_status_t *msg);
100 int fd; local
175 if ((fd = open(KM_DEV, O_RDONLY)) == -1) {
193 if (ioctl(fd, SCKM_IOCTL_GETREQ, &msg) == -1) {
200 if (process_sckm_req(fd, &msg) == -1) {
220 process_sckm_req(int fd, sckm_ioctl_getreq_t *msg) argument
244 return (send_sckm_status(fd, &reply));
251 return (send_sckm_status(fd, &reply));
267 return (send_sckm_status(fd,
343 send_sckm_status(int fd, sckm_ioctl_status_t *msg) argument
[all...]
/illumos-gate/usr/src/cmd/audio/utilities/
H A Dfilehdr.c81 audio_write_filehdr(int fd, Audio_hdr *hdrp, int file_type, char *infop, argument
120 err = write(fd, (char *)buf, (int)blen);
134 audio_rewrite_aiff_filesize(int fd, unsigned int size, unsigned int channels, argument
148 if (lseek(fd, offset, SEEK_SET) < 0) {
151 if (write(fd, &tmp_uint2, sizeof (tmp_uint2)) != sizeof (tmp_uint2)) {
160 if (lseek(fd, offset, SEEK_SET) < 0) {
163 if (write(fd, &tmp_uint2, sizeof (tmp_uint2)) != sizeof (tmp_uint2)) {
172 if (lseek(fd, offset, SEEK_SET) < 0) {
175 if (write(fd, &tmp_uint2, sizeof (tmp_uint2)) != sizeof (tmp_uint2)) {
189 audio_rewrite_au_filesize(int fd, unsigne argument
218 audio_rewrite_wav_filesize(int fd, unsigned int size) argument
261 audio_rewrite_filesize(int fd, int file_type, unsigned int size, unsigned int channels, unsigned int bytes_per_sample) argument
318 audio_read_filehdr(int fd, Audio_hdr *hdrp, int *file_type, char *infop, unsigned int ilen) argument
430 int fd; local
508 decode_aiff(int fd, unsigned char *buf, Audio_hdr *hdrp, int *isize) argument
636 decode_au(int fd, unsigned char *buf, Audio_hdr *hdrp, int *isize, boolean_t read_info) argument
676 decode_wav(int fd, unsigned char *buf, Audio_hdr *hdrp, int *isize) argument
751 audio_decode_filehdr(int fd, unsigned char *buf, int *file_type, Audio_hdr *hdrp, int *isize) argument
[all...]
/illumos-gate/usr/src/uts/common/avs/ns/nsctl/
H A Dnsctl.c522 nsc_fd_t *fd; local
545 fd = nsc_open(op->path, (op->flag & NSC_TYPES), 0, 0, &rc);
547 if (fd == NULL) {
556 if ((rc = nsc_reserve(fd, NSC_PCATCH)) != 0) {
558 (void) nsc_close(fd);
565 _nsc_minor_fd[mindev] = fd;
580 nsc_fd_t *fd; local
588 if ((fd = _nsc_minor_fd[mindev]) != NULL)
589 (void) nsc_close(fd);
607 nsc_fd_t *fd; local
638 nsc_fd_t *fd; local
666 nsc_fd_t *fd; local
695 nsc_fd_t *fd; local
723 nsc_fd_t *fd; local
[all...]
/illumos-gate/usr/src/cmd/oamuser/user/
H A Dproj.c55 int fd; local
64 if ((fd = mkstemp(t_name)) < 0) {
68 if ((t_fptr = fdopen(fd, "w+")) == NULL) {
69 (void) close(fd);
78 if (fchmod(fd, sbuf.st_mode) != 0 ||
79 fchown(fd, sbuf.st_uid, sbuf.st_gid) != 0) {
/illumos-gate/usr/src/cmd/ptools/pwait/
H A Dpwait.c118 if ((pfd->fd = open(psinfofile, O_RDONLY)) >= 0) {
145 if (pfd->fd < 0 || (pfd->revents & ~POLLPRI) == 0) {
160 if (pread(pfd->fd, &psinfo,
179 (void) close(pfd->fd);
180 pfd->fd = -1;
190 do_count(void *nofilesp, int fd) argument
/illumos-gate/usr/src/cmd/fm/modules/common/cpumem-retire/
H A Dcma_cpu_arch.c49 int fd, rc, err; local
68 if ((fd = open("/dev/bl", O_RDONLY)) < 0)
73 (void) close(fd);
80 (void) close(fd);
88 rc = ioctl(fd, repair ? BLIOC_DELETE : BLIOC_INSERT, &blr);
92 (void) close(fd);
/illumos-gate/usr/src/cmd/fs.d/zfs/fstyp/
H A Dfstyp.c45 int fd; member in struct:fstyp_zfs
49 int fstyp_mod_init(int fd, off_t offset, fstyp_mod_handle_t *handle);
55 fstyp_mod_init(int fd, off_t offset, fstyp_mod_handle_t *handle) argument
66 h->fd = fd;
92 if (zpool_read_label(h->fd, &h->config) != 0 ||
/illumos-gate/usr/src/lib/libast/amd64/include/ast/
H A Ddebug.h62 #define DEBUG_PRINT(fd,s,v) do {char _b[1024];write(fd,_b,sfsprintf(_b,sizeof(_b),s,v));} while(0)
63 #define DEBUG_WRITE(fd,d,n) write((fd),(d),(n))
85 #define DEBUG_PRINT(fd,s,v)
86 #define DEBUG_WRITE(fd,d,n)
/illumos-gate/usr/src/lib/libast/common/include/
H A Ddebug.h53 #define DEBUG_PRINT(fd,s,v) do {char _b[1024];write(fd,_b,sfsprintf(_b,sizeof(_b),s,v));} while(0)
54 #define DEBUG_WRITE(fd,d,n) write((fd),(d),(n))
76 #define DEBUG_PRINT(fd,s,v)
77 #define DEBUG_WRITE(fd,d,n)
/illumos-gate/usr/src/lib/libast/common/sfio/
H A Dsfsetfd.c30 static int _sfdup(int fd, int newfd) argument
32 static int _sfdup(fd,newfd)
33 int fd;
40 while((dupfd = sysfcntlf(fd,F_DUPFD,newfd)) < 0 && errno == EINTR)
45 if((dupfd = sysdupf(fd)) < 0 || dupfd >= newfd)
49 newfd = _sfdup(fd,newfd);

Completed in 170 milliseconds

<<11121314151617181920>>