From 799f7cdc6bfa2d0cd96feab7aed9311535ab6c63 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Sat, 15 Jun 2013 21:17:06 +0000 Subject: [PATCH] Adding f.30.3 to mount the additional system directory (this is used by SEARCHAP). git-svn-id: svn://kolibrios.org@3663 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/docs/sysfuncr.txt | 17 +++++++++++++ kernel/trunk/docs/sysfuncs.txt | 17 +++++++++++++ kernel/trunk/fs/fs_lfn.inc | 45 ++++++++++++++++++++++++++++++++++ kernel/trunk/fs/parse_fn.inc | 11 +++++++++ 4 files changed, 90 insertions(+) diff --git a/kernel/trunk/docs/sysfuncr.txt b/kernel/trunk/docs/sysfuncr.txt index ac50580ef1..d3be6b0f31 100644 --- a/kernel/trunk/docs/sysfuncr.txt +++ b/kernel/trunk/docs/sysfuncr.txt @@ -1794,6 +1794,23 @@ dd 1675 * При создании процесса/потока текущая папка наследуется от родителя. +---- Подфункция 3 - установить доп. системную директорию для ядра ---- +Параметры: + * eax = 30 - номер функции + * ebx = 3 - номер подфункции + * ecx = указатель на блок данных: + sysdir_name rb 64 + sysdir_path rb 64 +Пример: +dir_name1 db 'addappl',0 + rb 64-8 +dir_path1 db 'HD0/1',0 + rb 64-6 +Возвращаемое значение: + * функция не возвращает значения +Замечания: + * Функция может быть вызвана только 1 раз за 1 сессию работы ОС. + ====================================================================== ========= Функция 34 - узнать кому принадлежит точка экрана. ========= ====================================================================== diff --git a/kernel/trunk/docs/sysfuncs.txt b/kernel/trunk/docs/sysfuncs.txt index 24c14f53e8..8218b8a96f 100644 --- a/kernel/trunk/docs/sysfuncs.txt +++ b/kernel/trunk/docs/sysfuncs.txt @@ -1776,6 +1776,23 @@ Remarks: * At process/thread creation the current folder will be inherited from the parent. +--- Subfunction 3 - install the add.system directory for the kernel -- +Parameters: + * eax = 30 - function number + * ebx = 3 - subfunction number + * ecx = pointer to a block of data: + sysdir_name rb 64 + sysdir_path rb 64 +For example: +dir_name1 db 'addappl',0 + rb 64-8 +dir_path1 db 'HD0/1',0 + rb 64-6 +Returned value: + * function does not return value +Remarks: + * The function can be called only 1 time for 1 session of the OS. + ====================================================================== ========= Function 34 - who owner the pixel on the screen. =========== ====================================================================== diff --git a/kernel/trunk/fs/fs_lfn.inc b/kernel/trunk/fs/fs_lfn.inc index 61d5265005..213613204c 100644 --- a/kernel/trunk/fs/fs_lfn.inc +++ b/kernel/trunk/fs/fs_lfn.inc @@ -934,6 +934,12 @@ biosdisk_enum_root: ret process_replace_file_name: +; in +; esi - path with filename(f.70) +; +; out +; ebp - full filename + mov ebp, [full_file_name_table] mov edi, [full_file_name_table.size] dec edi @@ -975,6 +981,10 @@ process_replace_file_name: .ret: ret +uglobal +lock_flag_for_f30_3 rb 1 +endg + sys_current_directory: ; mov esi, [current_slot] ; mov esi, [esi+APPDATA.cur_dir] @@ -988,7 +998,42 @@ sys_current_directory: jz .set dec ebx jz .get + dec ebx + jz .mount_additional_directory ret + +.mount_additional_directory: +; sysfunction 30.2: [for app] eax=30,ebx=3,ecx->dir name+dir path (128) +; for our code: nothing + +; check lock of the function + cmp [lock_flag_for_f30_3], 1 + je @f + + mov esi, ecx + mov edi, sysdir_name1 +; copying fake directory name + mov ecx, 63 + cld + rep movsb +; terminator of name, in case if we get the inlet trash + inc esi + xor eax, eax + stosb +; copying real directory path for mounting + mov ecx, 63 + rep movsb +; terminator of name, in case if we get the inlet trash + xor eax, eax + stosb +; increase the pointer of inputs for procedure "process_replace_file_name" + mov [full_file_name_table.size], 2 +; block the ability to call f.30.3 because for one session is necessary +; for us only once + mov [lock_flag_for_f30_3], 1 +@@: + ret + .get: ; sysfunction 30.2: [for app] eax=30,ebx=2,ecx->buffer,edx=len ; for our code: ebx->buffer,ecx=len diff --git a/kernel/trunk/fs/parse_fn.inc b/kernel/trunk/fs/parse_fn.inc index b959e053ed..f25dea6edf 100644 --- a/kernel/trunk/fs/parse_fn.inc +++ b/kernel/trunk/fs/parse_fn.inc @@ -32,6 +32,17 @@ uglobal ; Parser_params will initialize: sysdir_name = "sys", sysdir_path = sysdir_name rb 64 sysdir_path rb 64 +sysdir_name1 rb 64 +sysdir_path1 rb 64 + +; for example: +;dir_name1 db 'addappl',0 +; rb 64-8 +;dir_path1 db 'HD0/1',0 +; rb 64-6 +endg + +uglobal tmp_file_name_table dd ? endg