Fix the NUL device so it returns 0 bytes for reads, independent of whether
cooked or raw mode is used. It was broken for raw mode. Fixes problem with DJGPP sed (see http://sourceforge.net/tracker/index.php?func=detail&aid=1429741&group_id=49784&atid=457447) git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1306 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
599278eeae
commit
46d959f0cb
@ -263,7 +263,7 @@ long DosRWSft(int sft_idx, size_t n, void FAR * bp, int mode)
|
||||
|
||||
/* Test for eof and exit */
|
||||
/* immediately if it is */
|
||||
if (!(s->sft_flags & SFT_FEOF) || (s->sft_flags & SFT_FNUL))
|
||||
if (!(s->sft_flags & SFT_FEOF))
|
||||
return 0;
|
||||
|
||||
if (s->sft_flags & SFT_FCONIN)
|
||||
|
@ -223,6 +223,10 @@ _nul_intr:
|
||||
push es
|
||||
push bx
|
||||
les bx,[cs:_ReqPktPtr] ;es:bx--> rqheadr
|
||||
cmp byte [es:bx+2],4 ;if read, set 0 read
|
||||
jne no_nul_read
|
||||
mov word [es:bx+12h],0
|
||||
no_nul_read:
|
||||
or word [es:bx+3],100h ;set "done" flag
|
||||
pop bx
|
||||
pop es
|
||||
|
Loading…
Reference in New Issue
Block a user