Hi,
I'm working on a utility that will auto mount an inserted USB stick on linux. I have tied into D-Bus to receive notification of when a device is inserted, and that works great. However, I need to determine which device in /dev is mapped to the inserted USB stick. I am getting the D-Bus notification and then scanning the USB system with pyUSB ( 0.4 ). I filter for USB_MASS_STORAGE_DEVICE classes, and I can see the device that's been added or removed. I need to mount this device so I can query it for available space and report that to our app so we can determine if enough free space exists so we can write our data.
I'm using python for this task. I'm not sure what our target distro will be, only that it will be at least 2.6
edit: My question is: How do I determine which device in /dev maps to the buss-device number I get from pyUSB.