Il 12/06/2012 03:32, Kevin O'Connor ha scritto:
-int bootprio_find_usb(struct usbdevice_s *usbdev) +int bootprio_find_usb(struct usbdevice_s *usbdev, int lun) { if (!CONFIG_BOOTORDER) return -1;
- // Find usb - for example: /pci@i0cf8/usb@1,2/hub@1/network@0/ethernet@0
- // Find usb - for example: /pci@i0cf8/usb@1,2/storage@1/channel@0/disk@0,0 char desc[256], *p; p = build_pci_path(desc, sizeof(desc), "usb", usbdev->hub->cntl->pci); p = build_usb_path(p, desc+sizeof(desc)-p, usbdev->hub);
- snprintf(p, desc+sizeof(desc)-p, "/*@%x", usbdev->port+1);
- snprintf(p, desc+sizeof(desc)-p, "/*@%x/*@0/*@0,%d", usbdev->port+1, lun); return find_prio(desc);
This will not work if you're redirecting a USB device from the host, because then you will not have the SCSI-specific elements of the path. I suggest that you fall back to "/*@%x" if find_prio returns failure and lun=0.
Paolo