IgnorantGuru / udevil

Mount without password
http://ignorantguru.github.com/udevil/
GNU General Public License v3.0
130 stars 30 forks source link

Add USB device number to devmon output #97

Closed lukehutch closed 3 years ago

lukehutch commented 3 years ago

Current devmon output looks like this:

device: [/dev/sda]
    systeminternal: [0]
    usage:          [filesystem]
    type:           [udf]
    label:          [TuxPE10.2]
    ismounted:      [0]
    nopolicy:       [0]
    hasmedia:       [1]
    opticaldisc:    []
    numaudiotracks: []
    blank:          []
    media:          []
    partition:      [0]

This does not tell you which USB port the drive is plugged into. You have to make a separate call to udevadm:

$ udevadm info -q path -n /dev/sdh
/devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.1/3-1.1.3/3-1.1.3.2/3-1.1.3.2:1.0/host7/target7:0:0/7:0:0:0/block/sdh

Explanation of this path is here:

https://unix.stackexchange.com/a/406096/340704

I think simply adding a field like usbport: [3-1.1.3.2] would be sufficient.

lukehutch commented 3 years ago

Merging into #99