From de8a59622624159b23523c75196a6b2445f67e33 Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Tue, 29 May 2007 08:32:11 +0000 Subject: [PATCH] * Fixed bug with handling of command-line for apps * Fn 70 supports /sys/... syntax for access to sysdir (/rd/1 with normal boot) git-svn-id: svn://kolibrios.org@525 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/conf_lib.inc | 2 +- kernel/trunk/core/dll.inc | 12 ++++++------ kernel/trunk/core/taskman.inc | 10 +++++++--- kernel/trunk/data32.inc | 6 +++--- kernel/trunk/fs/parse_fn.inc | 9 ++++----- kernel/trunk/gui/skindata.inc | 2 +- kernel/trunk/sys.conf | 4 ++-- 7 files changed, 24 insertions(+), 21 deletions(-) diff --git a/kernel/trunk/core/conf_lib.inc b/kernel/trunk/core/conf_lib.inc index 9282a5219..229770fd9 100644 --- a/kernel/trunk/core/conf_lib.inc +++ b/kernel/trunk/core/conf_lib.inc @@ -10,7 +10,7 @@ conf_file_loaded: db 0 ; флаг загрузки конфига conf_path_sect: db 'path',0 -conf_fname db '/%sys%/sys.conf',0 +conf_fname db '/sys/sys.conf',0 diff --git a/kernel/trunk/core/dll.inc b/kernel/trunk/core/dll.inc index 8fb051d30..ab439d698 100644 --- a/kernel/trunk/core/dll.inc +++ b/kernel/trunk/core/dll.inc @@ -698,16 +698,16 @@ proc load_driver stdcall, driver_name:dword exports dd ? ;fake exports table dd ? - file_name rb 15+16+4+1 ; '/%sys%/drivers/.obj' + file_name rb 13+16+4+1 ; '/sys/drivers/.obj' endl lea edx, [file_name] - mov dword [edx], '/%sy' - mov dword [edx+4], 's%/d' - mov dword [edx+8], 'rive' - mov dword [edx+12], 'rs/' + mov dword [edx], '/sys' + mov dword [edx+4], '/dri' + mov dword [edx+8], 'vers' + mov byte [edx+12], '/' mov esi, [driver_name] - lea edi, [edx+15] + lea edi, [edx+13] mov ecx, 16 @@: lodsb diff --git a/kernel/trunk/core/taskman.inc b/kernel/trunk/core/taskman.inc index 1d7fdcffe..4b6f1b979 100644 --- a/kernel/trunk/core/taskman.inc +++ b/kernel/trunk/core/taskman.inc @@ -1011,8 +1011,8 @@ proc set_app_params stdcall,slot:dword, params:dword,\ .add_command_line: mov edx,[params] mov edx,[edx] ;app_cmdline - test edx, [cmd_line] ;check both src & dst - jz @F ;application don't need parameters + test edx,edx + jz @f ;application doesn't need parameters mov eax, edx add eax, 256 @@ -1021,7 +1021,11 @@ proc set_app_params stdcall,slot:dword, params:dword,\ cmp eax, [SLOT_BASE+APPDATA.mem_size+ebx*8] ja @f - stdcall strncpy, edx, [cmd_line], 256 + mov byte [edx], 0 ;force empty string if no cmdline given + mov eax, [cmd_line] + test eax, eax + jz @f + stdcall strncpy, edx, eax, 256 @@: mov edx,[params] mov edx, [edx+4] ;app_path diff --git a/kernel/trunk/data32.inc b/kernel/trunk/data32.inc index b080d86bf..7c78e8e86 100644 --- a/kernel/trunk/data32.inc +++ b/kernel/trunk/data32.inc @@ -84,8 +84,8 @@ szIMPORTS db 'IMPORTS',0 firstapp db 'LAUNCHER',0 -char db '/%sys%/FONTS/CHAR.MT',0 -char2 db '/%sys%/FONTS/CHAR2.MT',0 +char db '/sys/FONTS/CHAR.MT',0 +char2 db '/sys/FONTS/CHAR2.MT',0 bootpath db '/KOLIBRI ' bootpath2 db 0 @@ -139,7 +139,7 @@ gdts: dd gdts dw 0 -; Attention! The order first four selectors not to change, is used in Fast System Call +; Attention! Do not change the order of the first four selectors. They are used in Fast System Call ; must be : os_code, os_data, app_code, app_data, .... int_code_l: diff --git a/kernel/trunk/fs/parse_fn.inc b/kernel/trunk/fs/parse_fn.inc index 60e8d6f5e..5b18da69f 100644 --- a/kernel/trunk/fs/parse_fn.inc +++ b/kernel/trunk/fs/parse_fn.inc @@ -11,7 +11,7 @@ iglobal ; pointer to memory for path replace table, ; size of one record is 128 bytes: 64 bytes for search pattern + 64 bytes for replace string -; start with one entry: %sys% -> +; start with one entry: sys -> full_file_name_table dd sysdir_name .size dd 1 @@ -19,18 +19,17 @@ tmp_file_name_size dd 1 endg uglobal -; Parser_params will initialize: sysdir_name = "%sys%", sysdir_path = +; Parser_params will initialize: sysdir_name = "sys", sysdir_path = sysdir_name rb 64 sysdir_path rb 64 tmp_file_name_table dd ? endg -; берет параметры bx_from_load и инициализирует замену для %sys% +; берет параметры bx_from_load и инициализирует замену для /sys Parser_params: mov eax,[OS_BASE+0x10000+bx_from_load] mov ecx,sysdir_path - mov [ecx-64],dword '%sys' - mov [ecx-64+4],word '%' + mov [ecx-64],dword 'sys' cmp al,'r' ; рам диск jnz @f mov [ecx],dword 'RD/?' diff --git a/kernel/trunk/gui/skindata.inc b/kernel/trunk/gui/skindata.inc index 353a13db9..ede5ebe81 100644 --- a/kernel/trunk/gui/skindata.inc +++ b/kernel/trunk/gui/skindata.inc @@ -11,7 +11,7 @@ $Revision$ ; iglobal - _skin_file_default db '/%sys%/DEFAULT.SKN',0 + _skin_file_default db '/sys/DEFAULT.SKN',0 endg struct SKIN_DATA diff --git a/kernel/trunk/sys.conf b/kernel/trunk/sys.conf index 3505819e2..64a0dc295 100644 --- a/kernel/trunk/sys.conf +++ b/kernel/trunk/sys.conf @@ -1,6 +1,6 @@ [path] -/rd/1=/%sys% -/rd/1/dll=/%sys%/lib +/rd/1=/sys +/rd/1/dll=/sys/lib [net] active=1