问题
In order to share a device between a host and a Docker container, I would like to know the path to the mounting point for a given device, a smartcard reader in this case.
Using ioreg -p IOUSB -t, I can see the device (CCID USB Reader) :
iMac:~ $ ioreg -p IOUSB -t
+-o Root <class IORegistryEntry, id 0x100000100, retain 13>
+-o Root Hub Simulation Simulation@fd000000 <class AppleUSBRootHubDevice, id 0x100000257, registered, matched, active, busy 0 (42 ms), retain 7>
| +-o IOUSBHostDevice@fd100000 <class AppleUSBDevice, id 0x100000258, registered, matched, active, busy 0 (45 ms), retain 14>
| +-o Card Reader@fd110000 <class AppleUSBDevice, id 0x1000002a8, registered, matched, active, busy 0 (89 ms), retain 11>
| +-o IR Receiver@fd120000 <class AppleUSBDevice, id 0x1000002c9, registered, matched, active, busy 0 (139 ms), retain 14>
| +-o CCID USB Reader@fd130000 <class AppleUSBDevice, id 0x100000a1d, registered, matched, active, busy 0 (28 ms), retain 17>
However this does not help me to find on which /dev/??? this device is mapped to. The mount command does not give details on non-storage devices.
EDIT 1:
Here is the result of a ls -l command on the /dev/ directory :
iMac$ ls -l /dev > before.txt
iMac$ ls -l /dev > after.txt
iMac$ diff before.txt after.txt
25,27c25,27
< crw-rw-rw- 1 root wheel 14, 18 10 avr 10:40 io8log
< cr--r--r-- 1 root wheel 14, 10 10 avr 10:39 io8logmt
< crw-rw-rw- 1 root wheel 14, 19 10 avr 10:42 io8logtemp
---
> crw-rw-rw- 1 root wheel 14, 17 10 avr 10:40 io8log
> cr--r--r-- 1 root wheel 14, 18 10 avr 10:39 io8logmt
> crw-rw-rw- 1 root wheel 14, 10 10 avr 10:42 io8logtemp
There is no new entry. And I am not sure if io8log* file relate to the USB reader. The mount command output also does not change when plugging on unplugging the USB reader.
EDIT 2:
According to Where is the mount point for the iPod/iPhone in Mac?, OSX does not use mount non-data device with mouting points but connects directly instead. In that case, is there still a way to share this device with a Docker container ?
来源:https://stackoverflow.com/questions/36523760/find-mount-point-of-an-usb-device-in-osx