diff options
author | Linus Walleij <triad@df.lth.se> | 2010-12-05 14:00:34 +0000 |
---|---|---|
committer | Linus Walleij <triad@df.lth.se> | 2010-12-05 14:00:34 +0000 |
commit | 549f49a7966b55adde29133d8b97ab9a10a9ab25 (patch) | |
tree | e7e25696c888c32e4fdf0bafa0f5fdceef388347 /util/mtp-hotplug.c | |
parent | 4f4082b6fac5d3ac61b1cc626759615b9b2813cc (diff) | |
download | libmtp-549f49a7966b55adde29133d8b97ab9a10a9ab25.tar.gz |
Improbe the hotplug capability
Diffstat (limited to 'util/mtp-hotplug.c')
-rw-r--r-- | util/mtp-hotplug.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/mtp-hotplug.c b/util/mtp-hotplug.c index 1266ebf..c403a05 100644 --- a/util/mtp-hotplug.c +++ b/util/mtp-hotplug.c @@ -193,6 +193,14 @@ int main (int argc, char **argv) break; case style_udev: case style_udev_old: + /* + * This is code that invokes the mtp-probe program on + * every USB device that is either PTP or vendor specific + */ + printf("\n# Autoprobe PTP devices\n"); + printf("ENV{ID_MTP_DEVICE}!=\"1\", ATTR{bDeviceClass}==\"06\", PROGRAM=\"/lib/udev/mtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}\", RESULT==\"1\", %s\n", action); + printf("\n# Autoprobe vendor-specific devices\n"); + printf("ENV{ID_MTP_DEVICE}!=\"1\", ATTR{bDeviceClass}==\"ff\", PROGRAM=\"/lib/udev/mtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}\", RESULT==\"1\", %s\n\n", action); printf("LABEL=\"libmtp_rules_end\"\n"); break; case style_hal: |