Revision d75d25e3
b/hw/virtio-blk.c | ||
---|---|---|
12 | 12 |
*/ |
13 | 13 |
|
14 | 14 |
#include <qemu-common.h> |
15 |
#include "qemu-error.h" |
|
15 | 16 |
#include "virtio-blk.h" |
16 | 17 |
#ifdef __linux__ |
17 | 18 |
# include <scsi/sg.h> |
... | ... | |
490 | 491 |
static int virtio_blk_id; |
491 | 492 |
DriveInfo *dinfo; |
492 | 493 |
|
494 |
if (!conf->bs) { |
|
495 |
error_report("virtio-blk-pci: drive property not set"); |
|
496 |
return NULL; |
|
497 |
} |
|
498 |
|
|
493 | 499 |
s = (VirtIOBlock *)virtio_common_init("virtio-blk", VIRTIO_ID_BLOCK, |
494 | 500 |
sizeof(struct virtio_blk_config), |
495 | 501 |
sizeof(VirtIOBlock)); |
b/hw/virtio-pci.c | ||
---|---|---|
546 | 546 |
proxy->class_code != PCI_CLASS_STORAGE_OTHER) |
547 | 547 |
proxy->class_code = PCI_CLASS_STORAGE_SCSI; |
548 | 548 |
|
549 |
if (!proxy->block.bs) { |
|
550 |
error_report("virtio-blk-pci: drive property not set"); |
|
551 |
return -1; |
|
552 |
} |
|
553 | 549 |
vdev = virtio_blk_init(&pci_dev->qdev, &proxy->block); |
554 | 550 |
if (!vdev) { |
555 | 551 |
return -1; |
Also available in: Unified diff