[PATCH weston 2/3] weston-launch: fix -t option parsing

Quentin Glidic sardemff7+wayland at sardemff7.net
Wed Nov 1 14:40:02 UTC 2017


On 11/1/17 3:24 PM, Pekka Paalanen wrote:
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> 
> Fix an issue introduced in:
> 
>   commit ab4999492ce630e6bb1c93215fc052c2c29913bd
>   Author: Kristian Høgsberg <krh at bitplanet.net>
>   Date:   Fri Jul 19 21:26:24 2013 -0700
> 
>       weston-launch: Drop sleep_fork option
> 
> where the option string accidentally became "t::". That causes
> 
> 	$ weston-lauch -t /dev/tty4
> 
> to be parsed incorrectly, as if -t option had no argument and the tty
> path gets passed to weston which errors out because of it.
> 
> This patch fixes the above to work as expected.
> 
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

Good catch!
Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>

Thanks,


> ---
>   libweston/weston-launch.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
> index bc50de74..6a7a7649 100644
> --- a/libweston/weston-launch.c
> +++ b/libweston/weston-launch.c
> @@ -698,7 +698,7 @@ main(int argc, char *argv[])
>   
>   	memset(&wl, 0, sizeof wl);
>   
> -	while ((c = getopt_long(argc, argv, "u:t::vh", opts, &i)) != -1) {
> +	while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) {
>   		switch (c) {
>   		case 'u':
>   			wl.new_user = optarg;
> 


-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list