From 45aee00e6b8aa8c5cc33978a5fd2a0176cf0e33c Mon Sep 17 00:00:00 2001 From: pathoswithin Date: Tue, 7 Mar 2017 16:28:02 +0000 Subject: [PATCH] sysfunction 70.5: small change git-svn-id: svn://kolibrios.org@6876 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/docs/sysfuncr.txt | 3 ++- kernel/trunk/docs/sysfuncs.txt | 3 ++- kernel/trunk/fs/ext.inc | 3 +++ kernel/trunk/fs/fat.inc | 3 +++ kernel/trunk/fs/iso9660.inc | 3 +++ kernel/trunk/fs/ntfs.inc | 12 ++++++++---- 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/kernel/trunk/docs/sysfuncr.txt b/kernel/trunk/docs/sysfuncr.txt index 430128ce33..ff08d96d61 100644 --- a/kernel/trunk/docs/sysfuncr.txt +++ b/kernel/trunk/docs/sysfuncr.txt @@ -4230,7 +4230,8 @@ Architecture Software Developer's Manual, Volume 3, Appendix B); (блока данных входа каталога), указанном в описании подфункции 1, но без имени файла, за исключением корневого каталога. Замечания: - * Для корневого каталога возвращается размер и имя раздела. + * Для корневого каталога возвращается размер раздела, + а при указании кодировки (не ноль), также его имя. * Для устройства возвращается только размер. ---------------------- Константы для регистров: ---------------------- diff --git a/kernel/trunk/docs/sysfuncs.txt b/kernel/trunk/docs/sysfuncs.txt index 5b2a8b248e..8ddc4ff455 100644 --- a/kernel/trunk/docs/sysfuncs.txt +++ b/kernel/trunk/docs/sysfuncs.txt @@ -4186,7 +4186,8 @@ Information on file is returned in the BDFE format (block of data 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 root folder returns the partition size, + and if encoding byte is non-zero, the volume label. * For the device returns only the size. ---------------------- Constants for registers: ---------------------- diff --git a/kernel/trunk/fs/ext.inc b/kernel/trunk/fs/ext.inc index 87a55ca8bd..5507e12261 100644 --- a/kernel/trunk/fs/ext.inc +++ b/kernel/trunk/fs/ext.inc @@ -2103,6 +2103,7 @@ ext_GetFileInfo: push eax call ext_unlock pop eax +@@: ret .volume: @@ -2116,6 +2117,8 @@ ext_GetFileInfo: mov eax, [ebx+8] mov byte [edi], 8 mov [edi+4], eax + test eax, eax + jz @b lea esi, [ebp+EXTFS.superblock.volumeLabel] mov ecx, 16 add edi, 40 diff --git a/kernel/trunk/fs/fat.inc b/kernel/trunk/fs/fat.inc index 9413b5c1d0..f321469072 100644 --- a/kernel/trunk/fs/fat.inc +++ b/kernel/trunk/fs/fat.inc @@ -2921,6 +2921,7 @@ fat_GetFileInfo: push eax call fat_unlock pop eax +@@: ret .volume: @@ -2934,6 +2935,8 @@ fat_GetFileInfo: mov eax, [ebx+8] mov byte [edi], 8 mov [edi+4], eax + test eax, eax + jz @b lea esi, [ebp+FAT.volumeLabel] mov ecx, 11 @@: diff --git a/kernel/trunk/fs/iso9660.inc b/kernel/trunk/fs/iso9660.inc index 4938a5df70..4cab16f278 100644 --- a/kernel/trunk/fs/iso9660.inc +++ b/kernel/trunk/fs/iso9660.inc @@ -500,6 +500,8 @@ fs_CdGetFileInfo: ret .volume: + test eax, eax + jz .size mov ecx, 16 mov esi, CDDataBuf+40 add edi, 40 @@ -538,6 +540,7 @@ fs_CdGetFileInfo: xor eax, eax mov [edx+36], eax stosw + mov byte [edx], 8 ret ;----------------------------------------------------------------------------- diff --git a/kernel/trunk/fs/ntfs.inc b/kernel/trunk/fs/ntfs.inc index 05bbb140bf..947e02b54c 100644 --- a/kernel/trunk/fs/ntfs.inc +++ b/kernel/trunk/fs/ntfs.inc @@ -1758,10 +1758,10 @@ ntfs_datetime_to_bdfe: ;---------------------------------------------------------------- ntfs_GetFileInfo: - call ntfs_lock mov edi, [ebx+16] cmp byte [esi], 0 jz .volume + call ntfs_lock call ntfs_find_lfn jnc .found test eax, eax @@ -1775,18 +1775,22 @@ ntfs_GetFileInfo: .end: call ntfs_unlock xor eax, eax +@@: ret .volume: - mov byte [edi], 8 - mov eax, [ebx+8] - mov [edi+4], eax mov eax, dword [ebp+NTFS.Length] mov edx, dword [ebp+NTFS.Length+4] shld edx, eax, 9 shl eax, 9 mov [edi+36], edx mov [edi+32], eax + mov eax, [ebx+8] + mov byte [edi], 8 + mov [edi+4], eax + test eax, eax + jz @b + call ntfs_lock add edi, 40 mov [ebp+NTFS.cur_buf], edi mov [ebp+NTFS.cur_iRecord], 3