Vesa Jääskeläinen wrote:
Bean wrote:
On Mon, Aug 25, 2008 at 12:04 AM, Vesa Jääskeläinen <[EMAIL PROTECTED]> 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



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to