[PATCH v2] Add configuration option for no input device.

Daniel Díaz daniel.diaz at linaro.org
Thu Oct 20 22:02:21 UTC 2016


Hello!


On 10/20/2016 04:56 PM, Peter Hutterer wrote:
[...]
>> diff --git a/libweston/libinput-seat.c b/libweston/libinput-seat.c
>> index 78a5fc4..5782462 100644
>> --- a/libweston/libinput-seat.c
>> +++ b/libweston/libinput-seat.c
>> @@ -259,6 +259,12 @@ udev_input_enable(struct udev_input *input)
>>  			devices_found = 1;
>>  	}
>>  
>> +	if (devices_found == 0 && !c->require_input) {
>> +		weston_log("warning: no input devices found, but none required "
>> +			   "as per configuration.\n");
>> +		return 1;
> 
> did you mean to return 1 here instead of 0? 0 signals success, I think you
> should use the same here.

I meant to differentiate the case where no devices are found but
execution can continue regardless. udev_input_init (and the DRM backend)
can handle that case differently if so needed.

I reckon that's not common practice, so I'll submit v3 returning 0 there.

Thanks and greetings!

Daniel Díaz
daniel.diaz at linaro.org



More information about the wayland-devel mailing list