diff options
author | Fam Zheng <famz@redhat.com> | 2013-10-08 17:29:40 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-10-11 10:52:54 +0200 |
commit | 79e14bf7782d861d3d773a67680de07a8f354f4e (patch) | |
tree | 07922b6bb3b2b800babb90dd795ee241e9dc2a31 /blockjob.c | |
parent | 2cb5b22286a7546226d9e9363aaee543fcba6b61 (diff) |
qapi: make use of new BlockJobType
Switch the string to enum type BlockJobType in BlockJobDriver.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockjob.c')
-rw-r--r-- | blockjob.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/blockjob.c b/blockjob.c index 6814e699fc..9e5fd5c162 100644 --- a/blockjob.c +++ b/blockjob.c @@ -209,7 +209,7 @@ void block_job_sleep_ns(BlockJob *job, QEMUClockType type, int64_t ns) BlockJobInfo *block_job_query(BlockJob *job) { BlockJobInfo *info = g_new0(BlockJobInfo, 1); - info->type = g_strdup(job->driver->job_type); + info->type = g_strdup(BlockJobType_lookup[job->driver->job_type]); info->device = g_strdup(bdrv_get_device_name(job->bs)); info->len = job->len; info->busy = job->busy; @@ -236,7 +236,7 @@ QObject *qobject_from_block_job(BlockJob *job) "'len': %" PRId64 "," "'offset': %" PRId64 "," "'speed': %" PRId64 " }", - job->driver->job_type, + BlockJobType_lookup[job->driver->job_type], bdrv_get_device_name(job->bs), job->len, job->offset, |