--- libmtp-0.1.5/examples/hotplug.c.udevrules 2007-07-30 09:40:11.000000000 +0200 +++ libmtp-0.1.5/examples/hotplug.c 2007-07-30 09:44:32.000000000 +0200 @@ -76,7 +76,11 @@ case style_udev: printf("# UDEV-style hotplug map for libmtp\n"); printf("# Put this file in /etc/udev/rules.d\n\n"); - printf("SUBSYSTEM!=\"usb_device\", ACTION!=\"add\", GOTO=\"libmtp_rules_end\"\n\n"); + printf("ACTION!=\"add\", GOTO=\"libmtp_rules_end\"\n" + "SUBSYSTEM==\"usb\", GOTO=\"libmtp_rules\"\n" + "SUBSYSTEM==\"usb_device\", GOTO=\"libmtp_rules\"\n\n" + "GOTO=\"libmtp_rules_end\"\n\n" + "LABEL=\"libmtp_rules\"\n\n"); break; case style_usbmap: printf("# This usermap will call the script \"libmtp.sh\" whenever a known MTP device is attached.\n\n"); @@ -103,7 +107,7 @@ } else { action = default_udev_action; } - printf("SYSFS{idVendor}==\"%04x\", SYSFS{idProduct}==\"%04x\", %s\n", entry->vendor_id, entry->product_id, action); + printf("ATTR{idVendor}==\"%04x\", ATTR{idProduct}==\"%04x\", %s\n", entry->vendor_id, entry->product_id, action); break; } case style_usbmap: