mirror of https://github.com/xemu-project/xemu.git
block: Don't use error_abort in blk_new_open
We have an errp and bdrv_root_attach_child can fail permission check, error_abort is not the best choice here. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
d282f34e82
commit
50bfbe93b2
|
@ -213,7 +213,12 @@ BlockBackend *blk_new_open(const char *filename, const char *reference,
|
|||
}
|
||||
|
||||
blk->root = bdrv_root_attach_child(bs, "root", &child_root,
|
||||
perm, BLK_PERM_ALL, blk, &error_abort);
|
||||
perm, BLK_PERM_ALL, blk, errp);
|
||||
if (!blk->root) {
|
||||
bdrv_unref(bs);
|
||||
blk_unref(blk);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return blk;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue