Lines Matching refs:ufds
36 static struct pollfd *ufds; variable
362 new_ufds = realloc(ufds, sizeof(ufds[0]) * (nfds + 1)); in open_device()
367 ufds = new_ufds; in open_device()
403 ufds[nfds].fd = fd; in open_device()
404 ufds[nfds].events = POLLIN; in open_device()
421 memmove(ufds + i, ufds + i + 1, sizeof(ufds[0]) * count); in close_device()
614 ufds = calloc(1, sizeof(ufds[0])); in getevent_main()
615 ufds[0].fd = inotify_init(); in getevent_main()
616 ufds[0].events = POLLIN; in getevent_main()
628 res = inotify_add_watch(ufds[0].fd, device_path, IN_DELETE | IN_CREATE); in getevent_main()
643 res = ioctl(ufds[i].fd, EVIOCGSW(1), &sw); in getevent_main()
658 poll(ufds, nfds, -1); in getevent_main()
660 if(ufds[0].revents & POLLIN) { in getevent_main()
661 read_notify(device_path, ufds[0].fd, print_flags); in getevent_main()
664 if(ufds[i].revents) { in getevent_main()
665 if(ufds[i].revents & POLLIN) { in getevent_main()
666 res = read(ufds[i].fd, &event, sizeof(event)); in getevent_main()