qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 25/38] ui/keymaps: Fix handling of erroneous


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v4 25/38] ui/keymaps: Fix handling of erroneous include files
Date: Fri, 19 Oct 2018 08:49:44 +0200
User-agent: NeoMutt/20180716

On Wed, Oct 17, 2018 at 10:26:49AM +0200, Markus Armbruster wrote:
> While errors in the keyboard layout named with -k are fatal, errors in
> included files are reported, but otherwise ignored:
> 
>     $ cat worst
>     include bad
>     include worse
>     $ ls -l bad worse
>     ls: cannot access 'bad': No such file or directory
>     ls: cannot access 'worse': No such file or directory
>     $ qemu-system-x86_64 -nodefaults -S -monitor stdio -display vnc=:0 -k bad
>     QEMU 3.0.50 monitor - type 'help' for more information
>     (qemu) Could not read keymap file: 'bad'
>     $ qemu-system-x86_64 -nodefaults -S -monitor stdio -display vnc=:0 -k 
> worst
>     QEMU 3.0.50 monitor - type 'help' for more information
>     (qemu) Could not read keymap file: 'bad'
>     Could not read keymap file: 'worse'
> 
> Fix that.
> 
> Note that parse_keyboard_layout() allocates the keymap, except when
> it's parsing an include file.  To keep error handling simple, move the
> memory management to its caller init_keyboard_layout().
> 
> Cc: Gerd Hoffmann <address@hidden>
> Signed-off-by: Markus Armbruster <address@hidden>

Reviewed-by: Gerd Hoffmann <address@hidden>




reply via email to

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