https://bugs.winehq.org/show_bug.cgi?id=38107
Bug ID: 38107 Summary: Cygwin and MSYS2 needes NULL Device for /dev/zero, /dev/null, /dev/full and so on Product: Wine Version: 1.7.36 Hardware: x86 URL: http://sourceforge.net/projects/msys2/files/Base/i686/ msys2-i686-20150202.exe OS: Linux Status: NEW Keywords: download, source, testcase Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: fracting@gmail.com Distribution: ---
Steps to reproduce:
1. Install Cygwin or MSYS2
2. Start bash.exe from wineconsole
3. run `/usr/bin/ls /dev` inside bash.exe
Expected result: /dev/null, /dev/zero, /dev/full and so on should be listed in result Actual result: Missing /dev/null device and so on.
Trace log:
0031:Call ntdll.RtlInitUnicodeString(0062c538,0062c558 L"\Device\Null") ret=610089cb 0031:Ret ntdll.RtlInitUnicodeString() retval=0000001a ret=610089cb 0031:Call ntdll.NtOpenSymbolicLinkObject(0062c534,00000001,0062c540) ret=61008a16 0031:trace:ntdll:NtOpenSymbolicLinkObject (0x62c534,0x00000001,{name=L"\Device\Null", attr=0x00000040, hRoot=(nil), sd=(nil)} ) 0031:Ret ntdll.NtOpenSymbolicLinkObject() retval=c0000034 ret=61008a16
Source code:
msys2-code/winsup/cygwin/device.in:
150 "/dev/windows", BRACK(FH_WINDOWS), "\Device\Null", exists_ntdev, S_IFCHR 151 "/dev/dsp", BRACK(FH_OSS_DSP), "\Device\Null", exists_ntdev, S_IFCHR 152 "/dev/conin", BRACK(FH_CONIN), "/dev/conin", exists_console, S_IFCHR 153 "/dev/conout", BRACK(FH_CONOUT), "/dev/conout", exists_console, S_IFCHR 154 "/dev/null", BRACK(FH_NULL), "\Device\Null", exists_ntdev, S_IFCHR 155 "/dev/zero", BRACK(FH_ZERO), "\Device\Null", exists_ntdev, S_IFCHR 156 "/dev/full", BRACK(FH_FULL), "\Device\Null", exists_ntdev, S_IFCHR 157 "/dev/random", BRACK(FH_RANDOM), "\Device\Null", exists_ntdev, S_IFCHR 158 "/dev/urandom", BRACK(FH_URANDOM), "\Device\Null", exists_ntdev, S_IFCHR, =urandom_dev 159 "/dev/clipboard", BRACK(FH_CLIPBOARD), "\Device\Null", exists_ntdev, S_IFCHR
https://bugs.winehq.org/show_bug.cgi?id=38107
--- Comment #1 from Qian Hong fracting@gmail.com --- Install native null.sys on Wine helps. Should not be hard to implement a builtin null.sys.
https://bugs.winehq.org/show_bug.cgi?id=38107
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=38107
Jactry Zeng jactry92@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jactry92@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=38107
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #2 from Sebastian Lackner sebastian@fds-team.de --- Should be fixed with http://source.winehq.org/git/wine.git/patch/950c82094b34bec87b38e09fe4657df4... (and previous patches).
https://bugs.winehq.org/show_bug.cgi?id=38107
Qian Hong fracting@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |950c82094b34bec87b38e09fe46 | |57df4eeeb0522 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #3 from Qian Hong fracting@gmail.com --- Confirming fixed, thanks Alexandre Julliard and Sebastian Lackner!
With the current implemenation, /dev/zero and /dev/null works pretty well in MSYS2: (A couple of other patches from wine-staging needed, but not related to this bug)
fracting@fracting-ThinkPad-Edge-E431 MSYS ~ $ dd if=/dev/zero of=/dev/null bs=1M count=100 100+0 records in 100+0 records out 104857600 bytes (105 MB) copied, 0.0079404 s, 13.2 GB/s
fracting@fracting-ThinkPad-Edge-E431 MSYS ~ $ dd if=/dev/zero of=/dev/full bs=1M count=100 dd: error writing ‘/dev/full’: No space left on device 1+0 records in 0+0 records out 0 bytes (0 B) copied, 0.0051413 s, 0.0 kB/s
https://bugs.winehq.org/show_bug.cgi?id=38107
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.44.