Subversion Repositories Kolibri OS

Rev

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

Rev 2455 Rev 3598
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2011. 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: 2455 $
8
$Revision: 3598 $
9
 
9
 
10
 
10
 
Line 1137... Line 1137...
1137
;--------------------------------------------------------------
1137
;--------------------------------------------------------------
1138
ntfs_HdRead:
1138
ntfs_HdRead:
1139
        cmp     byte [esi], 0
1139
        cmp     byte [esi], 0
1140
        jnz     @f
1140
        jnz     @f
1141
        or      ebx, -1
1141
        or      ebx, -1
1142
        push    ERROR_ACCESS_DENIED
1142
        movi    eax, ERROR_ACCESS_DENIED
1143
        pop     eax
-
 
1144
        ret
1143
        ret
1145
@@:
1144
@@:
1146
        call    ntfs_find_lfn
1145
        call    ntfs_find_lfn
1147
        jnc     .found
1146
        jnc     .found
1148
        or      ebx, -1
1147
        or      ebx, -1
1149
        push    ERROR_FILE_NOT_FOUND
1148
        movi    eax, ERROR_FILE_NOT_FOUND
1150
        pop     eax
-
 
1151
        ret
1149
        ret
1152
.found:
1150
.found:
1153
        mov     [ntfs_cur_attr], 0x80   ; $DATA
1151
        mov     [ntfs_cur_attr], 0x80   ; $DATA
1154
        and     [ntfs_cur_offs], 0
1152
        and     [ntfs_cur_offs], 0
1155
        and     [ntfs_cur_size], 0
1153
        and     [ntfs_cur_size], 0
1156
        call    ntfs_read_attr
1154
        call    ntfs_read_attr
1157
        jnc     @f
1155
        jnc     @f
1158
        or      ebx, -1
1156
        or      ebx, -1
1159
        push    ERROR_ACCESS_DENIED
1157
        movi    eax, ERROR_ACCESS_DENIED
1160
        pop     eax
-
 
1161
        ret
1158
        ret
1162
@@:
1159
@@:
1163
        pushad
1160
        pushad
1164
        and     dword [esp+10h], 0
1161
        and     dword [esp+10h], 0
1165
        xor     eax, eax
1162
        xor     eax, eax
Line 1169... Line 1166...
1169
        jb      @f
1166
        jb      @f
1170
.eof0:
1167
.eof0:
1171
        popad
1168
        popad
1172
        xor     ebx, ebx
1169
        xor     ebx, ebx
1173
.eof:
1170
.eof:
1174
        push    ERROR_END_OF_FILE
1171
        movi    eax, ERROR_END_OF_FILE
1175
        pop     eax
-
 
1176
        ret
1172
        ret
1177
@@:
1173
@@:
1178
        mov     eax, [ebx]
1174
        mov     eax, [ebx]
1179
        test    eax, 0x1FF
1175
        test    eax, 0x1FF
1180
        jz      .alignedstart
1176
        jz      .alignedstart
Line 1347... Line 1343...
1347
        and     [ntfs_data.cur_index_size], 0
1343
        and     [ntfs_data.cur_index_size], 0
1348
        and     [ntfs_data.cur_index_buf], 0
1344
        and     [ntfs_data.cur_index_buf], 0
1349
.nomem:
1345
.nomem:
1350
        popad
1346
        popad
1351
        or      ebx, -1
1347
        or      ebx, -1
1352
        push    12
-
 
1353
        pop     eax
1348
        movi    eax, 12
1354
        ret
1349
        ret
1355
@@:
1350
@@:
1356
        mov     [ntfs_data.cur_index_buf], eax
1351
        mov     [ntfs_data.cur_index_buf], eax
1357
        popad
1352
        popad
1358
        jmp     .doit2
1353
        jmp     .doit2
Line 1802... Line 1797...
1802
        ret
1797
        ret
Line 1803... Line 1798...
1803
 
1798
 
1804
ntfs_HdGetFileInfo:
1799
ntfs_HdGetFileInfo:
1805
        cmp     byte [esi], 0
1800
        cmp     byte [esi], 0
1806
        jnz     @f
-
 
1807
        push    2
1801
        jnz     @f
1808
        pop     eax
1802
        movi    eax, 2
1809
        ret
1803
        ret
1810
@@:
1804
@@:
1811
        call    ntfs_find_lfn
1805
        call    ntfs_find_lfn
1812
        jnc     .doit
1806
        jnc     .doit
1813
        push    ERROR_FILE_NOT_FOUND
-
 
1814
        pop     eax
1807
        movi    eax, ERROR_FILE_NOT_FOUND
1815
        cmp     [hd_error], 0
1808
        cmp     [hd_error], 0
1816
        jz      @f
1809
        jz      @f
1817
        mov     al, 11
1810
        mov     al, 11
1818
@@:
1811
@@: