Subversion Repositories Kolibri OS

Rev

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

Rev 6420 Rev 6426
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2016. 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: 6420 $
8
$Revision: 6426 $
Line 9... Line 9...
9
 
9
 
10
; NTFS driver
10
; NTFS driver
Line 1874... Line 1874...
1874
        mov     ebx, edx
1874
        mov     ebx, edx
1875
        jmp     .forEXT
1875
        jmp     .forEXT
Line 1876... Line 1876...
1876
 
1876
 
1877
;----------------------------------------------------------------
1877
;----------------------------------------------------------------
1878
ntfs_GetFileInfo:
-
 
1879
        cmp     byte [esi], 0
-
 
1880
        jnz     @f
-
 
1881
        movi    eax, ERROR_UNSUPPORTED_FS
-
 
1882
        ret
-
 
1883
@@:
1878
ntfs_GetFileInfo:
-
 
1879
        call    ntfs_lock
-
 
1880
        mov     edi, [ebx+16]
-
 
1881
        cmp     byte [esi], 0
1884
        call    ntfs_lock
1882
        jz      .volume
1885
        stdcall ntfs_find_lfn, [esp+4]
1883
        stdcall ntfs_find_lfn, [esp+4]
1886
        jnc     .found
1884
        jnc     .found
1887
        test    eax, eax
1885
        test    eax, eax
1888
        jz      ntfsFail
1886
        jz      ntfsFail
Line 1889... Line 1887...
1889
        jmp     ntfsNotFound
1887
        jmp     ntfsNotFound
1890
 
-
 
1891
.found:
1888
 
1892
        push    esi edi
-
 
1893
        mov     esi, eax
1889
.found:
1894
        mov     edi, [ebx+16]
1890
        mov     esi, eax
1895
        xor     eax, eax
1891
        xor     eax, eax
1896
        call    ntfs_direntry_to_bdfe
1892
        call    ntfs_direntry_to_bdfe
1897
        pop     edi esi
1893
.end:
1898
        call    ntfs_unlock
1894
        call    ntfs_unlock
Line -... Line 1895...
-
 
1895
        xor     eax, eax
-
 
1896
        ret
-
 
1897
 
-
 
1898
.volume:
-
 
1899
        mov     byte [edi], 8
-
 
1900
        mov     eax, [ebx+8]
-
 
1901
        mov     [edi+4], eax
-
 
1902
        mov     eax, dword [ebp+NTFS.Length]
-
 
1903
        mov     edx, dword [ebp+NTFS.Length+4]
-
 
1904
        shld    edx, eax, 9
-
 
1905
        shl     eax, 9
-
 
1906
        mov     [edi+36], edx
-
 
1907
        mov     [edi+32], eax
-
 
1908
        add     edi, 40
-
 
1909
        mov     [ebp+NTFS.cur_buf], edi
-
 
1910
        mov     [ebp+NTFS.cur_iRecord], 3
-
 
1911
        mov     [ebp+NTFS.cur_attr], 0x60
-
 
1912
        mov     [ebp+NTFS.cur_offs], 0
-
 
1913
        mov     [ebp+NTFS.cur_size], 1
-
 
1914
        call    ntfs_read_attr
-
 
1915
        jc      ntfsFail
-
 
1916
        mov     ecx, [ebp+NTFS.cur_read]
-
 
1917
        mov     [edi+ecx], ax
-
 
1918
        cmp     [ebx+8], eax
-
 
1919
        jnz     .end
-
 
1920
        mov     esi, edi
-
 
1921
        shr     ecx, 1
-
 
1922
@@:
-
 
1923
        lodsw
-
 
1924
        call    uni2ansi_char
-
 
1925
        stosb
-
 
1926
        dec     ecx
-
 
1927
        jnz     @b
1899
        xor     eax, eax
1928
        mov     byte [edi], 0
1900
        ret
1929
        jmp     .end
1901
 
1930
 
1902
;----------------------------------------------------------------
1931
;----------------------------------------------------------------