diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-02 04:51:10 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-02 04:51:10 +0000 |
commit | e4bcb14c79fb63a35aef3eb39e02c16c19b8b28d (patch) | |
tree | 06bee4b9dbf4c7b50e20c9996924d7d132cdfec2 /hw/spitz.c | |
parent | 7233b355571ad2a8e7aec7eb19db5f530e81f052 (diff) |
Add -drive parameter, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3759 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/spitz.c')
-rw-r--r-- | hw/spitz.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/spitz.c b/hw/spitz.c index 461a60dd83..159c633789 100644 --- a/hw/spitz.c +++ b/hw/spitz.c @@ -940,9 +940,14 @@ static void spitz_ssp_attach(struct pxa2xx_state_s *cpu) static void spitz_microdrive_attach(struct pxa2xx_state_s *cpu) { struct pcmcia_card_s *md; - BlockDriverState *bs = bs_table[0]; + int index; + BlockDriverState *bs; - if (bs && bdrv_is_inserted(bs) && !bdrv_is_removable(bs)) { + index = drive_get_index(IF_IDE, 0, 0); + if (index == -1) + return; + bs = drives_table[index].bdrv; + if (bdrv_is_inserted(bs) && !bdrv_is_removable(bs)) { md = dscm1xxxx_init(bs); pxa2xx_pcmcia_attach(cpu->pcmcia[1], md); } |