small fix

git-svn-id: svn://kolibrios.org@6939 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
pathoswithin 2017-07-29 05:24:20 +00:00
parent 683dfff8d5
commit aa52644442

View File

@ -594,7 +594,6 @@ set_FAT:
cmp [ebp+FAT.fat_change], 0 cmp [ebp+FAT.fat_change], 0
je @f je @f
call write_fat_sector call write_fat_sector
jc .ret
@@: @@:
mov [ebp+FAT.fat_in_cache], eax mov [ebp+FAT.fat_in_cache], eax
call fs_read32_sys call fs_read32_sys
@ -654,7 +653,6 @@ get_FAT:
cmp [ebp+FAT.fat_change], 0 cmp [ebp+FAT.fat_change], 0
je @f je @f
call write_fat_sector call write_fat_sector
jc .ret
@@: @@:
mov [ebp+FAT.fat_in_cache], eax mov [ebp+FAT.fat_in_cache], eax
call fs_read32_sys call fs_read32_sys
@ -764,9 +762,7 @@ write_fat_sector:
.write_next_fat: .write_next_fat:
push eax push eax
call fs_write32_sys call fs_write32_sys
test eax, eax
pop eax pop eax
jnz @f
add eax, [ebp+FAT.SECTORS_PER_FAT] add eax, [ebp+FAT.SECTORS_PER_FAT]
dec ecx dec ecx
jnz .write_next_fat jnz .write_next_fat
@ -862,11 +858,9 @@ update_disk:
cmp [ebp+FAT.fs_type], 12 cmp [ebp+FAT.fs_type], 12
jz .fat12 jz .fat12
call write_fat_sector call write_fat_sector
jc .ret
.noChange: .noChange:
mov esi, [ebp+PARTITION.Disk] mov esi, [ebp+PARTITION.Disk]
call disk_sync call disk_sync
.ret:
ret ret
.fat12: .fat12:
@ -2418,22 +2412,20 @@ fat_Write:
ja .length_ok ja .length_ok
push 0 push 0
.ret: .ret:
pop eax pop eax eax eax ecx ecx
sub edx, [esp+12] sub edx, ecx
mov ebx, edx ; ebx=number of written bytes push eax edx
call update_disk call update_disk
test eax, eax pop ebx
jz @f
mov byte [esp+4], ERROR_DEVICE
@@:
pop eax eax ecx edx
.error:
push eax
@@: @@:
call fat_unlock call fat_unlock
pop eax pop eax
ret ret
.error:
push eax
jmp @b
.eof: .eof:
push ERROR_END_OF_FILE push ERROR_END_OF_FILE
xor ebx, ebx xor ebx, ebx