Subversion Repositories Kolibri OS

Rev

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

Rev 7727 Rev 9043
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2011-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2011-2015. 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: 7727 $
8
$Revision: 9043 $
9
 
9
 
10
; =============================================================================
10
; =============================================================================
11
; ================================= Constants =================================
11
; ================================= Constants =================================
Line 1286... Line 1286...
1286
 
1286
 
1287
iglobal
1287
iglobal
1288
align 4
1288
align 4
1289
default_fs_functions:
1289
default_fs_functions:
-
 
1290
        dd      free
-
 
1291
        dd      (default_fs_functions_end - default_fs_functions - 4) / 4
-
 
1292
        dd      0
-
 
1293
        dd      0
-
 
1294
        dd      0
-
 
1295
        dd      0
1290
        dd      free
1296
        dd      0
-
 
1297
        dd      default_fs_get_file_info
1291
        dd      0       ; no user functions
1298
default_fs_functions_end:
Line -... Line 1299...
-
 
1299
endg
-
 
1300
 
-
 
1301
proc default_fs_get_file_info uses edi
-
 
1302
        movi    eax, ERROR_UNSUPPORTED_FS
-
 
1303
        cmp     byte[esi], 0
-
 
1304
        jnz     .done
-
 
1305
        movi    ecx, 40 ; len of BDFE without filename
-
 
1306
        cmp     [ebx+f70s5arg.xflags], 0
-
 
1307
        jz      @f
-
 
1308
        add     ecx, 2  ; volume label requested, space for utf16 terminator
-
 
1309
@@:
-
 
1310
        mov     ebx, [ebx+f70s5arg.buf]
-
 
1311
        stdcall is_region_userspace, ebx, ecx
-
 
1312
        movi    eax, ERROR_MEMORY_POINTER
-
 
1313
        jz      .done
-
 
1314
        mov     edi, ebx
-
 
1315
        xor     eax, eax
-
 
1316
        rep stosb
-
 
1317
        mov     [ebx+bdfe.attr], 0x10   ; directory flag
-
 
1318
        mov     word[ebx+bdfe.name], 0  ; word because of possible utf16
-
 
1319
        mov     eax, dword[ebp+PARTITION.Length+DQ.lo]
-
 
1320
        mov     edx, dword[ebp+PARTITION.Length+DQ.hi]
-
 
1321
        mov     ecx, [ebp+PARTITION.Disk]
-
 
1322
        mov     ecx, [ecx+DISK.MediaInfo.SectorSize]
-
 
1323
        bsf     ecx, ecx
-
 
1324
        shld    edx, eax, cl
-
 
1325
        shl     eax, cl
-
 
1326
        mov     [ebx+bdfe.size.lo], eax
-
 
1327
        mov     [ebx+bdfe.size.hi], edx
-
 
1328
        xor     eax, eax
-
 
1329
.done:
-
 
1330
        ret
1292
endg
1331
endp
1293
 
1332
 
1294
; This function is called from file_system_lfn.
1333
; This function is called from file_system_lfn.
1295
; This handler gets the control each time when fn 70 is called
1334
; This handler gets the control each time when fn 70 is called
1296
; with unknown item of root subdirectory.
1335
; with unknown item of root subdirectory.
Line 1474... Line 1513...
1474
        mov     eax, [eax+ecx*4]
1513
        mov     eax, [eax+ecx*4]
1475
        mov     edi, [eax+PARTITION.FSUserFunctions]
1514
        mov     edi, [eax+PARTITION.FSUserFunctions]
1476
        mov     ecx, [ebx]
1515
        mov     ecx, [ebx]
1477
        cmp     [edi+4], ecx
1516
        cmp     [edi+4], ecx
1478
        jbe     .unsupported
1517
        jbe     .unsupported
-
 
1518
        cmp     dword[edi+8+ecx*4], 0   ; user function not implemented
-
 
1519
        jz      .unsupported
1479
        pushd   edx ebp eax [edi+8+ecx*4]
1520
        pushd   edx ebp eax [edi+8+ecx*4]
1480
        cmp     ecx, 10
1521
        cmp     ecx, 10
1481
        jnz     .callFS
1522
        jnz     .callFS
1482
        or      ecx, -1
1523
        or      ecx, -1
1483
        mov     edi, esi
1524
        mov     edi, esi