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>
This commit is contained in:
Max Reitz
2013-09-05 14:45:29 +02:00
committed by Kevin Wolf
parent d5124c00d8
commit 34b5d2c68e
17 changed files with 163 additions and 85 deletions

View File

@ -387,8 +387,10 @@ static int blkdebug_open(BlockDriverState *bs, QDict *options, int flags,
goto fail;
}
ret = bdrv_file_open(&bs->file, filename, NULL, flags);
ret = bdrv_file_open(&bs->file, filename, NULL, flags, &local_err);
if (ret < 0) {
qerror_report_err(local_err);
error_free(local_err);
goto fail;
}