Subversion Repositories Kolibri OS

Rev

Rev 83 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 83 Rev 86
Line 1239... Line 1239...
1239
        ret
1239
        ret
Line 1240... Line 1240...
1240
 
1240
 
1241
fd_find_lfn:
1241
fd_find_lfn:
1242
; in: esi->name
1242
; in: esi->name
1243
; out: CF=1 - file not found
1243
; out: CF=1 - file not found
1244
;      else CF=0 and edi->direntry
1244
;      else CF=0 and edi->direntry, eax=directory cluster (0 for root)
1245
        push    esi edi
1245
        push    esi edi
1246
        push    0
1246
        push    0
1247
        push    flp_root_first
1247
        push    flp_root_first
1248
        push    flp_root_next
1248
        push    flp_root_next
Line 1262... Line 1262...
1262
        add     esp, 12
1262
        add     esp, 12
1263
        pop     edi esi
1263
        pop     edi esi
1264
        stc
1264
        stc
1265
        ret
1265
        ret
1266
.found:
1266
.found:
-
 
1267
        mov     eax, [esp+8]
1267
        add     esp, 16         ; CF=0
1268
        add     esp, 16         ; CF=0
1268
        pop     esi
1269
        pop     esi
1269
        ret
1270
        ret
Line 1270... Line 1271...
1270
 
1271
 
Line 1903... Line 1904...
1903
        sub     esi, ecx
1904
        sub     esi, ecx
1904
        mov     eax, 11
1905
        mov     eax, 11
1905
        pop     edi ecx
1906
        pop     edi ecx
1906
        jmp     .ret
1907
        jmp     .ret
Line -... Line 1908...
-
 
1908
 
-
 
1909
fs_FloppyGetFileInfo:
-
 
1910
        call    read_flp_fat
-
 
1911
        cmp     [FDC_Status], 0
-
 
1912
        jnz     ret11
-
 
1913
        cmp     byte [esi], 0
-
 
1914
        jnz     @f
-
 
1915
        mov     eax, 2  ; unsupported
-
 
1916
        ret
-
 
1917
@@:
-
 
1918
        push    edi
-
 
1919
        call    fd_find_lfn
-
 
1920
        jmp     fs_GetFileInfo_finish
-
 
1921
 
-
 
1922
ret11:
-
 
1923
        mov     eax, 11
-
 
1924
        ret
-
 
1925
 
-
 
1926
fs_FloppySetFileInfo:
-
 
1927
        call    read_flp_fat
-
 
1928
        cmp     [FDC_Status], 0
-
 
1929
        jnz     ret11
-
 
1930
        cmp     byte [esi], 0
-
 
1931
        jnz     @f
-
 
1932
        mov     eax, 2  ; unsupported
-
 
1933
        ret
-
 
1934
@@:
-
 
1935
        push    edi
-
 
1936
        call    fd_find_lfn
-
 
1937
        jnc     @f
-
 
1938
        pop     edi
-
 
1939
        mov     eax, ERROR_FILE_NOT_FOUND
-
 
1940
        ret
-
 
1941
@@:
-
 
1942
        push    eax
-
 
1943
        call    bdfe_to_fat_entry
-
 
1944
        pop     eax
-
 
1945
        test    eax, eax
-
 
1946
        jz      .root
-
 
1947
        add     eax, 31
-
 
1948
        pusha
-
 
1949
        call    save_chs_sector
-
 
1950
        popa
-
 
1951
        jmp     .cmn
-
 
1952
.root:
-
 
1953
        call    save_flp_root
-
 
1954
.cmn:
-
 
1955
        pop     edi
-
 
1956
        xor     eax, eax
-
 
1957
        cmp     [FDC_Status], 0
-
 
1958
        jz      @f
-
 
1959
        mov     al, 11
-
 
1960
@@:
-
 
1961
        ret
1907
 
1962