提交 9b37525a 编写于 作者: L Luiz Capitulino 提交者: Kevin Wolf

qemu-img: img_create(): pass Error object to bdrv_img_create()

Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 71c79813
......@@ -301,6 +301,7 @@ static int img_create(int argc, char **argv)
const char *filename;
const char *base_filename = NULL;
char *options = NULL;
Error *local_err = NULL;
for(;;) {
c = getopt(argc, argv, "F:b:f:he6o:");
......@@ -361,8 +362,14 @@ static int img_create(int argc, char **argv)
goto out;
}
ret = bdrv_img_create(filename, fmt, base_filename, base_fmt,
options, img_size, BDRV_O_FLAGS, NULL);
bdrv_img_create(filename, fmt, base_filename, base_fmt,
options, img_size, BDRV_O_FLAGS, &local_err);
if (error_is_set(&local_err)) {
error_report("%s", error_get_pretty(local_err));
error_free(local_err);
ret = -1;
}
out:
if (ret) {
return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册