diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2019-02-10 11:58:36 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2019-02-10 11:58:36 +0100 |
commit | 2e8561a8e98f6d4abded77c0e1588b331a2732dc (patch) | |
tree | 7af29c1cbd0f278065682d91cdf071277e851553 /util | |
parent | a75fe384992990d668807195b87255f280496eab (diff) | |
download | libmtp-2e8561a8e98f6d4abded77c0e1588b331a2732dc.tar.gz |
avoid mtp-probe on gphoto2 cameras , some dont like it
https://github.com/gphoto/libgphoto2/issues/343
Diffstat (limited to 'util')
-rw-r--r-- | util/mtp-hotplug.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/mtp-hotplug.c b/util/mtp-hotplug.c index 8d63e09..1158789 100644 --- a/util/mtp-hotplug.c +++ b/util/mtp-hotplug.c @@ -274,9 +274,10 @@ int main (int argc, char **argv) /* * This is code that invokes the mtp-probe program on * every USB device that is either PTP or vendor specific + * also dont run probe if gphoto2 already matched it as camera. */ printf("\n# Autoprobe vendor-specific, communication and PTP devices\n"); - printf("ENV{ID_MTP_DEVICE}!=\"1\", ENV{MTP_NO_PROBE}!=\"1\", ENV{COLOR_MEASUREMENT_DEVICE}!=\"1\", ENV{libsane_matched}!=\"yes\", ATTR{bDeviceClass}==\"00|02|06|ef|ff\", PROGRAM=\"%smtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}\", RESULT==\"1\", %s", mtp_probe_dir, action); + printf("ENV{ID_MTP_DEVICE}!=\"1\", ENV{MTP_NO_PROBE}!=\"1\", ENV{COLOR_MEASUREMENT_DEVICE}!=\"1\", ENV{ID_GPHOTO}!=\"1\", ENV{libsane_matched}!=\"yes\", ATTR{bDeviceClass}==\"00|02|06|ef|ff\", PROGRAM=\"%smtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}\", RESULT==\"1\", %s", mtp_probe_dir, action); if (udev_group != NULL) printf(", GROUP=\"%s\"", udev_group); if (udev_mode != NULL) printf(", MODE=\"%s\"", udev_mode); printf("\n"); |