img_convert() and img_amend() use qemu_opts_do_parse(), which reports
errors with qerror_report_err(). Its error messages aren't helpful
here, the caller reports one that actually makes sense. Reproducer:
$ qemu-img convert -o backing_format=raw in.img out.img
qemu-img: Invalid parameter 'backing_format'
qemu-img: Invalid options for file format 'raw'
To fix, propagate errors through qemu_opts_do_parse(). This lifts the
error reporting into callers. Drop it from img_convert() and
img_amend(), keep it in qemu_chr_parse_compat(), bdrv_img_create().
Since I'm touching qemu_opts_do_parse() anyway, write a function
comment for it.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
|
||
|---|---|---|
| .. | ||
| acl.h | ||
| aes.h | ||
| atomic.h | ||
| bitmap.h | ||
| bitops.h | ||
| bswap.h | ||
| compatfd.h | ||
| compiler.h | ||
| config-file.h | ||
| crc32c.h | ||
| envlist.h | ||
| error-report.h | ||
| event_notifier.h | ||
| fifo8.h | ||
| hbitmap.h | ||
| host-utils.h | ||
| int128.h | ||
| iov.h | ||
| log.h | ||
| main-loop.h | ||
| module.h | ||
| notify.h | ||
| option.h | ||
| option_int.h | ||
| osdep.h | ||
| queue.h | ||
| range.h | ||
| ratelimit.h | ||
| rcu.h | ||
| rcu_queue.h | ||
| readline.h | ||
| rfifolock.h | ||
| seqlock.h | ||
| sockets.h | ||
| thread-posix.h | ||
| thread-win32.h | ||
| thread.h | ||
| throttle.h | ||
| timer.h | ||
| tls.h | ||
| typedefs.h | ||
| uri.h | ||
| xattr.h | ||