diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/block/blockjob_int.h | 3 | ||||
-rw-r--r-- | include/qemu/job.h | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index 8e7e0a2f57..1e62d6dd30 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -38,9 +38,6 @@ struct BlockJobDriver { /** Generic JobDriver callbacks and settings */ JobDriver job_driver; - /** String describing the operation, part of query-block-jobs QMP API */ - JobType job_type; - /** Mandatory: Entrypoint for the Coroutine. */ CoroutineEntry *start; diff --git a/include/qemu/job.h b/include/qemu/job.h index b4b49f19e1..279ce688fd 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -26,6 +26,8 @@ #ifndef JOB_H #define JOB_H +#include "qapi/qapi-types-block-core.h" + typedef struct JobDriver JobDriver; /** @@ -45,6 +47,9 @@ typedef struct Job { struct JobDriver { /** Derived Job struct size */ size_t instance_size; + + /** Enum describing the operation */ + JobType job_type; }; @@ -57,4 +62,10 @@ struct JobDriver { */ void *job_create(const char *job_id, const JobDriver *driver, Error **errp); +/** Returns the JobType of a given Job. */ +JobType job_type(const Job *job); + +/** Returns the enum string for the JobType of a given Job. */ +const char *job_type_str(const Job *job); + #endif |