From 3ac6e402420432f82ca97e3e836be18dcfb8cfd7 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Sun, 25 Jun 2006 19:28:15 +0000 Subject: [PATCH] Added: Function 70/05 for ISO9660 - get file/directory attributes structure. Fix: small error - incorrect allocation in the code of string mov [window_minimize], 2 git-svn-id: svn://kolibrios.org@90 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/fs/fs_lfn.inc | 11 ++++++-- kernel/trunk/fs/iso9660.inc | 52 ++++++++++++++++++++++++++++++++----- kernel/trunk/kernel.asm | 13 +++------- 3 files changed, 58 insertions(+), 18 deletions(-) diff --git a/kernel/trunk/fs/fs_lfn.inc b/kernel/trunk/fs/fs_lfn.inc index 1fedb519a..38a5a4fe3 100644 --- a/kernel/trunk/fs/fs_lfn.inc +++ b/kernel/trunk/fs/fs_lfn.inc @@ -492,8 +492,8 @@ fs_OnCd: mov edx, [ebx+16] add edx, std_application_base_address mov eax, [ebx] - cmp eax, 1 - ja .not_impl + cmp eax,fs_NumCdServices + jae .not_impl add ebx, 4 call dword [fs_CdServices + eax*4] and [cd_status], 0 @@ -508,6 +508,13 @@ fs_OnCd: fs_CdServices: dd fs_CdRead dd fs_CdReadFolder + dd fs_NotImplemented + dd fs_NotImplemented + dd fs_NotImplemented + dd fs_CdGetFileInfo + dd fs_NotImplemented +fs_NumCdServices = ($ - fs_CdServices)/4 + ;******************************************************* fs_HasRamdisk: diff --git a/kernel/trunk/fs/iso9660.inc b/kernel/trunk/fs/iso9660.inc index 8debcbb8a..ed911ef00 100644 --- a/kernel/trunk/fs/iso9660.inc +++ b/kernel/trunk/fs/iso9660.inc @@ -276,7 +276,7 @@ fs_CdReadFolder: jb .ansi .cd_get_parameters_of_file_1: mov [edi],byte 0 - call .cd_get_parameters_of_file + call cd_get_parameters_of_file add [cd_mem_location],304 jmp .get_names_from_buffer_1 @@ -313,7 +313,7 @@ fs_CdReadFolder: jb .unicode .cd_get_parameters_of_file_2: mov [edi],word 0 - call .cd_get_parameters_of_file + call cd_get_parameters_of_file add [cd_mem_location],560 jmp .get_names_from_buffer_1 @@ -328,8 +328,13 @@ fs_CdReadFolder: add edi,4 jmp .cd_get_parameters_of_file_2 -.cd_get_parameters_of_file: +.end_buffer: + pop edx edi esi eax + ret + +cd_get_parameters_of_file: mov edi,[cd_mem_location] +cd_get_parameters_of_file_1: ; получаем атрибуты файла xor eax,eax ; файл не архивировался @@ -400,10 +405,43 @@ fs_CdReadFolder: mov [edi+32],eax ret -.end_buffer: - pop edx edi esi eax - ret - +;---------------------------------------------------------------- +; +; fs_CdGetFileInfo - LFN variant for CD +; get file/directory attributes structure +; +;---------------------------------------------------------------- +fs_CdGetFileInfo: + cmp byte [esi], 0 + jnz @f + mov eax, 2 + ret +@@: + push edi ebp + call cd_find_lfn + pushfd + cmp [DevErrorCode], 0 + jz @f + popfd + pop ebp edi + mov eax, 11 + ret +@@: + popfd + jnc @f + pop ebp edi + mov eax, ERROR_FILE_NOT_FOUND + ret +@@: + + mov edi, edx + call cd_get_parameters_of_file_1 + and dword [edi+4], 0 + pop ebp + pop ebp edi + xor eax, eax + ret + cd_find_lfn: ; in: esi->name ; out: CF=1 - file not found diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 0c8a4691d..654963cdd 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -63,7 +63,7 @@ use16 jmp start_of_code ; mike.dld { - org $+0x10000 + org $+0x10000 db 0 dd servetable-0x10000 draw_line dd __sys_draw_line @@ -2180,6 +2180,9 @@ sysfn_terminate2: ret sysfn_activate: ; 18.3 = ACTIVATE WINDOW +;* start code - get active process (1) - Mario79 + mov [window_minimize],2 +;* end code - get active process (1) - Mario79 cmp ebx,2 jb nowindowactivate cmp ebx,[0x3004] @@ -2194,14 +2197,6 @@ sysfn_activate: ; 18.3 = ACTIVATE WINDOW cmp esi, [0x3004] ; number of processes jz nowindowactivate ; continue if window_stack_value != number_of_processes ; i.e. if window is not already active - -;* start code - get active process (1) - Mario79 -; cli - mov [window_minimize],2 -; mov [active_process],edi -; sti -;* end code - get active process (1) - Mario79 - mov [0xff01],edi ; activate nowindowactivate: ret