diff options
author | Wenchao Xia <wenchaoqemu@gmail.com> | 2014-06-18 08:43:30 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-06-23 11:01:25 -0400 |
commit | a589569f2f40a0454b52398035cfe7fbe44ab1e9 (patch) | |
tree | 4051a6ec079d736c41ea1ee07e903e0b9abf36a9 /blockjob.c | |
parent | f6dadb0242029e11640d9434efd39ec8211ea868 (diff) |
qapi: adjust existing defines
In order to let event defines use existing types later, instead of
redefine new ones, some old type defines for spice and vnc are changed,
and BlockErrorAction is moved from block.h to qapi schema. Note that
BlockErrorAction is not merged with BlockdevOnError.
At this point, VncInfo is not made a child of VncBasicInfo, because
VncBasicInfo has mandatory fields where VncInfo makes them optional.
Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'blockjob.c')
-rw-r--r-- | blockjob.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/blockjob.c b/blockjob.c index 7d84ca1d6c..bc63d42dc8 100644 --- a/blockjob.c +++ b/blockjob.c @@ -262,22 +262,23 @@ BlockErrorAction block_job_error_action(BlockJob *job, BlockDriverState *bs, switch (on_err) { case BLOCKDEV_ON_ERROR_ENOSPC: - action = (error == ENOSPC) ? BDRV_ACTION_STOP : BDRV_ACTION_REPORT; + action = (error == ENOSPC) ? + BLOCK_ERROR_ACTION_STOP : BLOCK_ERROR_ACTION_REPORT; break; case BLOCKDEV_ON_ERROR_STOP: - action = BDRV_ACTION_STOP; + action = BLOCK_ERROR_ACTION_STOP; break; case BLOCKDEV_ON_ERROR_REPORT: - action = BDRV_ACTION_REPORT; + action = BLOCK_ERROR_ACTION_REPORT; break; case BLOCKDEV_ON_ERROR_IGNORE: - action = BDRV_ACTION_IGNORE; + action = BLOCK_ERROR_ACTION_IGNORE; break; default: abort(); } bdrv_emit_qmp_error_event(job->bs, QEVENT_BLOCK_JOB_ERROR, action, is_read); - if (action == BDRV_ACTION_STOP) { + if (action == BLOCK_ERROR_ACTION_STOP) { block_job_pause(job); block_job_iostatus_set_err(job, error); if (bs != job->bs) { |