summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell2014-08-28 18:08:13 +0200
committerPeter Maydell2014-08-28 18:08:13 +0200
commita6aebb38ba4682951ab04fe6d6e6b169bd9e4dca (patch)
tree7431ca40c5bc6882e9122326c7a2d6b140c5ba56 /include
parentMerge remote-tracking branch 'remotes/kvm/tags/for-upstream' into staging (diff)
parentmemory: Lazy init name from QOM name as needed (diff)
downloadqemu-a6aebb38ba4682951ab04fe6d6e6b169bd9e4dca.tar.gz
qemu-a6aebb38ba4682951ab04fe6d6e6b169bd9e4dca.tar.xz
qemu-a6aebb38ba4682951ab04fe6d6e6b169bd9e4dca.zip
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
SCSI patches include bug fixes from Fam and Peter, improved error reporting from Fam and a fix for DPRINTF bitrot. Memory patches try again to initialize name from the QOM name. # gpg: Signature made Thu 28 Aug 2014 15:10:31 BST using RSA key ID 9B4D86F2 # gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>" # gpg: aka "Paolo Bonzini <bonzini@gnu.org>" * remotes/bonzini/tags/for-upstream: memory: Lazy init name from QOM name as needed xen: hvm: Abstract away memory region name ref xen-hvm: Constify string virtio-scsi: Report error if num_queues is 0 or too large scsi-generic: remove superfluous DPRINTF avoid to break compiling block/iscsi: fix memory corruption on iscsi resize scsi-bus: Convert DeviceClass init to realize block: Pass errp in blkconf_geometry Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/block/block.h6
-rw-r--r--include/hw/scsi/scsi.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/include/hw/block/block.h b/include/hw/block/block.h
index 7c3d6c8178..3a0148848b 100644
--- a/include/hw/block/block.h
+++ b/include/hw/block/block.h
@@ -12,6 +12,7 @@
#define HW_BLOCK_COMMON_H
#include "qemu-common.h"
+#include "qapi/error.h"
/* Configuration */
@@ -60,8 +61,9 @@ static inline unsigned int get_physical_block_exp(BlockConf *conf)
/* Configuration helpers */
void blkconf_serial(BlockConf *conf, char **serial);
-int blkconf_geometry(BlockConf *conf, int *trans,
- unsigned cyls_max, unsigned heads_max, unsigned secs_max);
+void blkconf_geometry(BlockConf *conf, int *trans,
+ unsigned cyls_max, unsigned heads_max, unsigned secs_max,
+ Error **errp);
/* Hard disk geometry */
diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h
index a7a28e6bbd..2e3a8f987d 100644
--- a/include/hw/scsi/scsi.h
+++ b/include/hw/scsi/scsi.h
@@ -74,8 +74,8 @@ struct SCSIRequest {
typedef struct SCSIDeviceClass {
DeviceClass parent_class;
- int (*init)(SCSIDevice *dev);
- void (*destroy)(SCSIDevice *s);
+ void (*realize)(SCSIDevice *dev, Error **errp);
+ void (*unrealize)(SCSIDevice *dev, Error **errp);
int (*parse_cdb)(SCSIDevice *dev, SCSICommand *cmd, uint8_t *buf,
void *hba_private);
SCSIRequest *(*alloc_req)(SCSIDevice *s, uint32_t tag, uint32_t lun,