Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GNvvA-0005n5-BG for mharc-grub-devel@gnu.org; Thu, 14 Sep 2006 14:26:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GNvv9-0005mr-Mz for grub-devel@gnu.org; Thu, 14 Sep 2006 14:26:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GNvv7-0005m9-TG for grub-devel@gnu.org; Thu, 14 Sep 2006 14:26:42 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNvv7-0005m5-Kg for grub-devel@gnu.org; Thu, 14 Sep 2006 14:26:41 -0400 Received: from [69.60.117.155] (helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GNvx7-0002oh-Bd for grub-devel@gnu.org; Thu, 14 Sep 2006 14:28:45 -0400 Received: from 138.red-62-57-141.user.auna.net ([62.57.141.138] helo=khazad.dyndns.org) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.63) (envelope-from ) id 1GNvux-0006RY-2U for grub-devel@gnu.org; Thu, 14 Sep 2006 20:26:31 +0200 Received: from rmh by khazad.dyndns.org with local (Exim 4.63) (envelope-from ) id 1GNvwS-0005MT-Dt for grub-devel@gnu.org; Thu, 14 Sep 2006 20:28:04 +0200 Date: Thu, 14 Sep 2006 20:28:03 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20060914182803.GA20575@khazad.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. User-Agent: Mutt/1.5.13 (2006-08-11) Subject: [PATCH] don't assume floppy device exists X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2006 18:26:44 -0000 --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline grub-install used to fail with "/dev/fd0 not found" errors. See attached patch. 2006-09-14 Robert Millan * util/i386/pc/grub-mkdevicemap.c: Make sure floppy device exists before adding it to device.map. -- Robert Millan My spam trap is honeypot@aybabtu.com. Note: this address is only intended for spam harvesters. Writing to it will get you added to my black list. --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="04_mkdevicemap_dont_assume_floppies.diff" 2006-09-14 Robert Millan * util/i386/pc/grub-mkdevicemap.c: Make sure floppy device exists before adding it to device.map. Index: util/i386/pc/grub-mkdevicemap.c =================================================================== RCS file: /sources/grub/grub2/util/i386/pc/grub-mkdevicemap.c,v retrieving revision 1.2 diff -u -r1.2 grub-mkdevicemap.c --- util/i386/pc/grub-mkdevicemap.c 24 Jul 2005 18:16:25 -0000 1.2 +++ util/i386/pc/grub-mkdevicemap.c 14 Sep 2006 17:54:36 -0000 @@ -378,8 +378,11 @@ for (i = 0; i < floppy_disks; i++) { char name[16]; + struct stat st; get_floppy_disk_name (name, i); + if (stat (name, &st) < 0) + break; /* In floppies, write the map, whether check_device succeeds or not, because the user just may not insert floppies. */ if (fp) --bg08WKrSYDhXBjb5--