diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-10-07 13:59:11 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-10-20 13:41:26 +0200 |
commit | bfb197e0d998bea8741c65492b2b42f443729249 (patch) | |
tree | c7b9a48dc7dd7790d678a7a13f5ba245931876ad /blockjob.c | |
parent | fea68bb6e9fa65c7cc6caa6adda810d1d0fdbde4 (diff) | |
download | qemu-bfb197e0d998bea8741c65492b2b42f443729249.zip qemu-bfb197e0d998bea8741c65492b2b42f443729249.tar.gz qemu-bfb197e0d998bea8741c65492b2b42f443729249.tar.bz2 |
block: Eliminate BlockDriverState member device_name[]
device_name[] can become non-empty only in bdrv_new_root() and
bdrv_move_feature_fields(). The latter is used only to undo damage
done by bdrv_swap(). The former is called only by blk_new_with_bs().
Therefore, when a BlockDriverState's device_name[] is non-empty, then
it's been created with a BlockBackend, and vice versa. Furthermore,
blk_new_with_bs() keeps the two names equal.
Therefore, device_name[] is redundant. Eliminate it.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockjob.c')
-rw-r--r-- | blockjob.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -107,7 +107,8 @@ void block_job_set_speed(BlockJob *job, int64_t speed, Error **errp) void block_job_complete(BlockJob *job, Error **errp) { if (job->paused || job->cancelled || !job->driver->complete) { - error_set(errp, QERR_BLOCK_JOB_NOT_READY, job->bs->device_name); + error_set(errp, QERR_BLOCK_JOB_NOT_READY, + bdrv_get_device_name(job->bs)); return; } |