Subversion Repositories Kolibri OS

Rev

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

Rev 262 Rev 265
Line 282... Line 282...
282
ntfs_cur_iRecord dd     ?
282
ntfs_cur_iRecord dd     ?
283
ntfs_cur_offs   dd      ?       ; in sectors
283
ntfs_cur_offs   dd      ?       ; in sectors
284
ntfs_cur_size   dd      ?       ; in sectors
284
ntfs_cur_size   dd      ?       ; in sectors
285
ntfs_cur_buf    dd      ?
285
ntfs_cur_buf    dd      ?
286
ntfs_cur_read   dd      ?       ; [output]
286
ntfs_cur_read   dd      ?       ; [output]
-
 
287
ntfs_bCanContinue db    ?
-
 
288
                rb      3
Line 287... Line 289...
287
 
289
 
288
ntfs_attrlist_buf       rb      0x400
290
ntfs_attrlist_buf       rb      0x400
Line 289... Line 291...
289
ntfs_bitmap_buf         rb      0x400
291
ntfs_bitmap_buf         rb      0x400
Line 294... Line 296...
294
ntfs_attr_list          dd      ?
296
ntfs_attr_list          dd      ?
295
ntfs_attr_size          dq      ?
297
ntfs_attr_size          dq      ?
296
ntfs_cur_tail           dd      ?
298
ntfs_cur_tail           dd      ?
297
endg
299
endg
Line -... Line 300...
-
 
300
 
298
 
301
 
299
ntfs_read_attr:
302
ntfs_read_attr:
300
; in: global variables
303
; in: global variables
301
; out: [ntfs_cur_read]
304
; out: [ntfs_cur_read]
302
        pushad
305
        pushad
Line 440... Line 443...
440
        and     [ntfs_cur_read], 0
443
        and     [ntfs_cur_read], 0
441
.scandone:
444
.scandone:
442
; c) Check for required offset and length
445
; c) Check for required offset and length
443
        mov     ecx, [ntfs_attr_offs]
446
        mov     ecx, [ntfs_attr_offs]
444
        jecxz   .noattr
447
        jecxz   .noattr
-
 
448
        push    [ntfs_cur_size]
-
 
449
        push    [ntfs_cur_read]
445
        call    .doreadattr
450
        call    .doreadattr
-
 
451
        pop     edx
-
 
452
        pop     eax
446
        jc      @f
453
        jc      @f
-
 
454
        cmp     [ntfs_bCanContinue], 0
-
 
455
        jz      @f
-
 
456
        sub     edx, [ntfs_cur_read]
-
 
457
        neg     edx
-
 
458
        shr     edx, 9
-
 
459
        sub     eax, edx
447
        cmp     [ntfs_cur_size], 0
460
        mov     [ntfs_cur_size], eax
448
        jnz     .not_in_cur
461
        jnz     .not_in_cur
449
@@:
462
@@:
450
        popad
463
        popad
451
        ret
464
        ret
452
.noattr:
465
.noattr:
Line 611... Line 624...
611
        pop     [ntfs_cur_offs]
624
        pop     [ntfs_cur_offs]
612
        jc      .errret
625
        jc      .errret
613
        jmp     .scanliststart
626
        jmp     .scanliststart
Line 614... Line 627...
614
 
627
 
-
 
628
.doreadattr:
615
.doreadattr:
629
        mov     [ntfs_bCanContinue], 0
616
        cmp     byte [ecx+8], 0
630
        cmp     byte [ecx+8], 0
617
        jnz     .nonresident
631
        jnz     .nonresident
618
        mov     eax, [ecx+10h]  ; length
632
        mov     eax, [ecx+10h]  ; length
619
        mov     esi, eax
633
        mov     esi, eax
Line 722... Line 736...
722
        add     [ntfs_cur_read], 0x200
736
        add     [ntfs_cur_read], 0x200
723
        dec     [ntfs_cur_size]
737
        dec     [ntfs_cur_size]
724
        inc     [ntfs_cur_offs]
738
        inc     [ntfs_cur_offs]
725
        loop    @b
739
        loop    @b
726
        pop     ecx
740
        pop     ecx
-
 
741
        xor     eax, eax
-
 
742
        xor     edx, edx
727
        cmp     [ntfs_cur_size], 0
743
        cmp     [ntfs_cur_size], 0
728
        jnz     .readloop
744
        jnz     .readloop
729
        add     esp, 10h
745
        add     esp, 10h
730
        mov     eax, [ntfs_cur_tail]
746
        mov     eax, [ntfs_cur_tail]
731
        test    eax, eax
747
        test    eax, eax
Line 737... Line 753...
737
        pop     ecx
753
        pop     ecx
738
        add     esp, 10h
754
        add     esp, 10h
739
        jmp     .errret
755
        jmp     .errret
740
.break:
756
.break:
741
        add     esp, 10h        ; CF=0
757
        add     esp, 10h        ; CF=0
-
 
758
        mov     [ntfs_bCanContinue], 1
742
        ret
759
        ret
Line 743... Line 760...
743
 
760
 
744
ntfs_read_file_record:
761
ntfs_read_file_record:
745
; in: eax=iRecord
762
; in: eax=iRecord