Split very long comment lines in the udev rules file.

merge-requests/1/head
Julien BLACHE 2006-07-16 11:05:15 +00:00
rodzic 6a453bd191
commit 08ebb3df15
2 zmienionych plików z 21 dodań i 1 usunięć

Wyświetl plik

@ -1,3 +1,8 @@
2006-07-16 Julien Blache <jb@jblache.org>
* tools/sane-desc.c: split very long comment lines in the
generated udev rules file. Some comment lines very overly long,
and udev produced warning messages while loading the rules file.
2006-07-15 m. allan noah <anoah AT pfeiffer DOT edu>
* backend/fujitsu.c: backend v1.0.38, add 'useless noise'

Wyświetl plik

@ -3176,6 +3176,7 @@ static void
print_udev (void)
{
usbid_type *usbid = create_usbids_table ();
int i;
print_udev_header ();
printf ("\nACTION!=\"add\", GOTO=\"libsane_rules_end\"\n");
@ -3184,13 +3185,27 @@ print_udev (void)
{
manufacturer_model_type * name = usbid->name;
i = 0;
printf ("# ");
while (name)
{
if (name != usbid->name)
if ((name != usbid->name) && (i > 0))
printf (" | ");
printf ("%s", name->name);
name = name->next;
i++;
/*
* Limit the number of model names on the same line to 3,
* as udev cannot handle very long lines and prints a warning
* message while loading the rules files.
*/
if ((i == 3) && (name != NULL))
{
printf("\n# ");
i = 0;
}
}
printf ("\n");
printf ("SYSFS{idVendor}==\"%s\", SYSFS{idProduct}==\"%s\", MODE=\"660\", GROUP=\"scanner\"\n",