Hi,
I'm trying to write a kernel module that would read a file from a specified USB device. I thought of achieving this using sys_mount(), sys_open() and sys_read() system calls, however I have a problem: I have only a pointer to struct usb_device (from usb_find_device(<VENDOR_ID>, <PRODUCT_ID>)) and I don't know how to get the device name like "/dev/sda" through that structure.
I tried to find it in usb_device.dev and some other places inside usb_device but without any success. Neither could find any clues in usb_stroage module code.
How can I get the device name?
-- Andrzej Polatynski
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/