diff options
author | Markus Armbruster <armbru@redhat.com> | 2012-06-13 10:11:50 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-06-15 14:03:43 +0200 |
commit | 093003b1d3d7453d65bcbe8ad7e911950fc076f5 (patch) | |
tree | 22913be6da30b0869af11adb82704641aef05055 /hw/xen_disk.c | |
parent | 8814a05112632ec30f0b5b41d7b2cc639199c7f9 (diff) |
xen: Don't peek behind the BlockDriverState abstraction
First offender is xen_config_dev_blk()'s use of disk->bdrv->filename.
Get the filename from disk->opts instead. Same result, except for
snapshots: there, we now get the filename specified by the user
instead of the name of the temporary image created by bdrv_open().
Should be an improvement.
Second offender is blk_init()'s use of blkdev->bs->drv->format_name.
Simply use the appropriate interface to get the format name.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/xen_disk.c')
-rw-r--r-- | hw/xen_disk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/xen_disk.c b/hw/xen_disk.c index de7e8a4a5c..fb68ed9bbf 100644 --- a/hw/xen_disk.c +++ b/hw/xen_disk.c @@ -40,7 +40,6 @@ #include <xen/io/xenbus.h> #include "hw.h" -#include "block_int.h" #include "qemu-char.h" #include "xen_blkif.h" #include "xen_backend.h" @@ -650,7 +649,7 @@ static int blk_init(struct XenDevice *xendev) if (blkdev->file_size < 0) { xen_be_printf(&blkdev->xendev, 1, "bdrv_getlength: %d (%s) | drv %s\n", (int)blkdev->file_size, strerror(-blkdev->file_size), - blkdev->bs->drv ? blkdev->bs->drv->format_name : "-"); + bdrv_get_format_name(blkdev->bs) ?: "-"); blkdev->file_size = 0; } |