[PATCH weston] udev-seat: Fail input setup only if no devices are found

Kristian Høgsberg hoegsberg at gmail.com
Mon Jun 3 21:13:37 PDT 2013


On Mon, Jun 03, 2013 at 06:46:13PM +0100, Rob Bradford wrote:
> From: Rob Bradford <rob at linux.intel.com>
> 
> Rather than failing if we cannot open any single device fail the input
> setup if there are no input devices added.
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=64506

Thanks Rob, patch applied.

Kristian

> ---
>  src/udev-seat.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/udev-seat.c b/src/udev-seat.c
> index 7e62429..12a531c 100644
> --- a/src/udev-seat.c
> +++ b/src/udev-seat.c
> @@ -58,7 +58,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master)
>  	fd = weston_launcher_open(c, devnode, O_RDWR | O_NONBLOCK);
>  	if (fd < 0) {
>  		weston_log("opening input device '%s' failed.\n", devnode);
> -		return -1;
> +		return 0;
>  	}
>  
>  	device = evdev_device_create(&master->base, devnode, fd);
> @@ -69,7 +69,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master)
>  	} else if (device == NULL) {
>  		close(fd);
>  		weston_log("failed to create input device '%s'.\n", devnode);
> -		return -1;
> +		return 0;
>  	}
>  
>  	calibration_values =
> @@ -140,6 +140,7 @@ udev_seat_add_devices(struct udev_seat *seat, struct udev *udev)
>  			"\t- seats misconfigured "
>  			"(Weston backend option 'seat', "
>  			"udev device property ID_SEAT)\n");
> +		return -1;
>  	}
>  
>  	return 0;
> -- 
> 1.8.1.4
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list