/titanic_50/usr/src/cmd/dtrace/test/tst/common/io/ |
H A D | tst.fds.d.out | 1 fds[0] fi_name = mm@0:null 2 fds[0] fi_dirname = /devices/pseudo 3 fds[0] fi_pathname = /devices/pseudo/mm@0:null 4 fds[0] fi_fs = specfs 5 fds[0] fi_mount = /devices 6 fds[0] fi_offset = 0 7 fds[0] fi_oflags = 0x0 8 fds[1] fi_name = mm@0:null 9 fds[1] fi_dirname = /devices/pseudo 10 fds[1] fi_pathname = /devices/pseudo/mm@0:null [all …]
|
H A D | tst.fds.c | 49 int i, n, fds[10]; in main() local 79 fds[n++] = open(file, O_RDONLY); in main() 80 fds[n++] = open(file, O_WRONLY); in main() 81 fds[n++] = open(file, O_RDWR); in main() 83 fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_DSYNC | in main() 87 fds[n++] = open(file, O_RDWR); in main() 88 (void) lseek(fds[n - 1], 123, SEEK_SET); in main() 96 (void) ioctl(fds[i], -1, NULL); in main() 98 assert(n <= sizeof (fds) / sizeof (fds[0])); in main()
|
H A D | tst.fds.d | 41 printf("fds[%d] fi_name = %s\n", arg0, fds[arg0].fi_name); 42 printf("fds[%d] fi_dirname = %s\n", arg0, fds[arg0].fi_dirname); 43 printf("fds[%d] fi_pathname = %s\n", arg0, fds[arg0].fi_pathname); 44 printf("fds[%d] fi_fs = %s\n", arg0, fds[arg0].fi_fs); 45 printf("fds[%d] fi_mount = %s\n", arg0, fds[arg0].fi_mount); 46 printf("fds[%d] fi_offset = %d\n", arg0, fds[arg0].fi_offset); 47 printf("fds[%d] fi_oflags = 0x%x\n", arg0, fds[arg0].fi_oflags);
|
/titanic_50/usr/src/lib/libgen/common/ |
H A D | p2open.c | 53 int fds[2]; in p2open() local 55 if (__p2open(cmd, fds) == -1) in p2open() 58 fp[0] = fdopen(fds[0], "w"); in p2open() 59 fp[1] = fdopen(fds[1], "r"); in p2open() 70 __p2open(const char *cmd, int fds[2]) in __p2open() 105 fds[0] = tocmd[1]; in __p2open() 106 fds[1] = fromcmd[0]; in __p2open() 113 int fds[2]; in __p2close() local 119 fds[0] = fdp[0]; in __p2close() 120 fds[1] = fdp[1]; in __p2close() [all …]
|
/titanic_50/usr/src/cmd/prstat/ |
H A D | prfile.c | 186 fds_t *fds; in fds_rm() local 190 for (fds = fds_tbl[hash]; fds && fds->fds_pid != pid; in fds_rm() 191 fds = fds->fds_next) /* finding pid */ in fds_rm() 192 fds_prev = fds; in fds_rm() 194 if (fds) { /* if pid was found */ in fds_rm() 196 fd_close(fds->fds_psinfo); in fds_rm() 197 fd_close(fds->fds_usage); in fds_rm() 198 fd_close(fds->fds_lpsinfo); in fds_rm() 199 fd_close(fds->fds_lusage); in fds_rm() 202 fds_prev->fds_next = fds->fds_next; in fds_rm() [all …]
|
/titanic_50/usr/src/cmd/lp/lib/msgs/ |
H A D | mcreate.c | 49 int fds[2]; local 52 if (pipe(fds) != 0) 56 if (ioctl(fds[1], I_PUSH, "connld") != 0) 60 if (fattach(fds[1], path) != 0) 70 md->readfd = fds[0]; 75 md->writefd = fds[1]; 77 md->writefd = fds[0]; 78 close(fds[1]);
|
H A D | streamio.c | 59 struct pollfd fds; in Putmsg() local 61 fds.fd = mdp->writefd; in Putmsg() 62 fds.events = POLLOUT; in Putmsg() 63 fds.revents = 0; in Putmsg() 65 (void) poll(&fds, 1, 1000); in Putmsg() 66 if (fds.revents & (POLLHUP | POLLERR | POLLNVAL)) { in Putmsg() 71 if (!(fds.revents & POLLOUT)) { in Putmsg()
|
H A D | mconnect.c | 106 int fds[2]; local 108 if (pipe(fds) != 0) 111 if (ioctl(fd, I_SENDFD, fds[1]) != 0) 116 fd = fds[0]; 117 (void)_Close(fds[1]);
|
/titanic_50/usr/src/lib/libc/port/gen/ |
H A D | closefrom.c | 62 int *fds; in fdwalk() local 68 fds = alloca(FDS_SZ); in fdwalk() 81 fds = memcpy(alloca(fds_sz * 2), fds, fds_sz); in fdwalk() 84 fds[nfds++] = i; in fdwalk() 99 fds = memcpy(alloca(fds_sz * 2), fds, fds_sz); in fdwalk() 102 fds[nfds++] = i; in fdwalk() 117 if ((rv = func(cd, fds[i])) != 0) in fdwalk()
|
H A D | poll.c | 34 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()
|
/titanic_50/usr/src/lib/libbc/libc/sys/common/ |
H A D | fdlist.c | 35 int fds[NUM_FD]; member 50 lst->fds[i] = -1; in fd_init() 58 fd_add(int fd, int fds) in fd_add() argument 69 fdc->fds[i] = fds; in fd_add() 90 fdtail->fds[0] = fds; in fd_add() 105 fdc->fds[i] = -1; in fd_rem() 124 return (fdc->fds[i]); in fd_get()
|
H A D | dup.c | 33 int ret, fds; in dup() local 38 if ((fds = fd_get(fd)) != -1) in dup() 39 fd_add(ret, fds); in dup()
|
/titanic_50/usr/src/cmd/cmd-inet/sbin/dhcpagent/ |
H A D | script_handler.c | 286 int fds[2]; in script_start() local 308 if (pipe(fds) < 0) { in script_start() 315 (void) close(fds[0]); in script_start() 316 (void) close(fds[1]); in script_start() 325 (void) close(fds[0]); in script_start() 328 run_script(dsmp, event, fds[1]); in script_start() 332 (void) close(fds[1]); in script_start() 335 if (read(fds[0], &dsmp->dsm_script_pid, sizeof (pid_t)) != in script_start() 339 (void) close(fds[0]); in script_start() 344 event_id = iu_register_event(eh, fds[0], POLLIN, script_exit, dsmp); in script_start() [all …]
|
/titanic_50/usr/src/cmd/ssh/ssh-http-proxy-connect/ |
H A D | ssh-http-proxy-connect.c | 106 struct pollfd fds[2]; in main() local 248 fds[0].fd = STDIN_FILENO; /* Poll stdin for data. */ in main() 249 fds[1].fd = sock; /* Poll the socket for data. */ in main() 250 fds[0].events = fds[1].events = POLLIN; in main() 253 if (poll(fds, 2, INFTIM) == -1) { in main() 260 if (fds[0].revents & POLLIN) { in main() 265 } else if (fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) { in main() 271 if (fds[1].revents & POLLIN) { in main() 276 } else if (fds[1].revents & (POLLERR | POLLHUP | POLLNVAL)) { in main()
|
/titanic_50/usr/src/cmd/ttymon/ |
H A D | tmpeek.c | 67 struct pollfd fds[1]; in poll_data() local 77 fds[0].fd = 0; in poll_data() 78 fds[0].events = POLLIN; in poll_data() 86 if ((j = poll(fds,1,-1)) == -1) { in poll_data() 95 if (fds[0].revents & POLLHUP) { in poll_data() 99 if (fds[0].revents & POLLIN) { in poll_data() 100 ptr = do_peek(fds[0].fd, 255); in poll_data() 102 return(process(fds[0].fd,ptr)); in poll_data()
|
/titanic_50/usr/src/lib/libast/common/sfio/ |
H A D | sfpoll.c | 101 { struct pollfd* fds; local 109 if(!(fds = (struct pollfd*)malloc(m*sizeof(struct pollfd))) ) 115 fds[m].fd = f->file; 116 fds[m].events = fds[m].revents = 0; 119 fds[m].events |= POLLOUT; 125 fds[m].fd = f->proc->file; 126 fds[m].revents = 0; 129 fds[m].events |= POLLIN; 133 while((np = SFPOLL(fds,m,tm)) < 0 ) 145 { if(fds[m].revents&POLLOUT) [all …]
|
H A D | sfpkrd.c | 215 int fds[2]; local 219 …recv_peek_ok = (!pipe(fds) && write(fds[1], tst, 2) && recv(fds[0], tst, 1, MSG_PEEK) == 1 && tst[… 220 close(fds[0]); 221 close(fds[1]);
|
/titanic_50/usr/src/test/os-tests/tests/poll/ |
H A D | poll_test.c | 163 poll_wrapper(pollfd_t *fds, nfds_t nfds, int timeout, time_t *elapsed) in poll_wrapper() argument 168 debug_log("POLL start: (0x%p, %d, %d)\n", fds, nfds, timeout); in poll_wrapper() 170 ret = poll(fds, nfds, timeout); in poll_wrapper() 175 fds, nfds, timeout, ret, (*elapsed)); in poll_wrapper() 181 dppoll(int pollfd, pollfd_t *fds, nfds_t nfds, int timeout, time_t *elapsed) in dppoll() argument 187 arg.dp_fds = fds; in dppoll() 191 debug_log("DP_POLL start: (0x%p, %d, %d)\n", fds, nfds, timeout); in dppoll() 198 fds, arg.dp_nfds, arg.dp_timeout, ret, (*elapsed)); in dppoll() 325 pollfd_t fds[5]; in dev_poll_with_fds_test() local 337 fds[0].fd = testfd; in dev_poll_with_fds_test() [all …]
|
/titanic_50/usr/src/cmd/ssh/ssh-socks5-proxy-connect/ |
H A D | ssh-socks5-proxy-connect.c | 250 struct pollfd fds[2]; in main() local 346 fds[0].fd = STDIN_FILENO; /* Poll stdin for data. */ in main() 347 fds[1].fd = sock; /* Poll the socket for data. */ in main() 348 fds[0].events = fds[1].events = POLLIN; in main() 351 if (poll(fds, 2, INFTIM) == -1) { in main() 358 if (fds[0].revents & POLLIN) { in main() 363 } else if (fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) { in main() 369 if (fds[1].revents & POLLIN) { in main() 374 } else if (fds[1].revents & (POLLERR | POLLHUP | POLLNVAL)) { in main()
|
/titanic_50/usr/src/cmd/bnu/ |
H A D | unknown.c | 96 int fds[2]; local 114 if ( setuid(getuid()) == -1 || pipe(fds) != 0 115 || write(fds[1], ebuf, strlen(ebuf)) != strlen(ebuf) 116 || close(fds[1]) != 0 ) 119 if ( fds[0] != 0 ) { 121 if ( dup(fds[0]) != 0 )
|
/titanic_50/usr/src/common/fs/ |
H A D | bootfsops.c | 59 static bf_fd_t fds[MAX_FDS]; variable 209 if (fds[i].fd_file == NULL) { in bbootfs_open() 210 fds[i].fd_file = fp; in bbootfs_open() 211 fds[i].fd_pos = 0; in bbootfs_open() 222 if (fds[fd].fd_file == NULL) in bbootfs_close() 225 fds[fd].fd_file = NULL; in bbootfs_close() 226 fds[fd].fd_pos = 0; in bbootfs_close() 235 bf_fd_t *fdp = &fds[fd]; in bbootfs_read() 258 bf_fd_t *fdp = &fds[fd]; in bbootfs_lseek() 283 bf_fd_t *fdp = &fds[fd]; in bbootfs_fstat()
|
/titanic_50/usr/src/lib/print/libpapi-lpd/common/ |
H A D | lpd-misc.c | 128 int ac, rc = -1, fds[2]; in lpd_open() local 175 pipe(fds); in lpd_open() 177 socketpair(AF_UNIX, SOCK_STREAM, 0, fds); in lpd_open() 184 dup2(fds[1], 1); in lpd_open() 196 rc = recvfd(fds[0]); in lpd_open() 199 close(fds[0]); in lpd_open() 200 close(fds[1]); in lpd_open()
|
/titanic_50/usr/src/cmd/hal/addons/network-devices/ |
H A D | snmp.c | 103 int fds = 0, block = 0; in scan_for_devices_using_snmp() local 108 snmp_select_info(&fds, &fdset, &timeout, &block); in scan_for_devices_using_snmp() 109 fds = select(fds, &fdset, NULL, NULL, block ? NULL : &timeout); in scan_for_devices_using_snmp() 110 if (fds < 0) { in scan_for_devices_using_snmp() 113 } if (fds == 0) { in scan_for_devices_using_snmp()
|
/titanic_50/usr/src/lib/libdiskmgt/common/ |
H A D | inuse_mnt.c | 365 struct pollfd fds[1]; in watch_mnttab() local 368 if ((fds[0].fd = open("/etc/mnttab", O_RDONLY)) != -1) { in watch_mnttab() 373 (void) read(fds[0].fd, buf, (size_t)(sizeof (buf) - 1)); in watch_mnttab() 374 (void) lseek(fds[0].fd, 0, SEEK_SET); in watch_mnttab() 376 fds[0].events = POLLRDBAND; in watch_mnttab() 377 while (res = poll(fds, (nfds_t)1, -1)) { in watch_mnttab() 383 (void) read(fds[0].fd, buf, (size_t)(sizeof (buf) - 1)); in watch_mnttab() 384 (void) lseek(fds[0].fd, 0, SEEK_SET); in watch_mnttab()
|
/titanic_50/usr/src/lib/libslp/clib/ |
H A D | slp_net.c | 701 struct pollfd **fds, nfds_t *nfds, in make_mc_target() argument 718 *fds = NULL; in make_mc_target() 761 if (!(*fds = calloc(num_givenifs, sizeof (**fds)))) { in make_mc_target() 777 free_pfds(*fds, *nfds); in make_mc_target() 782 (*fds)[i].fd = fd; in make_mc_target() 783 (*fds)[i].events |= POLLRDNORM; in make_mc_target() 838 if (*fds && !have_valid_if) { in make_mc_target() 840 free(*fds); in make_mc_target() 844 if (!(*fds = calloc(1, sizeof (**fds)))) { in make_mc_target() 854 free(*fds); in make_mc_target() [all …]
|