[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 07/15] sheepdog: Report errors in pseudo-filenam
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH 07/15] sheepdog: Report errors in pseudo-filename more usefully |
Date: |
Fri, 3 Mar 2017 14:36:45 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 02.03.2017 um 22:43 hat Markus Armbruster geschrieben:
> 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 <address@hidden>
More upper/lower case inconsistency in error messages. Maybe I should
simply ignore it.
Reviewed-by: Kevin Wolf <address@hidden>
- [Qemu-block] [PATCH 02/15] sheepdog: Fix error handling in sd_snapshot_delete(), (continued)
- [Qemu-block] [PATCH 02/15] sheepdog: Fix error handling in sd_snapshot_delete(), Markus Armbruster, 2017/03/02
- [Qemu-block] [PATCH 05/15] sheepdog: Fix snapshot ID parsing in _open(), _create, _goto(), Markus Armbruster, 2017/03/02
- [Qemu-block] [PATCH 07/15] sheepdog: Report errors in pseudo-filename more usefully, Markus Armbruster, 2017/03/02
- [Qemu-block] [PATCH 11/15] gluster: Don't duplicate qapi-util.c's qapi_enum_parse(), Markus Armbruster, 2017/03/02
- [Qemu-block] [PATCH 10/15] gluster: Drop assumptions on SocketTransport names, Markus Armbruster, 2017/03/02
- [Qemu-block] [PATCH 01/15] sheepdog: Defuse time bomb in sd_open() error handling, Markus Armbruster, 2017/03/02