Lines Matching refs:dev_name
82 char dev_name[64]; member
323 struct usb_device *usb_device_open(const char *dev_name) in usb_device_open() argument
328 D("usb_device_open %s\n", dev_name); in usb_device_open()
335 if (access(dev_name, R_OK | W_OK) == 0) { in usb_device_open()
339 if (access(dev_name, R_OK) == 0) { in usb_device_open()
341 writeable = (access(dev_name, R_OK | W_OK) == 0); in usb_device_open()
351 fd = open(dev_name, O_RDWR); in usb_device_open()
353 fd = open(dev_name, O_RDONLY); in usb_device_open()
358 struct usb_device* result = usb_device_new(dev_name, fd); in usb_device_open()
370 struct usb_device *usb_device_new(const char *dev_name, int fd) in usb_device_new() argument
375 D("usb_device_new %s fd: %d\n", dev_name, fd); in usb_device_new()
384 strncpy(device->dev_name, dev_name, sizeof(device->dev_name) - 1); in usb_device_new()
404 int fd = open(device->dev_name, O_RDWR); in usb_device_reopen_writeable()
424 return device->dev_name; in usb_device_get_name()
430 sscanf(device->dev_name, USB_FS_ID_SCANNER, &bus, &dev); in usb_device_get_unique_id()