Lines Matching defs:fd
78 static int usb_do_io(int fd, int stat_fd, char *data, size_t size, int flag);
79 static int usb_send_msg(int fd, int stat_fd, int requesttype, int request,
83 static int usb_get_status(int fd);
1200 usb_send_msg(int fd, int stat_fd, int requesttype, int request, int value,
1224 rval = usb_do_io(fd, stat_fd, (char *)&req,
1237 rval = usb_do_io(fd, stat_fd, buffer,
1254 usb_do_io(int fd, int stat_fd, char *data, size_t size, int flag)
1269 ret = read(fd, data, size);
1274 ret = write(fd, data, size);
1383 int fd, fdstat, index, rval;
1510 if ((fd = open(filename, mode)) == -1) {
1522 info->ep_fd[index] = fd;
2262 usb_get_device_status(int fd)
2268 error = (int)read(fd, &status, (size_t)sizeof (status));
2384 int fd;
2424 if ((fd = open(filename, O_RDONLY|O_EXCL)) < 0) {
2432 if (usb_get_device_status(fd) != USB_DEV_STAT_ONLINE) {
2433 (void) close(fd);
2441 (void) close(fd);
2464 usb_get_status(int fd)
2468 usb_dprintf(DEBUG_FUNCTIONS, "usb_get_status(): fd=%d\n", fd);
2470 error = (int)read(fd, &status, sizeof (status));