Lines Matching refs:fd
50 int fd = (int)arg;
59 fprintf(stderr, "hid_thread start fd: %d\n", fd);
61 if (ioctl(fd, HIDIOCGRDESCSIZE, &desc_length)) {
63 close(fd);
68 if (ioctl(fd, HIDIOCGRDESC, &desc)) {
70 close(fd);
75 fprintf(stderr, "waiting for device fd: %d\n", fd);
109 ret = read(fd, buffer, sizeof(buffer));
111 fprintf(stderr, "read failed, errno: %d, fd: %d\n", errno, fd);
137 int fd = open(path, O_RDWR);
138 if (fd < 0) return;
142 pthread_create(&th, NULL, hid_thread, (void *)(uintptr_t)fd);