From e4bcb14c79fb63a35aef3eb39e02c16c19b8b28d Mon Sep 17 00:00:00 2001 From: ths Date: Sun, 2 Dec 2007 04:51:10 +0000 Subject: Add -drive parameter, by Laurent Vivier. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3759 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/integratorcp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'hw/integratorcp.c') diff --git a/hw/integratorcp.c b/hw/integratorcp.c index f1d71ff873..549cc25df8 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -478,6 +478,7 @@ static void integratorcp_init(int ram_size, int vga_ram_size, uint32_t bios_offset; qemu_irq *pic; qemu_irq *cpu_pic; + int sd; if (!cpu_model) cpu_model = "arm926"; @@ -506,7 +507,12 @@ static void integratorcp_init(int ram_size, int vga_ram_size, icp_control_init(0xcb000000); pl050_init(0x18000000, pic[3], 0); pl050_init(0x19000000, pic[4], 1); - pl181_init(0x1c000000, sd_bdrv, pic[23], pic[24]); + sd = drive_get_index(IF_SD, 0, 0); + if (sd == -1) { + fprintf(stderr, "qemu: missing SecureDigital card\n"); + exit(1); + } + pl181_init(0x1c000000, drives_table[sd].bdrv, pic[23], pic[24]); if (nd_table[0].vlan) { if (nd_table[0].model == NULL || strcmp(nd_table[0].model, "smc91c111") == 0) { -- cgit v1.2.3