scsi: more fixes to properties for passthrough devices
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 28 Aug 2012 10:46:18 +0000 (12:46 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 28 Aug 2012 12:50:08 +0000 (14:50 +0200)
Commit 0384783 (scsi-block: remove properties that are not relevant for
passthrough, 2012-07-09) removed one property that should have been
left there, "bootindex".

It also did not touch scsi-generic, while it should have.

Fix both problems.

Reported-by: Alexandre DERUMIER <aderumier@odiso.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi-disk.c
hw/scsi-generic.c

index 409f760ef78eacd392a190ef227b804f1c639b40..21b862dadbe24aa9b14be6474c6b5a7900958471 100644 (file)
@@ -2421,6 +2421,7 @@ static TypeInfo scsi_cd_info = {
 #ifdef __linux__
 static Property scsi_block_properties[] = {
     DEFINE_PROP_DRIVE("drive", SCSIDiskState, qdev.conf.bs),
+    DEFINE_PROP_INT32("bootindex", SCSIDiskState, qdev.conf.bootindex, -1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
index 8d5106061e375ced0e864b12f54ab99dcbca582f..a5eb663ecfd2861003a92ecc53f2548987559df3 100644 (file)
@@ -479,7 +479,8 @@ static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun,
 }
 
 static Property scsi_generic_properties[] = {
-    DEFINE_BLOCK_PROPERTIES(SCSIDevice, conf),
+    DEFINE_PROP_DRIVE("drive", SCSIDevice, conf.bs),
+    DEFINE_PROP_INT32("bootindex", SCSIDevice, conf.bootindex, -1),
     DEFINE_PROP_END_OF_LIST(),
 };