Rev 6859 | Rev 6871 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6859 | Rev 6861 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2013-2016. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2013-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: 6859 $ |
8 | $Revision: 6861 $ |
9 | 9 | ||
10 | ; EXT external functions |
10 | ; EXT external functions |
11 | ; in: |
11 | ; in: |
Line 128... | Line 128... | ||
128 | fsBlockHigh dw ? |
128 | fsBlockHigh dw ? |
129 | fsBlock dd ? |
129 | fsBlock dd ? |
130 | ends |
130 | ends |
Line 131... | Line 131... | ||
131 | 131 | ||
132 | ROOT_INODE = 2 |
- | |
133 | PERMISSIONS = 110110110b |
132 | ROOT_INODE = 2 |
134 | EXTENTS_USED = 80000h |
133 | EXTENTS_USED = 80000h |
135 | TYPE_MASK = 0F000h |
134 | TYPE_MASK = 0F000h |
136 | FLAG_FILE = 8000h |
135 | FLAG_FILE = 8000h |
137 | DIRECTORY = 4000h |
136 | DIRECTORY = 4000h |
Line 2298... | Line 2297... | ||
2298 | lea ebx, [ebp+EXTFS.inodeBuffer] |
2297 | lea ebx, [ebp+EXTFS.inodeBuffer] |
2299 | mov [ebx+INODE.accessedTime], eax |
2298 | mov [ebx+INODE.accessedTime], eax |
2300 | mov [ebx+INODE.dataModified], eax |
2299 | mov [ebx+INODE.dataModified], eax |
2301 | pop edi esi edx |
2300 | pop edi esi edx |
2302 | ; edx = allocated inode number, edi -> filename, esi = parent inode number |
2301 | ; edx = allocated inode number, edi -> filename, esi = parent inode number |
2303 | mov [ebx+INODE.accessMode], DIRECTORY or PERMISSIONS |
2302 | mov [ebx+INODE.accessMode], DIRECTORY or 511 |
2304 | mov eax, edx |
2303 | mov eax, edx |
2305 | call writeInode |
2304 | call writeInode |
2306 | jc .error |
2305 | jc .error |
2307 | ; link to self |
2306 | ; link to self |
2308 | push edx esi |
2307 | push edx esi |
Line 2372... | Line 2371... | ||
2372 | lea ebx, [ebp+EXTFS.inodeBuffer] |
2371 | lea ebx, [ebp+EXTFS.inodeBuffer] |
2373 | mov [ebx+INODE.accessedTime], eax |
2372 | mov [ebx+INODE.accessedTime], eax |
2374 | mov [ebx+INODE.dataModified], eax |
2373 | mov [ebx+INODE.dataModified], eax |
2375 | pop edi esi edx |
2374 | pop edi esi edx |
2376 | ; edx = allocated inode number, edi -> filename, esi = parent inode number |
2375 | ; edx = allocated inode number, edi -> filename, esi = parent inode number |
2377 | mov [ebx+INODE.accessMode], FLAG_FILE or PERMISSIONS |
2376 | mov [ebx+INODE.accessMode], FLAG_FILE or 110110110b |
2378 | mov eax, edx |
2377 | mov eax, edx |
2379 | call writeInode |
2378 | call writeInode |
2380 | jc .error2 |
2379 | jc .error2 |
2381 | ; link parent to child |
2380 | ; link parent to child |
2382 | mov eax, esi |
2381 | mov eax, esi |
Line 2432... | Line 2431... | ||
2432 | mov eax, [ebx+4] |
2431 | mov eax, [ebx+4] |
2433 | mov edx, [ebx+8] |
2432 | mov edx, [ebx+8] |
2434 | mov ecx, [ebx+12] |
2433 | mov ecx, [ebx+12] |
2435 | mov esi, [ebx+16] |
2434 | mov esi, [ebx+16] |
2436 | .write: |
2435 | .write: |
- | 2436 | jecxz .zero |
|
2437 | div [ebp+EXTFS.bytesPerBlock] |
2437 | div [ebp+EXTFS.bytesPerBlock] |
2438 | test edx, edx |
2438 | test edx, edx |
2439 | jz .aligned |
2439 | jz .aligned |
2440 | .piece: |
2440 | .piece: |
2441 | mov ebx, ecx |
2441 | mov ebx, ecx |
Line 2468... | Line 2468... | ||
2468 | call fs_write64_sys |
2468 | call fs_write64_sys |
2469 | mov ecx, edi |
2469 | mov ecx, edi |
2470 | pop eax |
2470 | pop eax |
2471 | inc eax |
2471 | inc eax |
2472 | xor edx, edx |
2472 | xor edx, edx |
- | 2473 | .zero: |
|
2473 | jecxz .done |
2474 | jecxz .done |
2474 | .aligned: |
2475 | .aligned: |
2475 | xchg eax, ecx |
2476 | xchg eax, ecx |
2476 | div [ebp+EXTFS.bytesPerBlock] |
2477 | div [ebp+EXTFS.bytesPerBlock] |
2477 | push edx |
2478 | push edx |