Home
last modified time | relevance | path

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

123

/illumos-gate/usr/src/cmd/prstat/
H A Dprfile.c65 fd_close(fd_t *fdp) in fd_close() argument
67 if (fdp) { in fd_close()
68 if (fdp->fd_fd >= 0 && fdp->fd_name[0] != '\0') { in fd_close()
69 (void) close(fdp->fd_fd); in fd_close()
73 (void) memset(fdp, 0, sizeof (fd_t)); in fd_close()
74 fdp->fd_fd = -1; in fd_close()
81 fd_t *fdp = fd_tbl; in fd_closeall() local
85 fd_close(fdp); in fd_closeall()
86 fdp++; in fd_closeall()
93 fd_t *fdp = fd_tbl; in fd_recycle() local
[all …]
/illumos-gate/usr/src/cmd/mdb/common/mdb/
H A Dmdb_fdio.c57 fd_data_t *fdp = io->io_data; in fdio_read() local
60 return (read(fdp->fd_fd, buf, nbytes)); in fdio_read()
68 fd_data_t *fdp = io->io_data; in fdio_write() local
71 return (write(fdp->fd_fd, buf, nbytes)); in fdio_write()
79 fd_data_t *fdp = io->io_data; in fdio_seek() local
82 return (lseek64(fdp->fd_fd, offset, whence)); in fdio_seek()
90 fd_data_t *fdp = io->io_data; in fdio_ctl() local
96 return (fdp->fd_fd); in fdio_ctl()
98 return (ioctl(fdp->fd_fd, req, arg)); in fdio_ctl()
104 fd_data_t *fdp = io->io_data; in fdio_close() local
[all …]
/illumos-gate/usr/src/uts/common/io/
H A Dfd.c146 #define KIOSP KSTAT_IO_PTR(fdp->d_iostat)
226 struct fdisk *fdp = NULL; in fd_getinfo() local
231 (void) fd_getdrive(dev, &fjp, &fdp); in fd_getinfo()
236 if (fjp && fdp) { in fd_getinfo()
344 struct fdisk *fdp; in fd_attach() local
427 fdp = ddi_get_soft_state(fd_state_head, drive_num); in fd_attach()
428 fjp = fdp->d_obj = ddi_get_driver_private(dip); in fd_attach()
431 sema_init(&fdp->d_ocsem, 1, NULL, SEMA_DRIVER, NULL); in fd_attach()
433 fjp->fj_drive = (struct fd_drive *)(fdp + 1); in fd_attach()
443 fdp->d_media = 1<<FMT_5H | 1<<FMT_5D9 | 1<<FMT_5D8 | in fd_attach()
[all …]
/illumos-gate/usr/src/cmd/lp/lib/msgs/
H A Dmlisten.c88 struct pollfd * fdp; in mlistenadd() local
122 fdp = PollFdList + (NumCons + NumNewCons); in mlistenadd()
123 fdp->fd = md->readfd; in mlistenadd()
124 fdp->events = events; in mlistenadd()
125 fdp->revents = 0; in mlistenadd()
174 struct pollfd * fdp; in mlisten() local
274 fdp = PollFdList + x; in mlisten()
276 if (fdp->revents == 0) in mlisten()
284 if (fdp->revents != POLLIN) in mlisten()
302 fdp->revents = 0; in mlisten()
[all …]
/illumos-gate/usr/src/common/fs/
H A Dbootfsops.c235 bf_fd_t *fdp = &fds[fd]; in bbootfs_read() local
237 if (fdp->fd_file == NULL) in bbootfs_read()
240 if (fdp->fd_pos >= fdp->fd_file->bf_size) in bbootfs_read()
243 if (fdp->fd_pos + size > fdp->fd_file->bf_size) in bbootfs_read()
244 len = fdp->fd_file->bf_size - fdp->fd_pos; in bbootfs_read()
248 bcopy(fdp->fd_file->bf_addr + fdp->fd_pos, buf, len); in bbootfs_read()
250 fdp->fd_pos += len; in bbootfs_read()
258 bf_fd_t *fdp = &fds[fd]; in bbootfs_lseek() local
260 if (fdp->fd_file == NULL) in bbootfs_lseek()
265 fdp->fd_pos += addr; in bbootfs_lseek()
[all …]
/illumos-gate/usr/src/cmd/ipf/lib/
H A Dprint_toif.c15 void print_toif(tag, fdp) in print_toif() argument
17 frdest_t *fdp;
19 printf("%s %s", tag, fdp->fd_ifname);
21 if (!fdp->fd_ifp)
25 if (use_inet6 && IP6_NOTZERO(&fdp->fd_ip6.in6)) {
28 inet_ntop(AF_INET6, &fdp->fd_ip6, ipv6addr,
33 if (fdp->fd_ip.s_addr)
34 printf(":%s", inet_ntoa(fdp->fd_ip));
/illumos-gate/usr/src/cmd/sgs/rtld/common/
H A Danalyze.c1139 file_open(int err, Lm_list *lml, Rt_map *clmp, uint_t flags, Fdesc *fdp, in file_open() argument
1145 const char *oname = fdp->fd_oname, *nname = fdp->fd_nname; in file_open()
1149 if ((nname = stravl_insert(fdp->fd_nname, hash, 0, 0)) == NULL) in file_open()
1151 fdp->fd_nname = nname; in file_open()
1153 if ((err == 0) && (fdp->fd_flags & FLG_FD_ALTER)) in file_open()
1164 &(fdp->fd_avlwhere))) != NULL) { in file_open()
1165 fdp->fd_lmp = nlmp; in file_open()
1204 if (fdp->fd_flags & FLG_FD_ALTER) in file_open()
1227 fdp->fd_flags |= FLG_FD_RESOLVED; in file_open()
1242 fdp->fd_lmp = nlmp; in file_open()
[all …]
H A Dcap.c291 cap_check(Cap *cptr, char *strs, int alt, Fdesc *fdp, Rej_desc *rej) in cap_check() argument
323 if (fdp) in cap_check()
324 fdp->fd_scapset.sc_hw_1 = val; in cap_check()
329 if (fdp) in cap_check()
330 fdp->fd_scapset.sc_sf_1 = val; in cap_check()
335 if (fdp) in cap_check()
336 fdp->fd_scapset.sc_hw_2 = val; in cap_check()
352 else if (fdp) in cap_check()
353 fdp->fd_scapset.sc_plat = str; in cap_check()
370 else if (fdp) in cap_check()
[all …]
H A Dpaths.c1184 fullpath(Rt_map *lmp, Fdesc *fdp) in fullpath() argument
1191 if (fdp && (fdp->fd_flags & FLG_FD_RESOLVED)) { in fullpath()
1198 if (fdp->fd_pname) in fullpath()
1199 PATHNAME(lmp) = fdp->fd_pname; in fullpath()
1211 if (fdp && fdp->fd_pname) in fullpath()
1212 PATHNAME(lmp) = fdp->fd_pname; in fullpath()
/illumos-gate/usr/src/cmd/sendmail/db/os/
H A Dos_open.c33 __db_open(name, arg_flags, ok_flags, mode, fdp) in __db_open() argument
36 int mode, *fdp;
93 if ((ret = __os_open(name, flags, mode, fdp)) != 0)
112 if (fcntl(*fdp, F_SETFD, 1) == -1) {
115 (void)__os_close(*fdp);
129 __os_open(name, flags, mode, fdp) in __os_open() argument
131 int flags, mode, *fdp;
133 *fdp = __db_jump.j_open != NULL ?
135 return (*fdp == -1 ? errno : 0);
/illumos-gate/usr/src/contrib/ast/src/lib/libcmd/
H A Dmktemp.c75 int* fdp = &fd; in b_mktemp() local
87 fdp = 0; in b_mktemp()
108 fdp = 0; in b_mktemp()
128 mode = (fdp ? (S_IRUSR|S_IWUSR) : S_IRWXU) & ~mask; in b_mktemp()
146 if (!pathtemp(path, sizeof(path), dir, pfx, fdp)) in b_mktemp()
154 if (fdp || unsafe || !mkdir(path, mode)) in b_mktemp()
156 if (fdp) in b_mktemp()
157 close(*fdp); in b_mktemp()
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/bltins/
H A Dshiocmd_solaris.c495 struct filedata *fdp; in b_open() local
583 fdp = (struct filedata*)np->nvalue; in b_open()
584 fstat(fd, &fdp->statb); in b_open()
585 fdp->fd = fd; in b_open()
586 fdp->name = strdup(argv[1]); in b_open()
666 struct filedata *fdp; in b_tmpfile() local
706 fdp = (struct filedata*)np->nvalue; in b_tmpfile()
708 fstat(fd, &fdp->statb); in b_tmpfile()
709 fdp->fd = fd; in b_tmpfile()
710 fdp->name = NULL; in b_tmpfile()
[all …]
/illumos-gate/usr/src/uts/common/fs/fifofs/
H A Dfifosubr.c174 fifodata_t *fdp = buf; in fnode_constructor() local
175 fifolock_t *flp = &fdp->fifo_lock; in fnode_constructor()
176 fifonode_t *fnp = &fdp->fifo_fnode[0]; in fnode_constructor()
227 fifodata_t *fdp = buf; in fnode_destructor() local
228 fifolock_t *flp = &fdp->fifo_lock; in fnode_destructor()
229 fifonode_t *fnp = &fdp->fifo_fnode[0]; in fnode_destructor()
269 fifodata_t *fdp = buf; in pipe_constructor() local
270 fifonode_t *fnp1 = &fdp->fifo_fnode[0]; in pipe_constructor()
271 fifonode_t *fnp2 = &fdp->fifo_fnode[1]; in pipe_constructor()
293 fifodata_t *fdp = buf; in pipe_destructor() local
[all …]
/illumos-gate/usr/src/lib/libgen/common/
H A Dp2open.c109 __p2close(int *fdp, FILE **fpp, int kill_sig) in __p2close() argument
116 if (fdp != NULL) { in __p2close()
117 fds[0] = fdp[0]; in __p2close()
118 fds[1] = fdp[1]; in __p2close()
137 if (fdp != NULL) { in __p2close()
/illumos-gate/usr/src/cmd/ttymon/
H A Dtmhandler.c213 do_poll(struct pollfd *fdp, int nfds) in do_poll() argument
218 n = poll(fdp, (unsigned long)nfds, -1); /* blocked poll */ in do_poll()
227 for (i = 0; (i < nfds) && (n != 0); i++, fdp++) { in do_poll()
228 if (fdp->revents != 0) { in do_poll()
230 if ((pmptr = find_fd(fdp->fd)) == NULL) { in do_poll()
232 fdp->fd); in do_poll()
234 } else if (fdp->revents & POLLHUP) { in do_poll()
236 } else if (fdp->revents & POLLIN) { in do_poll()
241 } else if (fdp->revents & POLLERR) { in do_poll()
243 getpid(), fdp->fd); in do_poll()
/illumos-gate/usr/src/uts/sun4u/serengeti/io/
H A Dssm.c1014 sg_system_fru_descriptor_t *fdp; in ssm_dr_event_handler() local
1018 fdp = (sg_system_fru_descriptor_t *)(((sbbc_msg_t *)arg)->msg_buf); in ssm_dr_event_handler()
1019 if (fdp == NULL) { in ssm_dr_event_handler()
1026 DPRINTF(SSM_EVENT_DEBUG, ("\tnode\t%d\n", fdp->node)); in ssm_dr_event_handler()
1027 DPRINTF(SSM_EVENT_DEBUG, ("\tslot\t%d\n", fdp->slot)); in ssm_dr_event_handler()
1028 DPRINTF(SSM_EVENT_DEBUG, ("\tparent_hdl\t0x%lx\n", fdp->parent_hdl)); in ssm_dr_event_handler()
1029 DPRINTF(SSM_EVENT_DEBUG, ("\tchild_hdl\t0x%lx\n", fdp->child_hdl)); in ssm_dr_event_handler()
1031 EVNT2STR(fdp->event_details))); in ssm_dr_event_handler()
1034 switch (fdp->event_details) { in ssm_dr_event_handler()
1047 (void) ssm_generate_event(fdp->node, fdp->slot, hint); in ssm_dr_event_handler()
/illumos-gate/usr/src/contrib/ast/src/lib/libast/path/
H A Dpathtmp.c35 pathtmp(char* buf, const char* dir, const char* pfx, int* fdp) in pathtmp() argument
40 return pathtemp(buf, len, dir, pfx, fdp); in pathtmp()
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/os/
H A Dwrite_msg.c34 krb5_write_message(krb5_context context, krb5_pointer fdp, krb5_data *outbuf) in krb5_write_message() argument
37 int fd = *( (int *) fdp); in krb5_write_message()
H A Dread_msg.c34 krb5_read_message(krb5_context context, krb5_pointer fdp, krb5_data *inbuf) in krb5_read_message() argument
39 int fd = *( (int *) fdp); in krb5_read_message()
/illumos-gate/usr/src/cmd/sendmail/db/db/
H A Ddb_appinit.c328 __db_appname(dbenv, appname, dir, file, tmp_oflags, fdp, namep) in __db_appname() argument
333 int *fdp;
350 if (fdp != NULL)
351 *fdp = -1;
511 (ret = __db_tmp_open(dbenv, tmp_oflags, start, fdp)) != 0) {
643 __db_tmp_open(dbenv, flags, path, fdp) in __db_tmp_open() argument
647 int *fdp;
699 if ((ret = __db_open(path, flags, flags, mode, fdp)) == 0)
/illumos-gate/usr/src/test/zfs-tests/cmd/mmapwrite/
H A Dmmapwrite.c45 mapper(void *fdp) in mapper() argument
48 int fd = *(int *)fdp; in mapper()
/illumos-gate/usr/src/cmd/ipf/tools/
H A Dip_fil.c486 void fr_resolvedest(fdp, v, ifs) in fr_resolvedest() argument
487 frdest_t *fdp; in fr_resolvedest()
491 fdp->fd_ifp = NULL;
493 if (*fdp->fd_ifname) {
494 fdp->fd_ifp = GETIFP(fdp->fd_ifname, v, ifs);
495 if (!fdp->fd_ifp)
496 fdp->fd_ifp = (struct ifnet *)-1;
767 int fr_fastroute(m, mpp, fin, fdp) in fr_fastroute() argument
770 frdest_t *fdp;
772 struct ifnet *ifp = fdp->fd_ifp;
/illumos-gate/usr/src/contrib/ast/src/lib/libast/comp/
H A Dmktemp.c44 temp(char* buf, int* fdp) in temp() argument
67 if (!pathtemp(buf, len, d, s, fdp)) in temp()
/illumos-gate/usr/src/cmd/fs.d/smbclnt/fksmbcl/
H A Dfkiod_cl.c67 smb_iod_open_door(int *fdp) in smb_iod_open_door() argument
69 *fdp = -1; in smb_iod_open_door()
/illumos-gate/usr/src/cmd/nohup/
H A Dnohup.c247 int *fdp; in fd_cb() local
272 fdp = &g_rdfd; in fd_cb()
276 fdp = &g_wrfd; in fd_cb()
281 if (*fdp < 0) { in fd_cb()
300 *fdp = fd; in fd_cb()
302 (void) pr_fcntl(g_proc, *fdp, F_DUP2FD, (void *)(uintptr_t)fd, in fd_cb()

123