aboutsummaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-04-12 17:57:08 +0200
committerKevin Wolf <kwolf@redhat.com>2018-05-23 14:30:49 +0200
commit252291eaeafcd234a602d71cdf9415dbfc7bc867 (patch)
treeda2af639f71ecd9d28e601b4c1b2ae73435896a8 /job.c
parent8e4c87000fc515f8f65f7c8f18afb1e9270b11d6 (diff)
job: Add JobDriver.job_type
This moves the job_type field from BlockJobDriver to JobDriver. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'job.c')
-rw-r--r--job.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/job.c b/job.c
index 87fd48468c..83724a43de 100644
--- a/job.c
+++ b/job.c
@@ -29,6 +29,16 @@
#include "qemu/job.h"
#include "qemu/id.h"
+JobType job_type(const Job *job)
+{
+ return job->driver->job_type;
+}
+
+const char *job_type_str(const Job *job)
+{
+ return JobType_str(job_type(job));
+}
+
void *job_create(const char *job_id, const JobDriver *driver, Error **errp)
{
Job *job;