aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc_prep.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2011-04-03 20:32:46 +0900
committerKevin Wolf <kwolf@redhat.com>2011-04-07 13:51:48 +0200
commit757179038c4884dc43c2ecd0f4da3facb24f262c (patch)
tree76dd8c9d36c5324187b4650d672edb7fb9edb967 /hw/ppc_prep.c
parente2982c3a27ab4c0879e61de3c9c57b838f7d0966 (diff)
ide: consolidate drive_get(IF_IDE)
factor out ide initialization to call drive_get(IF_IDE) Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ppc_prep.c')
-rw-r--r--hw/ppc_prep.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 5615ef9ad8..0e9cfc24cd 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -681,15 +681,7 @@ static void ppc_prep_init (ram_addr_t ram_size,
}
}
- if (drive_get_max_bus(IF_IDE) >= MAX_IDE_BUS) {
- fprintf(stderr, "qemu: too many IDE bus\n");
- exit(1);
- }
-
- for(i = 0; i < MAX_IDE_BUS * MAX_IDE_DEVS; i++) {
- hd[i] = drive_get(IF_IDE, i / MAX_IDE_DEVS, i % MAX_IDE_DEVS);
- }
-
+ ide_drive_get(hd, MAX_IDE_BUS);
for(i = 0; i < MAX_IDE_BUS; i++) {
isa_ide_init(ide_iobase[i], ide_iobase2[i], ide_irq[i],
hd[2 * i],