Commit 79d79c3c authored by Rex Dieter's avatar Rex Dieter Committed by Bastien Nocera

lib: Test before applying power saving udev rules

add TEST=="power/control"... to test for the presence of the file
before setting it.

See https://bugzilla.redhat.com/show_bug.cgi?id=950205

https://bugs.freedesktop.org/show_bug.cgi?id=87414
parent 35e356f6
......@@ -74,7 +74,7 @@ static void print_driver (struct fp_driver *driver)
if (num_printed == 0)
printf ("# %s\n", driver->full_name);
printf ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ATTRS{dev}==\"*\", ATTR{power/control}=\"auto\"\n", driver->id_table[i].vendor, driver->id_table[i].product);
printf ("SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ATTRS{dev}==\"*\", TEST==\"power/control\", ATTR{power/control}=\"auto\"\n", driver->id_table[i].vendor, driver->id_table[i].product);
num_printed++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment