diff mbox

[RFC,6/6] Support "bootonceindex" property for SCSI disks.

Message ID a86a3716c8980ef62f7194613dfbf10cab447a26.1489494746.git.janne.huttunen@nokia.com
State New
Headers show

Commit Message

Janne Huttunen March 14, 2017, 12:50 p.m. UTC
Signed-off-by: Janne Huttunen <janne.huttunen@nokia.com>
---
 hw/scsi/scsi-bus.c       | 3 +++
 include/hw/block/block.h | 1 +
 2 files changed, 4 insertions(+)
diff mbox

Patch

diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 5940cb1..26e38ab 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -2084,6 +2084,9 @@  static void scsi_dev_instance_init(Object *obj)
     device_add_bootindex_property(obj, &s->conf.bootindex,
                                   "bootindex", NULL,
                                   &s->qdev, NULL);
+    device_add_bootonceindex_property(obj, &s->conf.bootonceindex,
+                                      "bootonceindex", NULL,
+                                      &s->qdev, NULL);
 }
 
 static const TypeInfo scsi_device_type_info = {
diff --git a/include/hw/block/block.h b/include/hw/block/block.h
index df9d207..f3e76c3 100644
--- a/include/hw/block/block.h
+++ b/include/hw/block/block.h
@@ -22,6 +22,7 @@  typedef struct BlockConf {
     uint16_t min_io_size;
     uint32_t opt_io_size;
     int32_t bootindex;
+    int32_t bootonceindex;
     uint32_t discard_granularity;
     /* geometry, not all devices use this */
     uint32_t cyls, heads, secs;