/busybox-1.35.0/miscutils/ |
D | inotifyd.c | 100 struct pollfd pfd; in inotifyd_main() local 118 pfd.fd = inotify_init(); in inotifyd_main() 119 if (pfd.fd < 0) in inotifyd_main() 141 n = inotify_add_watch(pfd.fd, path, mask); in inotifyd_main() 151 pfd.events = POLLIN; in inotifyd_main() 159 n = poll(&pfd, 1, -1); in inotifyd_main() 177 xioctl(pfd.fd, FIONREAD, &len); in inotifyd_main() 179 len = full_read(pfd.fd, buf, len); in inotifyd_main() 211 inotify_rm_watch(pfd.fd, ie->wd); in inotifyd_main()
|
D | microcom.c | 58 struct pollfd pfd[2]; in microcom_main() local 132 pfd[0].fd = sfd; in microcom_main() 133 pfd[0].events = POLLIN; in microcom_main() 134 pfd[1].fd = STDIN_FILENO; in microcom_main() 135 pfd[1].events = POLLIN; in microcom_main() 140 while (!bb_got_signal && poll(pfd, nfd, timeout) > 0) { in microcom_main() 141 if (nfd > 1 && pfd[1].revents) { in microcom_main() 162 safe_poll(pfd, 1, delay); in microcom_main() 165 if (pfd[0].revents) { in microcom_main()
|
D | chat.c | 326 struct pollfd pfd; in chat_main() local 365 pfd.fd = STDIN_FILENO; in chat_main() 366 pfd.events = POLLIN; in chat_main() 368 && poll(&pfd, 1, timeout) > 0 in chat_main() 467 pfd.fd = STDOUT_FILENO; in chat_main() 468 pfd.events = POLLOUT; in chat_main() 470 && poll(&pfd, 1, -1) > 0 in chat_main() 471 && (pfd.revents & POLLOUT) in chat_main()
|
D | conspy.c | 424 struct pollfd pfd; in conspy_main() local 496 pfd.fd = G.kbd_fd; in conspy_main() 497 pfd.events = POLLIN; in conspy_main() 499 switch (poll(&pfd, 1, poll_timeout_ms)) { in conspy_main()
|
D | less.c | 1097 struct pollfd pfd[2]; in getch_nowait() local 1099 pfd[0].fd = STDIN_FILENO; in getch_nowait() 1100 pfd[0].events = POLLIN; in getch_nowait() 1101 pfd[1].fd = kbd_fd; in getch_nowait() 1102 pfd[1].events = POLLIN; in getch_nowait() 1127 r = poll(pfd + rd, 2 - rd, -1); in getch_nowait() 1133 safe_poll(pfd + rd, 2 - rd, -1); in getch_nowait()
|
/busybox-1.35.0/util-linux/ |
D | acpid.c | 256 struct pollfd *pfd; in acpid_main() local 308 pfd = NULL; in acpid_main() 322 pfd = xrealloc_vector(pfd, 1, nfd); in acpid_main() 323 pfd[nfd].fd = fd; in acpid_main() 324 pfd[nfd].events = POLLIN; in acpid_main() 330 while (safe_poll(pfd, nfd, -1) > 0) { in acpid_main() 335 if (!(pfd[i].revents & POLLIN)) { in acpid_main() 336 if (pfd[i].revents == 0) in acpid_main() 342 close(pfd[i].fd); in acpid_main() 345 pfd[i].fd = pfd[i + 1].fd; in acpid_main() [all …]
|
D | script.c | 137 struct pollfd pfd[2]; in script_main() local 146 pfd[0].fd = pty; in script_main() 147 pfd[0].events = POLLIN; in script_main() 148 pfd[1].fd = STDIN_FILENO; in script_main() 149 pfd[1].events = POLLIN; in script_main() 158 if (poll(pfd, fd_count, -1) < 0 && errno != EINTR) { in script_main() 163 if (pfd[0].revents) { in script_main() 188 if (pfd[1].revents) { in script_main() 192 pfd[1].revents = 0; in script_main()
|
D | fdisk_sun.c | 167 FILE *pfd; in sun_autoconfigure_scsi() local 186 pfd = fopen_for_read("/proc/scsi/scsi"); in sun_autoconfigure_scsi() 187 if (!pfd) { in sun_autoconfigure_scsi() 190 while (fgets(buffer2, 2048, pfd)) { in sun_autoconfigure_scsi() 193 if (!fgets(buffer2, 2048, pfd)) in sun_autoconfigure_scsi() 226 fclose(pfd); in sun_autoconfigure_scsi()
|
/busybox-1.35.0/libbb/ |
D | read_key.c | 14 struct pollfd pfd; in read_key() local 115 pfd.fd = fd; in read_key() 116 pfd.events = POLLIN; in read_key() 129 if (safe_poll(&pfd, 1, timeout) == 0) { in read_key() 173 if (safe_poll(&pfd, 1, 50) == 0) { in read_key() 222 if (safe_poll(&pfd, 1, 50) == 0) { in read_key()
|
D | read_printf.c | 50 struct pollfd pfd[1]; in nonblock_immune_read() local 58 pfd[0].fd = fd; in nonblock_immune_read() 59 pfd[0].events = POLLIN; in nonblock_immune_read() 61 safe_poll(pfd, 1, -1); in nonblock_immune_read()
|
D | lineedit.c | 1885 struct pollfd pfd; in ask_terminal() local 1887 pfd.fd = STDIN_FILENO; in ask_terminal() 1888 pfd.events = POLLIN; in ask_terminal() 1889 if (safe_poll(&pfd, 1, 0) == 0) { in ask_terminal()
|
/busybox-1.35.0/networking/ssl_helper-wolfssl/ |
D | ssl_helper.c | 359 static struct pollfd pfd[2] = { variable 363 #define STDIN pfd[0] 364 #define NETWORK pfd[1] 365 #define STDIN_READY() (pfd[0].revents & (POLLIN|POLLERR|POLLHUP)) 366 #define NETWORK_READY() (pfd[1].revents & (POLLIN|POLLERR|POLLHUP)) 374 while (poll(pfd, 2, -1) < 0 && errno == EINTR) in wait_for_input() 407 (pfd[1].revents & POLLIN) ? "POLLIN" : "", in do_io_until_eof_and_exit() 408 (pfd[1].revents & POLLERR) ? "|POLLERR" : "", in do_io_until_eof_and_exit() 409 (pfd[1].revents & POLLHUP) ? "|POLLHUP" : "" in do_io_until_eof_and_exit()
|
/busybox-1.35.0/networking/ssl_helper/ |
D | ssl_helper.c | 125 static struct pollfd pfd[2] = { variable 129 #define STDIN pfd[0] 130 #define NETWORK pfd[1] 131 #define STDIN_READY() (pfd[0].revents & (POLLIN|POLLERR|POLLHUP)) 132 #define NETWORK_READY() (pfd[1].revents & (POLLIN|POLLERR|POLLHUP)) 140 return poll(pfd, 2, -1); in wait_for_input() 274 (pfd[1].revents & POLLIN) ? "POLLIN" : "", in do_io_until_eof_and_exit() 275 (pfd[1].revents & POLLERR) ? "|POLLERR" : "", in do_io_until_eof_and_exit() 276 (pfd[1].revents & POLLHUP) ? "|POLLHUP" : "" in do_io_until_eof_and_exit() 308 if (pfd[1].fd == -1) { in do_io_until_eof_and_exit()
|
/busybox-1.35.0/networking/udhcp/ |
D | arpping.c | 45 struct pollfd pfd[1]; in arpping() local 46 #define s (pfd[0].fd) /* socket */ in arpping() 96 pfd[0].events = POLLIN; in arpping() 97 r = safe_poll(pfd, 1, timeout_ms); in arpping()
|
/busybox-1.35.0/runit/ |
D | runsvdir.c | 84 struct pollfd pfd[1]; member 94 #define pfd (G.pfd ) macro 290 pfd[0].fd = logpipe.rd; in runsvdir_main() 291 pfd[0].events = POLLIN; in runsvdir_main() 368 pfd[0].revents = 0; in runsvdir_main() 374 poll(pfd, 1, deadline*1000); in runsvdir_main() 381 if (pfd[0].revents & POLLIN) { in runsvdir_main()
|
/busybox-1.35.0/shell/ |
D | shell_common.c | 38 struct pollfd pfd[1]; in shell_builtin_read() local 39 #define fd (pfd[0].fd) /* -u FD */ in shell_builtin_read() 126 pfd[0].events = POLLIN; in shell_builtin_read() 127 r = poll(pfd, 1, /*timeout:*/ 0); in shell_builtin_read() 198 pfd[0].events = POLLIN; in shell_builtin_read() 199 if (poll(pfd, 1, timeout) <= 0) { in shell_builtin_read()
|
D | hush.c | 1659 struct pollfd pfd[1]; in refill_HFILE_and_getc() local 1660 pfd[0].fd = fp->fd; in refill_HFILE_and_getc() 1661 pfd[0].events = POLLIN; in refill_HFILE_and_getc() 1662 n = poll(pfd, 1, -1); in refill_HFILE_and_getc()
|
/busybox-1.35.0/networking/ |
D | nslookup.c | 521 struct pollfd pfd; in send_queries() local 529 pfd.events = POLLIN; in send_queries() 530 pfd.fd = xsocket_type(&local_lsa, ns->lsa->u.sa.sa_family, SOCK_DGRAM); in send_queries() 537 xbind(pfd.fd, &local_lsa->u.sa, local_lsa->len); in send_queries() 540 xconnect(pfd.fd, &ns->lsa->u.sa, ns->lsa->len); in send_queries() 541 ndelay_on(pfd.fd); in send_queries() 557 if (write(pfd.fd, G.query[qn].query, G.query[qn].qlen) < 0) { in send_queries() 569 if (poll(&pfd, 1, retry_interval - (tcur - tsent)) <= 0) in send_queries() 572 recvlen = read(pfd.fd, reply, sizeof(reply)); in send_queries() 622 write(pfd.fd, G.query[qn].query, G.query[qn].qlen); in send_queries() [all …]
|
D | httpd.c | 1342 struct pollfd pfd[3]; in cgi_io_loop_and_exit() local 1366 pfd[FROM_CGI].fd = fromCgi_rd; in cgi_io_loop_and_exit() 1367 pfd[FROM_CGI].events = POLLIN; in cgi_io_loop_and_exit() 1368 pfd[TO_CGI].fd = toCgi_wr; in cgi_io_loop_and_exit() 1373 pfd[0].fd = -1; in cgi_io_loop_and_exit() 1374 pfd[0].events = POLLIN; in cgi_io_loop_and_exit() 1375 pfd[0].revents = 0; /* probably not needed, paranoia */ in cgi_io_loop_and_exit() 1384 pfd[TO_CGI].events = POLLOUT; in cgi_io_loop_and_exit() 1385 pfd[TO_CGI].revents = 0; /* needed! */ in cgi_io_loop_and_exit() 1390 pfd[0].fd = 0; in cgi_io_loop_and_exit() [all …]
|
D | tftp.c | 312 struct pollfd pfd[1]; variable 313 #define socket_fd (pfd[0].fd) 566 pfd[0].events = POLLIN; 567 switch (safe_poll(pfd, 1, waittime_ms)) {
|
D | traceroute.c | 466 struct pollfd pfd[1]; in wait_for_reply() local 469 pfd[0].fd = rcvsock; in wait_for_reply() 470 pfd[0].events = POLLIN; in wait_for_reply() 471 if (*left_ms >= 0 && safe_poll(pfd, 1, *left_ms) > 0) { in wait_for_reply()
|
D | ntpd.c | 2470 struct pollfd *pfd; in ntpd_main() local 2482 pfd = xzalloc(sizeof(pfd[0]) * cnt); in ntpd_main() 2508 pfd[0].fd = G_listen_fd; in ntpd_main() 2509 pfd[0].events = POLLIN; in ntpd_main() 2550 pfd[i].fd = p->p_fd; in ntpd_main() 2551 pfd[i].events = POLLIN; in ntpd_main() 2570 nfds = poll(pfd, i, 1000); in ntpd_main() 2578 nfds = poll(pfd, i, timeout * 1000); in ntpd_main() 2625 if (pfd[0].revents /* & (POLLIN|POLLERR)*/) { in ntpd_main() 2634 if (pfd[j].revents /* & (POLLIN|POLLERR)*/) { in ntpd_main()
|
/busybox-1.35.0/procps/ |
D | powertop.c | 695 struct pollfd pfd[1]; in powertop_main() local 697 pfd[0].fd = 0; in powertop_main() 698 pfd[0].events = POLLIN; in powertop_main() 750 if (safe_poll(pfd, 1, DEFAULT_SLEEP * 1000) > 0) { in powertop_main()
|
/busybox-1.35.0/editors/ |
D | vi.c | 611 struct pollfd pfd[1]; in mysleep() local 616 pfd[0].fd = STDIN_FILENO; in mysleep() 617 pfd[0].events = POLLIN; in mysleep() 618 return safe_poll(pfd, 1, hund*10) > 0; in mysleep()
|