From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUibr-0004th-VQ for qemu-devel@nongnu.org; Thu, 28 Feb 2008 08:15:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUibp-0004pi-E4 for qemu-devel@nongnu.org; Thu, 28 Feb 2008 08:15:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUibp-0004pW-67 for qemu-devel@nongnu.org; Thu, 28 Feb 2008 08:15:37 -0500 Received: from smtp7-g19.free.fr ([212.27.42.64]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUibo-0002gm-UO for qemu-devel@nongnu.org; Thu, 28 Feb 2008 08:15:37 -0500 Received: from smtp7-g19.free.fr (localhost [127.0.0.1]) by smtp7-g19.free.fr (Postfix) with ESMTP id C8F003227EF for ; Thu, 28 Feb 2008 14:15:35 +0100 (CET) Received: from [127.0.0.1] (rob92-4-82-225-201-66.fbx.proxad.net [82.225.201.66]) by smtp7-g19.free.fr (Postfix) with ESMTP id 8F44D322806 for ; Thu, 28 Feb 2008 14:15:35 +0100 (CET) Message-ID: <47C6B3FC.6070906@reactos.org> Date: Thu, 28 Feb 2008 14:15:40 +0100 From: =?ISO-8859-1?Q?Herv=E9_Poussineau?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050406090100090802040603" Subject: [Qemu-devel] [PATCH] Fix sun4m machine if MAX_FD != 2 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------050406090100090802040603 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi, In sun4m.c machine, attached patch removes assumption that MAX_FD is 2. Herv=E9 --------------050406090100090802040603 Content-Type: text/plain; name="sun4m.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sun4m.patch" Index: sun4m.c =================================================================== RCS file: /sources/qemu/qemu/hw/sun4m.c,v retrieving revision 1.84 diff -u -r1.84 sun4m.c --- sun4m.c 11 Feb 2008 20:01:36 -0000 1.84 +++ sun4m.c 27 Feb 2008 08:50:38 -0000 @@ -492,7 +492,7 @@ if (hwdef->fd_base != (target_phys_addr_t)-1) { /* there is zero or one floppy drive */ - fd[1] = fd[0] = NULL; + memset(fd, 0, sizeof(fd)); index = drive_get_index(IF_FLOPPY, 0, 0); if (index != -1) fd[0] = drives_table[index].bdrv; --------------050406090100090802040603--