diff options
author | Max Reitz | 2013-09-05 14:45:29 +0200 |
---|---|---|
committer | Kevin Wolf | 2013-09-12 10:12:48 +0200 |
commit | 34b5d2c68eb4082c288e70fb99c61af8f7b96fde (patch) | |
tree | 7c4c1e4e248a8e044dd891b0e54de1fcc03d7434 /block/vvfat.c | |
parent | bdrv: Use "Error" for creating images (diff) | |
download | qemu-34b5d2c68eb4082c288e70fb99c61af8f7b96fde.tar.gz qemu-34b5d2c68eb4082c288e70fb99c61af8f7b96fde.tar.xz qemu-34b5d2c68eb4082c288e70fb99c61af8f7b96fde.zip |
block: Error parameter for open functions
Add an Error ** parameter to bdrv_open, bdrv_file_open and associated
functions to allow more specific error messages.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/vvfat.c')
-rw-r--r-- | block/vvfat.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/block/vvfat.c b/block/vvfat.c index 2f8be7cf1a..788d0630fd 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -2910,6 +2910,7 @@ static int enable_write_target(BDRVVVFATState *s) { BlockDriver *bdrv_qcow; QEMUOptionParameter *options; + Error *local_err = NULL; int ret; int size = sector2cluster(s, s->sector_count); s->used_clusters = calloc(size, 1); @@ -2935,8 +2936,11 @@ static int enable_write_target(BDRVVVFATState *s) s->qcow = bdrv_new(""); ret = bdrv_open(s->qcow, s->qcow_filename, NULL, - BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH, bdrv_qcow); + BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH, bdrv_qcow, + &local_err); if (ret < 0) { + qerror_report_err(local_err); + error_free(local_err); bdrv_unref(s->qcow); goto err; } |