Subversion Repositories Kolibri OS

Rev

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

Rev 1376 Rev 2382
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 1376 $
8
$Revision: 2382 $
9
 
9
 
10
 
10
 
Line 93... Line 93...
93
        stc
93
        stc
94
        ret
94
        ret
Line 95... Line 95...
95
 
95
 
96
ntfs_setup:             ; CODE XREF: part_set.inc
96
ntfs_setup:             ; CODE XREF: part_set.inc
97
; By given bootsector, initialize some NTFS variables
97
; By given bootsector, initialize some NTFS variables
98
        call    ntfs_test_bootsec
98
;        call    ntfs_test_bootsec                      ; checking boot sector was already
99
        jc      problem_fat_dec_count
99
;        jc      problem_fat_dec_count
100
        movzx   eax, byte [ebx+13]
100
        movzx   eax, byte [ebx+13]
101
        mov     [ntfs_data.sectors_per_cluster], eax
101
        mov     [ntfs_data.sectors_per_cluster], eax
102
        mov     eax, [ebx+0x28]
102
        mov     eax, [ebx+0x28]
103
        add     eax, [PARTITION_START]
103
        add     eax, [PARTITION_START]
Line 940... Line 940...
940
        stc
940
        stc
941
.end:
941
.end:
942
        pop     edi ecx eax
942
        pop     edi ecx eax
943
        ret
943
        ret
Line -... Line 944...
-
 
944
 
-
 
945
unichar_toupper:
-
 
946
        push    eax
-
 
947
        call    uni2ansi_char
-
 
948
        cmp     al, '_'
-
 
949
        jz      .unk
-
 
950
        add     esp, 4
-
 
951
        call    char_toupper
-
 
952
        jmp     ansi2uni_char
-
 
953
.unk:
-
 
954
        pop     eax
-
 
955
        ret
944
 
956
 
945
ntfs_find_lfn:
957
ntfs_find_lfn:
946
; in: esi+ebp -> name
958
; in: esi+ebp -> name
947
; out: CF=1 - file not found
959
; out: CF=1 - file not found
948
;      else CF=0, [ntfs_cur_iRecord] valid, eax->record in parent directory
960
;      else CF=0, [ntfs_cur_iRecord] valid, eax->record in parent directory
Line 1028... Line 1040...
1028
        add     esi, 0x52
1040
        add     esi, 0x52
1029
        movzx   ecx, byte [esi-2]
1041
        movzx   ecx, byte [esi-2]
1030
        push    edi
1042
        push    edi
1031
@@:
1043
@@:
1032
        lodsw
1044
        lodsw
1033
        call    uni2ansi_char
-
 
1034
        call    char_toupper
1045
        call    unichar_toupper
1035
        push    eax
1046
        push    eax
1036
        mov     al, [edi]
1047
        mov     al, [edi]
1037
        inc     edi
1048
        inc     edi
1038
        cmp     al, '/'
1049
        cmp     al, '/'
1039
        jz      .slash
1050
        jz      .slash
1040
        call    char_toupper
1051
        call    char_toupper
-
 
1052
        call    ansi2uni_char
1041
        cmp     al, [esp]
1053
        cmp     ax, [esp]
1042
        pop     eax
1054
        pop     eax
1043
        loopz   @b
1055
        loopz   @b
1044
        jz      .found
1056
        jz      .found
1045
        pop     edi
1057
        pop     edi
1046
        pop     esi
1058
        pop     esi
Line 1639... Line 1651...
1639
        xor     edx, edx
1651
        xor     edx, edx
1640
        div     [_10000000]
1652
        div     [_10000000]
1641
        xchg    eax, [esp]
1653
        xchg    eax, [esp]
1642
        div     [_10000000]
1654
        div     [_10000000]
1643
        pop     edx
1655
        pop     edx
-
 
1656
    .sec:
1644
; edx:eax = number of seconds since January 1, 1601
1657
; edx:eax = number of seconds since January 1, 1601
1645
        push    eax
1658
        push    eax
1646
        mov     eax, edx
1659
        mov     eax, edx
1647
        xor     edx, edx
1660
        xor     edx, edx
1648
        div     [_60]
1661
        div     [_60]
Line 1811... Line 1824...
1811
        xor     eax, eax
1824
        xor     eax, eax
1812
        call    ntfs_direntry_to_bdfe
1825
        call    ntfs_direntry_to_bdfe
1813
        pop     edi esi
1826
        pop     edi esi
1814
        xor     eax, eax
1827
        xor     eax, eax
1815
        ret
1828
        ret
-
 
1829