I have written so far a Qt-Application that is able to detect through the socket communication with the uDevice daemon(?) when I add or remove a usb device.
But the related informations I'm recieving aren't that usefull for me(at least not from the point of my current knowledge). I'm trying to find any informations where (interface point of view) I can build my code in a way that it can extract the informations neccessary to see:
a) Is the plugged device a mass storage device?
b) What are the parameters to mount it if it is.
As the communication to the uDevice works and for the parsing of the data I have not even a clou about what the data I'm reciving means, I hope it is not off-topic when I'm just presenting the recieved informations of uDevice.
this are the informations I'm recieving when I add a single USB-massstoragedevice:
(one package per line but all are recieved immediatly after pluggin)
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/scsi_host/host58
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/scsi_disk/58:0:0:0
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/scsi_device/58:0:0:0
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/scsi_generic/sg2
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/bsg/58:0:0:0
add@/devices/virtual/bdi/8:16
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/block/sdb
add@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/block/sdb/sdb1
And this is the data I'm recieving for the same device beeing removed:
(Especially note that one of the notifications contains "changed")
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/bsg/58:0:0:0
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/scsi_generic/sg2
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/scsi_device/58:0:0:0
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/scsi_disk/58:0:0:0
change@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/block/sdb
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/block/sdb/sdb1
remove@/devices/virtual/bdi/8:16
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0/block/sdb
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0/58:0:0:0
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/target58:0:0
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58/scsi_host/host58
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0/host58
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1/1-1:1.0
remove@/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1
So My question now is: If this is not the needed data to mount the device, what is needed to consider to get that information from uDevice.
And if it is enough information for doing the job (what I'm assuming, because it is more likely that I'm just missing the knowhow to fully understand what this data is even telling me!) what lines exactly contain that information and how do I extract these?
note: The ubuntu system is run in a VMware virtual machine. It felt neccessary to mention this, since the VM maybe could alter anything in the way the usb device may be treat.