On Thu, 28 Jan 2010, Sergey Lapin wrote: > Hi, all! > > What is usage scenario for file storage gadget? I need to achieve this goal: > > USB cable is out -> /dev/sdaX is mounted om /data and accessible within a device > USB cable is inserted -> /dev/sda is unmounted and then exported with > g_{file,mass}_storage > USB cable is removed -> /dev/sdaX is mounted back. > > How could I achieve this in generic way? Currently there is no way to achieve this. You would need to modify all the USB device controller drivers. Make them export a file in sysfs containing the current connection state and allow processes to poll that file. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html