mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine
QEMU currently crashes when the user tries to do something like: qemu-system-x86_64 -M x-remote -device piix3-ide This happens because the "isabus" variable is not initialized with the x-remote machine yet. Add a proper check for this condition and propagate the error to the caller, so we can fail there gracefully. Message-Id: <20210416125256.2039734-1-thuth@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
283f0a05e2
commit
9405d87be2
5 changed files with 46 additions and 21 deletions
|
@ -624,7 +624,7 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDEDriveKind kind,
|
|||
int chs_trans, Error **errp);
|
||||
void ide_init2(IDEBus *bus, qemu_irq irq);
|
||||
void ide_exit(IDEState *s);
|
||||
void ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2);
|
||||
int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2);
|
||||
void ide_register_restart_cb(IDEBus *bus);
|
||||
|
||||
void ide_exec_cmd(IDEBus *bus, uint32_t val);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue