vermaden / automount

Simple devd(8) based automounter for FreeBSD
66 stars 20 forks source link

Would be possible to support sysutils/mtpfs? #10

Closed ghost closed 1 year ago

ghost commented 7 years ago

Hello!

Would be possible to have support to sysutils/mtpfs in automount?

Thanks!

vermaden commented 7 years ago

Theoretically yes, but ... The only device that shows in the /dev is /dev/ugen0.3 which is link to /dev/usb/0.3.0 device. The simple-mtpfs is not run against that device but 'generally'.

I can list the devices with simple-mtpfs like that:

% simple-mtpfs --list-devices
1: LG Electronics Inc.LG G Flex 2

But imagine attaching TWO same or very similar phones at the same time, with simple-mtpfs --list-devices You are not able to distinguish them and 'link' them to the device in /dev directory. So I can not attach an event to devd(8) to the device that appears in /dev directory.

So in short, no.

Regards, vermaden

ghost commented 7 years ago

Ok, got it.

Thanks!

Edit: there is any chance of the normal mtpfs work differently? That also use Fuse.

wulf7 commented 7 years ago

But imagine attaching TWO same or very similar phones at the same time, with simple-mtpfs --list-devices You are not able to distinguish them and 'link' them to the device in /dev directory. So I can not attach an event to devd(8) to the device that appears in /dev directory.

That is wrong. You can add device file to simple-mtpfs parameters list to get ID of corresponding mtp-compatible device and than supply that ID with --device option to mount only mtp-device you need. Just like:

% simple-mtpfs --list-devices /dev/ugen0.5
1: SamsungGalaxy models (MTP)
% sudo simple-mtpfs -o allow_other --device 1 <mount_point>

I use this sequence of commands in my own fork of automount that supports mtpfs: https://github.com/wulf7/automount I can make pull-request if you are intrested in these changes

vermaden commented 1 year ago

The automount(8) supports now MTP.