qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] baum: Truncate braille device size to 84x1


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] baum: Truncate braille device size to 84x1
Date: Mon, 11 Dec 2017 08:30:39 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 12/10/2017 06:19 PM, Samuel Thibault wrote:
> Baum device bigger than 84 do not actually exist, some guest drivers
> would be upset by such sizes.
> 
> Signed-off-by: Samuel Thibault <address@hidden>
> ---
>  chardev/baum.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 

> @@ -239,6 +239,12 @@ static int baum_deferred_init(BaumChardev *baum)
>          brlapi_perror("baum: brlapi__getDisplaySize");
>          return 0;
>      }
> +    if (baum->y > 1) {
> +        baum->y = 1;
> +    }
> +    if (baum->x > 84) {
> +        baum->x = 84;
> +    }

Is magic clamping desirable, or is it better to make it a hard error if
the user configured a size that is not possible?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]