mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
Don't rely on the fact that MAX_FD is 2 (Herve Poussineau)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5810 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
6c173b3c09
commit
ce802585a9
1 changed files with 1 additions and 1 deletions
|
@ -1589,7 +1589,7 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
|
||||||
|
|
||||||
if (hwdef->fd_base != (target_phys_addr_t)-1) {
|
if (hwdef->fd_base != (target_phys_addr_t)-1) {
|
||||||
/* there is zero or one floppy drive */
|
/* there is zero or one floppy drive */
|
||||||
fd[1] = fd[0] = NULL;
|
memset(fd, 0, sizeof(fd));
|
||||||
drive_index = drive_get_index(IF_FLOPPY, 0, 0);
|
drive_index = drive_get_index(IF_FLOPPY, 0, 0);
|
||||||
if (drive_index != -1)
|
if (drive_index != -1)
|
||||||
fd[0] = drives_table[drive_index].bdrv;
|
fd[0] = drives_table[drive_index].bdrv;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue