aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-06-17 13:14:46 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-06-17 13:14:46 -0500
commit21a885a7e2a0f532f7653a2607efddbd83504430 (patch)
tree6c633a6174cda24a78cece7a2b157cb108ad42bb /blockdev.c
parent128dc2d1e4cb98ddbe9c0df2e0c914dc00925dac (diff)
parentdbfbc6373441e436ac6e2bcf7a8acb284225aa21 (diff)
downloadqemu-21a885a7e2a0f532f7653a2607efddbd83504430.zip
qemu-21a885a7e2a0f532f7653a2607efddbd83504430.tar.gz
qemu-21a885a7e2a0f532f7653a2607efddbd83504430.tar.bz2
Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Luiz Capitulino # Via Luiz Capitulino * luiz/queue/qmp: qerror: drop QERR_OPEN_FILE_FAILED macro block: bdrv_reopen_prepare(): don't use QERR_OPEN_FILE_FAILED savevm: qmp_xen_save_devices_state(): use error_setg_file_open() dump: qmp_dump_guest_memory(): use error_setg_file_open() cpus: use error_setg_file_open() blockdev: use error_setg_file_open() block: mirror_complete(): use error_setg_file_open() rng-random: use error_setg_file_open() error: add error_setg_file_open() helper Message-id: 1371484631-29510-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/blockdev.c b/blockdev.c
index 9937311..5975dde 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -899,7 +899,7 @@ static void external_snapshot_prepare(BlkTransactionStates *common,
ret = bdrv_open(states->new_bs, new_image_file, NULL,
flags | BDRV_O_NO_BACKING, drv);
if (ret != 0) {
- error_set(errp, QERR_OPEN_FILE_FAILED, new_image_file);
+ error_setg_file_open(errp, -ret, new_image_file);
}
}
@@ -1062,8 +1062,11 @@ static void qmp_bdrv_open_encrypted(BlockDriverState *bs, const char *filename,
int bdrv_flags, BlockDriver *drv,
const char *password, Error **errp)
{
- if (bdrv_open(bs, filename, NULL, bdrv_flags, drv) < 0) {
- error_set(errp, QERR_OPEN_FILE_FAILED, filename);
+ int ret;
+
+ ret = bdrv_open(bs, filename, NULL, bdrv_flags, drv);
+ if (ret < 0) {
+ error_setg_file_open(errp, -ret, filename);
return;
}
@@ -1483,7 +1486,7 @@ void qmp_drive_mirror(const char *device, const char *target,
if (ret < 0) {
bdrv_delete(target_bs);
- error_set(errp, QERR_OPEN_FILE_FAILED, target);
+ error_setg_file_open(errp, -ret, target);
return;
}