On 2/26/21 6:08 PM, Paolo Bonzini wrote:
> This enables some simplification of vl.c via error_fatal, and improves
> error messages.  Before:
> 
> Before:
>   $ ./qemu-system-x86_64 -readconfig .
>   qemu-system-x86_64: error reading file
>   qemu-system-x86_64: -readconfig .: read config .: Invalid argument
>   $ /usr/libexec/qemu-kvm -readconfig foo
>   qemu-kvm: -readconfig foo: read config foo: No such file or directory
> 
> After:
> 
>   $ ./qemu-system-x86_64 -readconfig .
>   qemu-system-x86_64: -readconfig .: error reading file: Is a directory
>   $ ./qemu-system-x86_64 -readconfig foo
>   qemu-system-x86_64: -readconfig foo: Cannot read config file foo: No such 
> file or directory
> 
> Signed-off-by: Paolo Bonzini <[email protected]>
> ---
>  block/blkdebug.c           |  3 +--
>  include/qemu/config-file.h |  5 +++--
>  softmmu/vl.c               | 29 +++++++++++------------------
>  util/qemu-config.c         | 23 ++++++++++++-----------
>  4 files changed, 27 insertions(+), 33 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>


Reply via email to