mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
bootindex: move calling add_boot_device_patch to bootindex setter function
On this way, we can assure the new bootindex take effect during vm rebooting. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
d2b186f96d
commit
d749e10c4f
18 changed files with 2 additions and 32 deletions
|
@ -2269,7 +2269,6 @@ static void scsi_realize(SCSIDevice *dev, Error **errp)
|
|||
bdrv_set_guest_block_size(s->qdev.conf.bs, s->qdev.blocksize);
|
||||
|
||||
bdrv_iostatus_enable(s->qdev.conf.bs);
|
||||
add_boot_device_path(s->qdev.conf.bootindex, &dev->qdev, NULL);
|
||||
}
|
||||
|
||||
static void scsi_hd_realize(SCSIDevice *dev, Error **errp)
|
||||
|
|
|
@ -413,9 +413,6 @@ static void scsi_generic_realize(SCSIDevice *s, Error **errp)
|
|||
/* define device state */
|
||||
s->type = scsiid.scsi_type;
|
||||
DPRINTF("device type %d\n", s->type);
|
||||
if (s->type == TYPE_DISK || s->type == TYPE_ROM) {
|
||||
add_boot_device_path(s->conf.bootindex, &s->qdev, NULL);
|
||||
}
|
||||
|
||||
switch (s->type) {
|
||||
case TYPE_TAPE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue