From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KXIgP-0005f2-HL for mharc-grub-devel@gnu.org; Sun, 24 Aug 2008 12:43:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXIgO-0005dg-3s for grub-devel@gnu.org; Sun, 24 Aug 2008 12:43:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXIgK-0005bT-LD for grub-devel@gnu.org; Sun, 24 Aug 2008 12:43:15 -0400 Received: from [199.232.76.173] (port=40519 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXIgK-0005bJ-9j for grub-devel@gnu.org; Sun, 24 Aug 2008 12:43:12 -0400 Received: from mailout10.t-online.de ([194.25.134.21]:52458) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXIgJ-0005hB-Nm for grub-devel@gnu.org; Sun, 24 Aug 2008 12:43:12 -0400 Received: from fwd25.aul.t-online.de by mailout10.sul.t-online.de with smtp id 1KXIgH-0006FE-00; Sun, 24 Aug 2008 18:43:09 +0200 Received: from [10.3.2.2] (Z2pq9+ZHoh1mTcbNPrZTo7AOBzdeHp71obr4QhvhQQ4PWM4fKPI0epEm-0BeHhow5N@[217.235.203.210]) by fwd25.aul.t-online.de with esmtp id 1KXIg1-1kPwXY0; Sun, 24 Aug 2008 18:42:53 +0200 Message-ID: <48B18F8E.4070208@t-online.de> Date: Sun, 24 Aug 2008 18:42:54 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: The development of GRUB 2 References: <48B156D5.4020203@t-online.de> <48B1868A.8050608@nic.fi> <48B18960.5030909@nic.fi> In-Reply-To: <48B18960.5030909@nic.fi> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-ID: Z2pq9+ZHoh1mTcbNPrZTo7AOBzdeHp71obr4QhvhQQ4PWM4fKPI0epEm-0BeHhow5N X-TOI-MSGID: 6756c2e0-317d-456d-98d4-93bb6c609b2a X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] Mingw support for grub2 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, 24 Aug 2008 16:43:16 -0000 Vesa Jääskeläinen wrote: > Bean wrote: > >> On Mon, Aug 25, 2008 at 12:04 AM, Vesa Jääskeläinen wrote: >> >>> Bean wrote: >>> >>>> Yes, it works, although mingw can't use device names like /dev/sda, >>>> but it can use windows special name //./PHYSICALDRIVE0. >>>> >>> That should be with back slashes ('\'). Or is there some hack somewhere >>> to support that? >>> >> Hi, >> >> Mingw would translate / to \, so both are ok. But using / is more >> clear, as \ is the escape character in cygwin shell, so we need to use >> two of them, \\\\.\\PHYSICALDRIVE0. >> > > In cygwin shell... yes... but mingw programs are not meant to be run > under that. Mingw programs are native windows programs. > > > Unlike Cygwin, Mingw does not provide an extra library layer. Most standard library functions directly link to msvcrt.dll. The Win32 API (like the DOS API) itself accepts both / and \, only the user level tools usually don't. This is likely because in the early (CP/M->DOS) days, someone decided to use '/' as the option char. Later, when path names are 'borrowed' from Unix, it was too late :-) In fact, all these work to open the first disk: h = CreateFile("\\\\.\\PhysicalDrive0", ...) h = CreateFile("\\\\./PhysicalDrive0", ...) h = CreateFile("//.\\PhysicalDrive0", ...) h = CreateFile("//./PhysicalDrive0", ...) Christian