Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 648 → Rev 649

/kernel/trunk/fs/fat32.inc
293,7 → 293,6
 
get_free_FAT:
;-----------------------------------------------------------
; input : EAX = # cluster for start the searching
; output : if CARRY=0 EAX = # first cluster found free
; if CARRY=1 disk full
; Note : for more speed need to use fat_cache directly
301,10 → 300,14
push ecx
mov ecx,[LAST_CLUSTER] ; counter for full disk
sub ecx,2
mov eax,[fatStartScan]
cmp eax,2
jb gff_reset
 
gff_test:
cmp eax,[LAST_CLUSTER] ; if above last cluster start at cluster 2
jbe gff_in_range
gff_reset:
mov eax,2
 
gff_in_range:
328,6 → 331,8
ret
 
gff_found:
lea ecx,[eax+1]
mov [fatStartScan],ecx
pop ecx
clc
ret
671,6 → 676,8
jne add_not_fs
 
add [ebx+0x1e8],ecx
mov eax,[fatStartScan]
mov [ebx+0x1ec],eax
call hd_write
; cmp [hd_error],0
; jne add_not_fs
1478,7 → 1485,6
jmp fat_notroot_next_sector
fat_notroot_extend_dir:
push eax
mov eax, [eax]
call get_free_FAT
jnc .found
pop eax
1941,7 → 1947,6
mov esi, edx
test ecx, ecx
jz .done
mov eax, 2
call get_free_FAT
jc .diskfull
push eax
2392,7 → 2397,6
jae .extend_done
; add new cluster
push eax
mov eax, edx
call get_free_FAT
jc .disk_full
mov edx, [fatEND]