buffered output for LIST and NLST

git-svn-id: svn://kolibrios.org@1323 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
tsdima 2009-12-15 19:12:42 +00:00
parent 01cfb22aca
commit 903ae397ab

View File

@ -851,6 +851,8 @@ pps002:
; ;
;*************************************************************************** ;***************************************************************************
sendDir: sendDir:
mov eax, text+0x4000
mov [fsize], eax
mov ebx, dirinfoblock mov ebx, dirinfoblock
and dword [ebx+4], 0 ; start from zero block and dword [ebx+4], 0 ; start from zero block
sd001: sd001:
@ -974,10 +976,24 @@ terminate:
stosb stosb
; Send the completed line to the user over data socket ; Send the completed line to the user over data socket
push esi push esi
push edi
mov esi, dirStr mov esi, dirStr
mov edx, edi mov ecx, edi
sub ecx, esi
mov edi, [fsize]
cld
rep movsb
mov [fsize], edi
cmp edi, text+0x4400
jb @f
mov esi, text+0x4000
mov edx, [fsize]
sub edx, esi sub edx, esi
mov [fsize], esi
call outputDataStr call outputDataStr
@@:
pop edi
pop esi pop esi
sd003: ; Move to next entry in the block sd003: ; Move to next entry in the block
@ -990,6 +1006,10 @@ sd004:
jmp sd001 jmp sd001
sd_exit: sd_exit:
mov esi, text+0x4000
mov edx, [fsize]
sub edx, esi
call outputDataStr
ret ret
@ -1145,6 +1165,7 @@ gf000:
mov ecx, [DataSocket] mov ecx, [DataSocket]
mov edx, text + 0x1300 mov edx, text + 0x1300
add edx, dword [fsize] add edx, dword [fsize]
xor esi, esi
mcall ; returned data len in eax mcall ; returned data len in eax
add dword [fsize], eax add dword [fsize], eax