From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Itp4M-0000cN-O8 for mharc-grub-devel@gnu.org; Sun, 18 Nov 2007 13:40:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Itp4L-0000ZX-9c for grub-devel@gnu.org; Sun, 18 Nov 2007 13:40:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Itp4I-0000UN-8u for grub-devel@gnu.org; Sun, 18 Nov 2007 13:40:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Itp4I-0000U3-5U for grub-devel@gnu.org; Sun, 18 Nov 2007 13:40:30 -0500 Received: from mailout06.sul.t-online.de ([194.25.134.19] helo=mailout06.sul.t-online.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Itp4H-0008Ks-Jk for grub-devel@gnu.org; Sun, 18 Nov 2007 13:40:29 -0500 Received: from fwd33.aul.t-online.de by mailout06.sul.t-online.com with smtp id 1Itp4G-0001R4-00; Sun, 18 Nov 2007 19:40:28 +0100 Received: from [10.3.2.2] (T-b8wUZG8hdJCC3ylcd1mC4K9TDl+NgyhBw6VGLfpnTBXAxWCEIvmkx3vjk45y3ZVS@[217.235.218.178]) by fwd33.aul.t-online.de with esmtp id 1Itp43-0MYHh20; Sun, 18 Nov 2007 19:40:15 +0100 Message-ID: <4740870F.2020502@t-online.de> Date: Sun, 18 Nov 2007 19:40:15 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: The development of GRUB 2 References: <473A0C32.5000001@t-online.de> <20071118062424.GC20719@thorin> In-Reply-To: <20071118062424.GC20719@thorin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: T-b8wUZG8hdJCC3ylcd1mC4K9TDl+NgyhBw6VGLfpnTBXAxWCEIvmkx3vjk45y3ZVS X-TOI-MSGID: 348afd2d-54d2-4e70-9a72-9fe3c35e1433 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] mkdevicemap for Cygwin 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: Sun, 18 Nov 2007 18:40:33 -0000 Robert Millan wrote: > On Tue, Nov 13, 2007 at 09:42:26PM +0100, Christian Franke wrote: > >> +#elif defined(__CYGWIN__) >> + /* Cygwin */ >> + sprintf (name, "/dev/fd%d", unit); >> > > Cygwin has /dev now? :-) > > At least since 2003. >> +#ifndef __CYGWIN__ >> static void >> get_ide_disk_name (char *name, int unit) >> { >> @@ -213,6 +217,7 @@ get_ide_disk_name (char *name, int unit) >> *name = 0; >> #endif >> } >> +#endif /* __CYGWIN__ */ >> > > >> [...] >> > > >> +#ifndef __CYGWIN__ >> /* IDE disks. */ >> for (i = 0; i < 8; i++) >> { >> @@ -431,6 +440,7 @@ make_device_map (const char *device_map, >> num_hd++; >> } >> } >> +#endif /* __CYGWIN__ */ >> > > Is the generic case (`*name = 0', then print that) good enough? > > No, it did not work because check_device() returned 1 ("exists") on (*name == 0). This results in 8 bogus "(hd N)\t\n" lines and wrong N for the real devices. Yes, it would work now, because the patch also fixes this bug :-) Christian