summary refs log tree commit diff stats
path: root/scripts/qemu.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-03-06 20:00:41 +0100
committerKevin Wolf <kwolf@redhat.com>2017-03-07 14:53:28 +0100
commit36bcac16fdd6ecb75314db06171f54dcd400ab8c (patch)
treebcc77469311c9aadf032171087dc689b724ef63a /scripts/qemu.py
parentdaa0b0d4b17d25d7d46326bac8efa449300e3711 (diff)
downloadfocaccia-qemu-36bcac16fdd6ecb75314db06171f54dcd400ab8c.tar.gz
focaccia-qemu-36bcac16fdd6ecb75314db06171f54dcd400ab8c.zip
sheepdog: Report errors in pseudo-filename more usefully
Errors in the pseudo-filename are all reported with the same laconic
"Can't parse filename" message.

Add real error reporting, such as:

    $ qemu-system-x86_64 --drive driver=sheepdog,filename=sheepdog:///
    qemu-system-x86_64: --drive driver=sheepdog,filename=sheepdog:///: missing file path in URI
    $ qemu-system-x86_64 --drive driver=sheepdog,filename=sheepgod:///vdi
    qemu-system-x86_64: --drive driver=sheepdog,filename=sheepgod:///vdi: URI scheme must be 'sheepdog', 'sheepdog+tcp', or 'sheepdog+unix'
    $ qemu-system-x86_64 --drive driver=sheepdog,filename=sheepdog+unix:///vdi?socke=sheepdog.sock
    qemu-system-x86_64: --drive driver=sheepdog,filename=sheepdog+unix:///vdi?socke=sheepdog.sock: unexpected query parameters

The code to translate legacy syntax to URI fails to escape URI
meta-characters.  The new error messages are misleading then.  Replace
them by the old "Can't parse filename" message.  "Internal error"
would be more honest.  Anyway, no worse than before.  Also add a FIXME
comment.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'scripts/qemu.py')
0 files changed, 0 insertions, 0 deletions