summary refs log tree commit diff stats
path: root/hw/vfio/helpers.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2023-10-31 11:45:30 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-11-02 18:40:50 +0400
commit28035bed1c565eace7db18971a7e960a8d1f7c44 (patch)
tree174dd23bba94813b388752f9221ad5ed94cf34ca /hw/vfio/helpers.c
parentf8c49724cbe13fa30b5893eff33f9ccee7e4466a (diff)
downloadfocaccia-qemu-28035bed1c565eace7db18971a7e960a8d1f7c44.tar.gz
focaccia-qemu-28035bed1c565eace7db18971a7e960a8d1f7c44.zip
dump: Improve some dump-guest-memory error messages
Zero @length is rejected with "Invalid parameter 'length'".  Improve
to "parameter 'length' expects a non-zero length".

qemu_open_old() is a wrapper around qemu_open_internal() that throws
away error information.  Switch to the wrapper that doesn't:
qemu_create().  Example improvement:

    (qemu) dump-guest-memory /dev/fdset/x 0 1
    Error: Could not open '/dev/fdset/x': Invalid argument

becomes

    Error: Could not parse fdset /dev/fdset/x

@protocol values not starting with "fd:" or "file:" are rejected with
"Invalid parameter 'protocol'".  Improve to "parameter 'protocol' must
start with 'file:' or 'fd:'".

While there, make the conditional checking @protocol a little more
obvious.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20231031104531.3169721-5-armbru@redhat.com>
Diffstat (limited to 'hw/vfio/helpers.c')
0 files changed, 0 insertions, 0 deletions