Subversion Repositories Kolibri OS

Rev

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

Rev 864 Rev 887
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2007. 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: 864 $
8
$Revision: 887 $
9
 
9
 
10
 
10
 
Line 166... Line 166...
166
        call    ntfs_restore_usa_frs
166
        call    ntfs_restore_usa_frs
167
        jnc     .mftok
167
        jnc     .mftok
168
@@:
168
@@:
169
; $MFT and $MFTMirr invalid!
169
; $MFT and $MFTMirr invalid!
170
.fail_free_frs:
170
.fail_free_frs:
171
        push    [ntfs_data.frs_buffer]
171
        mov ecx, [ntfs_data.frs_buffer]
172
        call    kernel_free
172
        call    @mem_free@4
173
        jmp     problem_fat_dec_count
173
        jmp     problem_fat_dec_count
174
.fail_free_mft:
174
.fail_free_mft:
175
        push    [ntfs_data.mft_retrieval]
175
        mov ecx, [ntfs_data.mft_retrieval]
176
        call    kernel_free
176
        call    @mem_free@4
177
        jmp     .fail_free_frs
177
        jmp     .fail_free_frs
178
.mftok:
178
.mftok:
179
; read $MFT table retrieval information
179
; read $MFT table retrieval information
180
; start with one page, increase if not enough (when MFT too fragmented)
180
; start with one page, increase if not enough (when MFT too fragmented)
181
        mov ecx, 0x1000
181
        mov ecx, 0x1000
Line 257... Line 257...
257
        mov     esi, [ntfs_data.mft_retrieval]
257
        mov     esi, [ntfs_data.mft_retrieval]
258
        mov     edi, eax
258
        mov     edi, eax
259
        mov     ecx, [ntfs_data.mft_retrieval_size]
259
        mov     ecx, [ntfs_data.mft_retrieval_size]
260
        add     ecx, ecx
260
        add     ecx, ecx
261
        rep     movsd
261
        rep     movsd
262
        push    [ntfs_data.mft_retrieval]
262
        mov ecx, [ntfs_data.mft_retrieval]
263
        mov     [ntfs_data.mft_retrieval], eax
263
        mov     [ntfs_data.mft_retrieval], eax
264
        call    kernel_free
264
        call    @mem_free@4
265
        mov     eax, [ntfs_data.mft_retrieval_size]
265
        mov     eax, [ntfs_data.mft_retrieval_size]
266
.ok:
266
.ok:
267
        shl     eax, 3
267
        shl     eax, 3
268
        add     eax, [ntfs_data.mft_retrieval]
268
        add     eax, [ntfs_data.mft_retrieval]
269
        mov     [esp+28], eax
269
        mov     [esp+28], eax
Line 978... Line 978...
978
        stc
978
        stc
979
        ret
979
        ret
980
@@:
980
@@:
981
; reallocate
981
; reallocate
982
        push    eax
982
        push    eax
983
        push    [ntfs_data.cur_index_buf]
983
        mov ecx,  [ntfs_data.cur_index_buf]
984
        call    kernel_free
984
        call    @mem_free@4
985
        pop     ecx
985
        pop     ecx
986
        mov     [ntfs_data.cur_index_size], ecx
986
        mov     [ntfs_data.cur_index_size], ecx
987
        mov edx, PG_SW
987
        mov edx, PG_SW
988
        call    @mem_alloc@8
988
        call    @mem_alloc@8
989
        test    eax, eax
989
        test    eax, eax
Line 1011... Line 1011...
1011
        mov     ecx, [ntfs_data.cur_index_size]
1011
        mov     ecx, [ntfs_data.cur_index_size]
1012
        shl     ecx, 9-2
1012
        shl     ecx, 9-2
1013
        rep     movsd
1013
        rep     movsd
1014
        mov     esi, eax
1014
        mov     esi, eax
1015
        mov     [ntfs_data.cur_index_size], ebp
1015
        mov     [ntfs_data.cur_index_size], ebp
1016
        push    esi ebp
-
 
-
 
1016
 
1017
        push    [ntfs_data.cur_index_buf]
1017
        mov ecx, [ntfs_data.cur_index_buf]
1018
        call    kernel_free
1018
        call    @mem_free@4
1019
        pop     ebp esi
-
 
-
 
1019
 
1020
        mov     [ntfs_data.cur_index_buf], esi
1020
        mov     [ntfs_data.cur_index_buf], esi
1021
.ok2:
1021
.ok2:
1022
        add     esi, 10h
1022
        add     esi, 10h
1023
        mov     edi, [esp+4]
1023
        mov     edi, [esp+4]
1024
; edi -> name, esi -> current index data, ebp = subnode size
1024
; edi -> name, esi -> current index data, ebp = subnode size
Line 1325... Line 1325...
1325
        popad
1325
        popad
1326
        jmp     .fserr
1326
        jmp     .fserr
1327
@@:
1327
@@:
1328
; reallocate
1328
; reallocate
1329
        push    eax
1329
        push    eax
1330
        push    [ntfs_data.cur_index_buf]
1330
        mov ecx, [ntfs_data.cur_index_buf]
1331
        call    kernel_free
1331
        call    @mem_free@4
1332
        pop     ecx
1332
        pop     ecx
1333
        mov     [ntfs_data.cur_index_size], ecx
1333
        mov     [ntfs_data.cur_index_size], ecx
1334
        mov edx, PG_SW
1334
        mov edx, PG_SW
1335
        call    @mem_alloc@8
1335
        call    @mem_alloc@8
1336
        test    eax, eax
1336
        test    eax, eax
Line 1363... Line 1363...
1363
        mov     ecx, [ntfs_data.cur_index_size]
1363
        mov     ecx, [ntfs_data.cur_index_size]
1364
        shl     ecx, 9-2
1364
        shl     ecx, 9-2
1365
        rep     movsd
1365
        rep     movsd
1366
        mov     esi, eax
1366
        mov     esi, eax
1367
        mov     [ntfs_data.cur_index_size], ebp
1367
        mov     [ntfs_data.cur_index_size], ebp
1368
        push    esi ebp
-
 
-
 
1368
 
1369
        push    [ntfs_data.cur_index_buf]
1369
        mov ecx, [ntfs_data.cur_index_buf]
1370
        call    kernel_free
1370
        call    @mem_free@4
1371
        pop     ebp esi
-
 
-
 
1371
 
1372
        mov     [ntfs_data.cur_index_buf], esi
1372
        mov     [ntfs_data.cur_index_buf], esi
1373
.ok2:
1373
.ok2:
1374
        add     esi, 10h
1374
        add     esi, 10h
1375
        mov     ebx, [esp+10h]
1375
        mov     ebx, [esp+10h]
1376
        mov     edx, [esp+14h]
1376
        mov     edx, [esp+14h]