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 <kra...@redhat.com>
> Signed-off-by: Markus Armbruster <arm...@redhat.com>

Reviewed-by: Gerd Hoffmann <kra...@redhat.com>


Reply via email to