block: Prepare remaining BB functions for NULL BDS
commita46fc9c95012f3d7ed2b29b59f042246d62a08d7
authorMax Reitz <mreitz@redhat.com>
Mon, 19 Oct 2015 15:53:27 +0000 (19 17:53 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 23 Oct 2015 16:18:23 +0000 (23 18:18 +0200)
tree7710cbe1e5eaeaf6b35fbd43222fd63eb34ec80c
parentc09ba36c9ab62e3043041e429205f57ffbe3ba8b
block: Prepare remaining BB functions for NULL BDS

There are several BlockBackend functions which, in theory, cannot fail.
This patch makes them cope with the BlockDriverState pointer being NULL
by making them fall back to some default action like ignoring the value
in setters and returning the default in getters.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/block-backend.c