diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 0e2cdd63b9..3a4e364a8d 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -43,6 +43,25 @@ VIR_LOG_INIT("qemu.qemu_blockjob"); +/* Note that qemuBlockjobState and qemuBlockjobType values are formatted into + * the status XML */ +VIR_ENUM_IMPL(qemuBlockjobState, + QEMU_BLOCKJOB_STATE_LAST, + "completed", + "failed", + "cancelled", + "ready", + "new", + "running"); + +VIR_ENUM_IMPL(qemuBlockjob, + QEMU_BLOCKJOB_TYPE_LAST, + "", + "pull", + "copy", + "commit", + "active-commit", + ""); static virClassPtr qemuBlockJobDataClass; diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h index b7aaa86f4d..77298a4bea 100644 --- a/src/qemu/qemu_blockjob.h +++ b/src/qemu/qemu_blockjob.h @@ -42,6 +42,8 @@ typedef enum { } qemuBlockjobState; verify((int)QEMU_BLOCKJOB_STATE_NEW == VIR_DOMAIN_BLOCK_JOB_LAST); +VIR_ENUM_DECL(qemuBlockjobState); + /** * This enum has to map all known block job types from enum virDomainBlockJobType * to the same values. All internal blockjobs can be mapped after and don't @@ -60,6 +62,8 @@ typedef enum { } qemuBlockJobType; verify((int)QEMU_BLOCKJOB_TYPE_INTERNAL == VIR_DOMAIN_BLOCK_JOB_TYPE_LAST); +VIR_ENUM_DECL(qemuBlockjob); + typedef struct _qemuBlockJobData qemuBlockJobData; typedef qemuBlockJobData *qemuBlockJobDataPtr;