On 01/29/15 00:09, Lennart Poettering wrote:
> On Wed, 28.01.15 23:51, Topi Miettinen ([email protected]) wrote:
> 
>> diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
>> index 1271a66..df53b75 100644
>> --- a/src/backlight/backlight.c
>> +++ b/src/backlight/backlight.c
>> @@ -373,6 +373,7 @@ int main(int argc, char *argv[]) {
>>  
>>          if (streq(argv[1], "load")) {
>>                  _cleanup_free_ char *value = NULL;
>> +                const char *clamp;
>>  
>>                  if (!shall_restore_state())
>>                          return EXIT_SUCCESS;
>> @@ -390,7 +391,9 @@ int main(int argc, char *argv[]) {
>>                          return EXIT_FAILURE;
>>                  }
>>  
>> -                clamp_brightness(device, &value, max_brightness);
>> +                clamp = udev_device_get_property_value(device, 
>> "ID_BACKLIGHT_CLAMP");
>> +                if (clamp == NULL || streq(clamp, "1"))
> 
> Please use parse_boolean() for this.

OK.

> 
> I think it would be better to name this ID_BACKLIGHT_CLAMP_MIN or so.

_MIN as in minimum? The brightness is also clamped to maximum brightness
advertised by the device.

-Topi

> 
> Otherwise looks fine to me.
> 
> Lennart
> 

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to