[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 26/28] block: remove bootindex property from qdev
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH v7 26/28] block: remove bootindex property from qdev to qom |
Date: |
Fri, 5 Sep 2014 16:37:34 +0800 |
From: Gonglei <address@hidden>
Remove bootindex form qdev property to qom, things will
continue to work just fine, and we can use qom features
which are not supported by qdev property.
Meanwhile set the initial value of bootindex to -1.
Signed-off-by: Gonglei <address@hidden>
---
hw/block/virtio-blk.c | 1 +
hw/ide/qdev.c | 1 +
hw/scsi/scsi-disk.c | 2 +-
hw/scsi/scsi-generic.c | 1 -
include/hw/block/block.h | 1 -
5 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 9d04590..4d05114 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -808,6 +808,7 @@ static void virtio_blk_instance_init(Object *obj)
device_add_bootindex_property(obj, &s->conf->bootindex,
"bootindex", "/address@hidden,0",
DEVICE(obj), NULL);
+ object_property_set_int(obj, -1, "bootindex", NULL);
}
static Property virtio_blk_properties[] = {
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 9e2ed40..8382f24 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -200,6 +200,7 @@ static void ide_dev_instance_init(Object *obj)
"bootindex",
d->unit ? "/address@hidden" :
"/address@hidden",
&d->qdev, NULL);
+ object_property_set_int(obj, -1, "bootindex", NULL);
}
static int ide_hd_initfn(IDEDevice *dev)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 205cdb0..c37a8be 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -2339,6 +2339,7 @@ void scsi_dev_instance_init(Object *obj)
device_add_bootindex_property(obj, &s->conf.bootindex,
"bootindex", NULL,
&s->qdev, NULL);
+ object_property_set_int(obj, -1, "bootindex", NULL);
}
static const SCSIReqOps scsi_disk_emulate_reqops = {
@@ -2692,7 +2693,6 @@ static const 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(),
};
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index f6100a9..a542d1a 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -482,7 +482,6 @@ static SCSIRequest *scsi_new_request(SCSIDevice *d,
uint32_t tag, uint32_t lun,
static Property scsi_generic_properties[] = {
DEFINE_PROP_DRIVE("drive", SCSIDevice, conf.bs),
- DEFINE_PROP_INT32("bootindex", SCSIDevice, conf.bootindex, -1),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/block/block.h b/include/hw/block/block.h
index 3a01488..867a226 100644
--- a/include/hw/block/block.h
+++ b/include/hw/block/block.h
@@ -49,7 +49,6 @@ static inline unsigned int get_physical_block_exp(BlockConf
*conf)
_conf.physical_block_size, 512), \
DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0), \
DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0), \
- DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1), \
DEFINE_PROP_UINT32("discard_granularity", _state, \
_conf.discard_granularity, -1)
--
1.7.12.4
- Re: [Qemu-devel] [PATCH v7 18/28] host-libusb: remove bootindex property from qdev to qom, (continued)
- [Qemu-devel] [PATCH v7 17/28] net: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 16/28] usb-net: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 07/28] bootindex: add a setter/getter functions wrapper for bootindex property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 03/28] bootindex: add del_boot_device_path function, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 20/28] vfio: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 22/28] isa-fdc: remove bootindexA/B property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 23/28] scsi: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 09/28] e1000: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 26/28] block: remove bootindex property from qdev to qom,
arei.gonglei <=
- [Qemu-devel] [PATCH v7 21/28] redirect: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 24/28] ide: add bootindex to qom property, arei.gonglei, 2014/09/05
[Qemu-devel] [PATCH v7 25/28] virtio-blk: add bootindex to qom property, arei.gonglei, 2014/09/05
[Qemu-devel] [PATCH v7 28/28] bootindex: delete bootindex when device is removed, arei.gonglei, 2014/09/05
[Qemu-devel] [PATCH v7 02/28] bootindex: add check bootindex function, arei.gonglei, 2014/09/05