mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
fsdev: improve error handling of backend init
This patch changes some error messages in the backend init code and convert backends to propagate QEMU Error objects instead of calling error_report(). One notable improvement is that the local backend now provides a more detailed error report when it fails to open the shared directory. Signed-off-by: Greg Kurz <groug@kaod.org>
This commit is contained in:
parent
91cda4e8f3
commit
65603a801e
6 changed files with 15 additions and 14 deletions
|
@ -3542,9 +3542,9 @@ int v9fs_device_realize_common(V9fsState *s, Error **errp)
|
|||
s->fid_list = NULL;
|
||||
qemu_co_rwlock_init(&s->rename_lock);
|
||||
|
||||
if (s->ops->init(&s->ctx) < 0) {
|
||||
error_setg(errp, "9pfs Failed to initialize fs-driver with id:%s"
|
||||
" and export path:%s", s->fsconf.fsdev_id, s->ctx.fs_root);
|
||||
if (s->ops->init(&s->ctx, errp) < 0) {
|
||||
error_prepend(errp, "cannot initialize fsdev '%s': ",
|
||||
s->fsconf.fsdev_id);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue