Subversion Repositories Kolibri OS

Rev

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

Rev 3539 Rev 3598
Line 7... Line 7...
7
;; (C) 2004 Ville Turjanmaa, License: GPL                       ;;
7
;; (C) 2004 Ville Turjanmaa, License: GPL                       ;;
8
;; Addings by M.Lisovin                                         ;;
8
;; Addings by M.Lisovin                                         ;;
9
;; LFN support by diamond                                       ;;
9
;; LFN support by diamond                                       ;;
10
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 11... Line 11...
11
 
11
 
Line 12... Line 12...
12
$Revision: 3539 $
12
$Revision: 3598 $
Line 13... Line 13...
13
 
13
 
Line 1250... Line 1250...
1250
        stosd
1250
        stosd
1251
        stosd
1251
        stosd
1252
        stosd
1252
        stosd
1253
        pop     edi
1253
        pop     edi
1254
        xor     eax, eax
1254
        xor     eax, eax
1255
        push    8
-
 
1256
        pop     ebx
1255
        movi    ebx, 8
1257
        lea     ecx, [edi+8]
1256
        lea     ecx, [edi+8]
1258
.loop:
1257
.loop:
1259
        lodsb
1258
        lodsb
1260
        test    al, al
1259
        test    al, al
1261
        jz      .done
1260
        jz      .done
Line 1536... Line 1535...
1536
; we need to save LFN <=> LFN is not equal to short name <=> generated name contains '~'
1535
; we need to save LFN <=> LFN is not equal to short name <=> generated name contains '~'
1537
        mov     al, '~'
1536
        mov     al, '~'
1538
        push    ecx edi
1537
        push    ecx edi
1539
        mov     ecx, 8
1538
        mov     ecx, 8
1540
        repnz scasb
1539
        repnz scasb
1541
        push    1
-
 
1542
        pop     eax     ; 1 entry
1540
        movi    eax, 1     ; 1 entry
1543
        jnz     .notilde
1541
        jnz     .notilde
1544
; we need ceil(strlen(esi)/13) additional entries = floor((strlen(esi)+12+13)/13) total
1542
; we need ceil(strlen(esi)/13) additional entries = floor((strlen(esi)+12+13)/13) total
1545
        xor     eax, eax
1543
        xor     eax, eax
1546
@@:
1544
@@:
1547
        cmp     byte [esi], 0
1545
        cmp     byte [esi], 0
Line 1762... Line 1760...
1762
        sub     ebx, edx
1760
        sub     ebx, edx
1763
        mov     [edi+28], ebx
1761
        mov     [edi+28], ebx
1764
        add     esp, 20
1762
        add     esp, 20
1765
        mov     [esp+16], ebx
1763
        mov     [esp+16], ebx
1766
        popad
1764
        popad
1767
        push    ERROR_DISK_FULL
1765
        movi    eax, ERROR_DISK_FULL
1768
        pop     eax
-
 
1769
        ret
1766
        ret
1770
.writedir:
1767
.writedir:
1771
        mov     edi, eax
1768
        mov     edi, eax
1772
        shl     edi, 9
1769
        shl     edi, 9
1773
        add     edi, RAMDISK+31*512
1770
        add     edi, RAMDISK+31*512
Line 1955... Line 1952...
1955
        jz      .fat_err
1952
        jz      .fat_err
1956
        cmp     eax, 0xFF8
1953
        cmp     eax, 0xFF8
1957
        jb      @b
1954
        jb      @b
1958
.fat_err:
1955
.fat_err:
1959
        pop     ecx
1956
        pop     ecx
1960
        push    ERROR_FAT_TABLE
1957
        movi    eax, ERROR_FAT_TABLE
1961
        pop     eax
-
 
1962
        stc
1958
        stc
1963
        ret
1959
        ret
1964
@@:
1960
@@:
1965
        push    eax
1961
        push    eax
1966
        mov     eax, [eax*2+RAMDISK_FAT]
1962
        mov     eax, [eax*2+RAMDISK_FAT]
Line 2031... Line 2027...
2031
        ret
2027
        ret
2032
.disk_full:
2028
.disk_full:
2033
        pop     edi ecx
2029
        pop     edi ecx
2034
        pop     esi edx
2030
        pop     esi edx
2035
        stc
2031
        stc
2036
        push    ERROR_DISK_FULL
2032
        movi    eax, ERROR_DISK_FULL
2037
        pop     eax
-
 
2038
        ret
2033
        ret
Line 2039... Line 2034...
2039
 
2034
 
2040
fat_update_datetime:
2035
fat_update_datetime:
2041
        call    get_time_for_file
2036
        call    get_time_for_file