Simplify previous modification.

merge-requests/1/head
Julien BLACHE 2007-07-25 12:30:16 +00:00
rodzic 8dc1f4493c
commit 3958e52b1b
1 zmienionych plików z 3 dodań i 20 usunięć

Wyświetl plik

@ -3160,7 +3160,7 @@ print_udev_header (void)
"# udev rules file for supported USB devices\n"
"#\n"
"# To add a USB device, add a rule to the list below between the\n"
"# LABEL=\"libsane_no_create_usb_dev\" and LABEL=\"libsane_rules_end\" lines.\n"
"# ENV{DEVTYPE}!=... and LABEL=\"libsane_rules_end\" lines.\n"
"#\n"
"# To run a script when your device is plugged in, add RUN+=\"/path/to/script\"\n"
"# to the appropriate rule.\n");
@ -3180,24 +3180,7 @@ print_udev (void)
print_udev_header ();
printf("ACTION!=\"add\", GOTO=\"libsane_rules_end\"\n"
"ENV{DEVTYPE}==\"usb_device\", GOTO=\"libsane_create_usb_dev\"\n"
"SUBSYSTEM==\"usb_device\", GOTO=\"libsane_no_create_usb_dev\"\n"
"SUBSYSTEM!=\"usb_device\", GOTO=\"libsane_rules_end\"\n"
"\n");
printf("# Kernel >= 2.6.22 jumps here\n"
"LABEL=\"libsane_create_usb_dev\"\n"
"\n");
printf("# If you are running Linux >= 2.6.22 without CONFIG_USB_DEVICE_CLASS\n"
"# AND this rule doesn't already exist on your system, uncomment the\n"
"# following line to create the /dev/bus/usb/BBB/DDD device nodes.\n"
"# SUBSYSTEM==\"usb\", ACTION==\"add\", ENV{DEVTYPE}==\"usb_device\", "
"NAME=\"bus/usb/$env{BUSNUM}/$env{DEVNUM}\", MODE=\"0664\", OWNER=\"root\", GROUP=\"root\"\n"
"\n");
printf("# Kernel < 2.6.22 jumps here\n"
"LABEL=\"libsane_no_create_usb_dev\"\n"
"ENV{DEVTYPE}!=\"usb_device\", GOTO=\"libsane_rules_end\"\n"
"\n");
while (usbid)
@ -3227,7 +3210,7 @@ print_udev (void)
}
}
printf ("\n");
printf ("SYSFS{idVendor}==\"%s\", SYSFS{idProduct}==\"%s\", MODE=\"0664\", GROUP=\"scanner\"\n",
printf ("SYSFS{idVendor}==\"%s\", SYSFS{idProduct}==\"%s\", NAME=\"bus/usb/$env{BUSNUM}/$env{DEVNUM}\", MODE=\"0664\", GROUP=\"scanner\"\n",
usbid->usb_vendor_id + 2, usbid->usb_product_id + 2);
usbid = usbid->next;
}