Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6875 → Rev 6872

/kernel/trunk/fs/fs_lfn.inc
148,32 → 148,28
 
.nextCD:
test eax, eax ; partition number
jnz @f
inc eax ; /cdX/1
ret
 
stc
jnz @f ; no more partitions
mov al, 1 ; /cdX/1
clc
@@:
stc
ret
 
.maindir: ; list partitions
mov esi, .nextCD
xor ecx, ecx
.maindir_noesi: ; backjump from dyndisk_handler
push ebp
mov ebp, ecx
call kernel_free
mov edi, [ebx+16] ; buffer
cmp byte [ebx], 5
jz .deviceInfo
cmp byte [ebx], 1 ; read folder?
jnz .access_denied
cmp dword[ebx], 1
jnz .access_denied ; read folder?
push ebp
pushd [ebx+4] ; first block
mov ebp, [ebx+12] ; the number of blocks to read
mov edx, [ebx+16] ; buffer
mov ebx, [ebx+8] ; flags
mov ecx, 32/4
mov edx, edi
mov edi, edx
xor eax, eax
rep stosd
mov byte [edx], 1 ; version
204,7 → 200,7
push edx
test eax, eax
jnz @b
cmp ebx, 2
cmp ebx, 1
jz .uni
@@:
pop eax
213,8 → 209,6
test eax, eax
jnz @b
pop edi edx eax
cmp ebx, 3
jz @f
add edi, 264
jmp .maindir_loop
 
225,7 → 219,6
test eax, eax
jnz .uni
pop edi edx eax
@@:
add edi, 520
jmp .maindir_loop
 
245,23 → 238,8
mov dword[image_of_eax], ERROR_ACCESS_DENIED
ret
 
.deviceInfo:
test ebp, ebp
jz @f
mov eax, dword[ebp+DISK.MediaInfo.Capacity]
mov edx, dword[ebp+DISK.MediaInfo.Capacity+4]
shld edx, eax, 9
shl eax, 9
mov [edi+36], edx
mov [edi+32], eax
@@:
and dword[image_of_eax], 0
ret
 
.rootdir: ; / - virtual root folder
cmp byte [ebx], 5
jz @b
cmp byte [ebx], 1 ; read folder?
cmp dword[ebx], 1 ; read folder?
jnz .access_denied
mov ebp, [ebx+12] ; number of blocks
mov edx, [ebx+16] ; return area
295,7 → 273,7
rep stosd
push edi
lea esi, [esp+8]
cmp ebx, 2
cmp ebx, 1
jz .uni2
@@:
lodsb
303,8 → 281,6
test eax, eax
jnz @b
pop edi eax
cmp ebx, 3
jz @f
add edi, 264
jmp .rootdir_loop
 
314,7 → 290,6
test eax, eax
jnz .uni2
pop edi eax
@@:
add edi, 520
jmp .rootdir_loop
 
/kernel/trunk/blkdev/disk.inc
1379,12 → 1379,18
cmp byte [esi], 0
jnz .haspartition
; 11. The fs operation wants to enumerate partitions.
; Check whether the media is inserted.
; 11a. Only "list directory" operation is applicable to /<diskname> path. Check
; the operation code. If wrong, go to 13.
cmp dword [ebx], 1
jnz .access_denied
; 11b. If the media is inserted, use 'fs_dyndisk_next' as an enumeration
; procedure. Otherwise, use 'fs_dyndisk_next_nomedia'.
mov esi, fs_dyndisk_next_nomedia
test edx, edx
jz @f
mov esi, fs_dyndisk_next
@@: ; Let the procedure from fs_lfn.inc do the job.
@@:
; 11c. Let the procedure from fs_lfn.inc do the job.
jmp file_system_lfn.maindir_noesi
 
.root:
/kernel/trunk/docs/sysfuncr.txt
4231,7 → 4231,7
но без имени файла, за исключением корневого каталога.
Замечания:
* Для корневого каталога возвращается размер и имя раздела.
* Для устройства возвращается только размер.
* Функция не поддерживает виртуальные папки типа / и /rd.
 
---------------------- Константы для регистров: ----------------------
eax - SF_FILE (70)
/kernel/trunk/docs/sysfuncs.txt
4186,8 → 4186,8
for folder entry), explained in the description of subfunction 1,
but without filename, except the root folder.
Remarks:
* For the root folder returns the size and the volume label.
* For the device returns only the size.
* For the root folder returns size and name of partition.
* The function does not support virtual folders such as / and /rd.
 
---------------------- Constants for registers: ----------------------
eax - SF_FILE (70)