From: Kevin Wolf Date: Tue, 25 Jun 2013 13:13:43 +0000 (+0200) Subject: block: Make BlockJobTypes const X-Git-Tag: qemu-xen-4.4.0-rc1~6^2~252^2~6 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f59fee8d509b446df24843c1145a99b740492725;p=qemu-upstream-4.4-testing.git block: Make BlockJobTypes const Signed-off-by: Kevin Wolf --- diff --git a/block/commit.c b/block/commit.c index 553447efe..2227fc2e6 100644 --- a/block/commit.c +++ b/block/commit.c @@ -173,7 +173,7 @@ static void commit_set_speed(BlockJob *job, int64_t speed, Error **errp) ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE, SLICE_TIME); } -static BlockJobType commit_job_type = { +static const BlockJobType commit_job_type = { .instance_size = sizeof(CommitBlockJob), .job_type = "commit", .set_speed = commit_set_speed, diff --git a/block/mirror.c b/block/mirror.c index 1ae724f70..bed4a7ead 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -524,7 +524,7 @@ static void mirror_complete(BlockJob *job, Error **errp) block_job_resume(job); } -static BlockJobType mirror_job_type = { +static const BlockJobType mirror_job_type = { .instance_size = sizeof(MirrorBlockJob), .job_type = "mirror", .set_speed = mirror_set_speed, diff --git a/block/stream.c b/block/stream.c index d6df06f35..7fe9e486b 100644 --- a/block/stream.c +++ b/block/stream.c @@ -198,7 +198,7 @@ static void stream_set_speed(BlockJob *job, int64_t speed, Error **errp) ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE, SLICE_TIME); } -static BlockJobType stream_job_type = { +static const BlockJobType stream_job_type = { .instance_size = sizeof(StreamBlockJob), .job_type = "stream", .set_speed = stream_set_speed,