Fix crash on WinPE
Native RAM disks, e.g. as are used in WinPE environments, have other characteristics than regular filesystems such as NTFS. For instance, re-opening files with NtOpenFile is buggy. This can cause a bugcheck with the current implementation of mmap.
The first commit adds RAM disk detection. The second commit uses init_reopen_attr in mmap to circumvent the re-opening bug.
Fixes #160
~This should probably be submitted upstream to Cygwin, but I don't have time for this right now.~
I've submitted this upstream.
~This should probably be submitted upstream to Cygwin, but I don't have time for this right now.~
I've submitted this upstream.
For lurkers, the submission can be seen here: https://inbox.sourceware.org/cygwin-patches/[email protected]/
It might be a while before I can address the review comments, but the patch does work as-is.