Browse Source

Kernel.cmdLine removed

Alexander Shiryaev 12 years ago
parent
commit
f331c9fc94

BIN
BlackBox/_Linux_/Lin/Mod/Libc.odc


+ 1 - 1
BlackBox/_Linux_/Lin/Mod/Libc.txt

@@ -304,7 +304,7 @@ MODULE LinLibc ["libc.so.6"];
 		sigset_t* = ARRAY [untagged] 128 OF BYTE;
 		Ptrsigset_t* = INTEGER;
 		sigaction_t* = RECORD [untagged]
-			sa_sigaction*: PROCEDURE (sig: INTEGER; siginfo: Ptrsiginfo_t; ptr: Ptrucontext_t); (* union with sa_handler*: PtrProc;*)
+			sa_sigaction*: PROCEDURE [ccall] (sig: INTEGER; siginfo: Ptrsiginfo_t; ptr: Ptrucontext_t); (* union with sa_handler*: PtrProc;*)
 			sa_mask*: sigset_t;
 			sa_flags*: SET;
 			sa_restorer*: LONGINT;

BIN
BlackBox/_Linux_/System/Mod/Kernel.odc


+ 1 - 1
BlackBox/_Linux_/System/Mod/Kernel.txt

@@ -1828,7 +1828,7 @@ MODULE Kernel;
 		FLDCW
 	END InitFpu;
 
-	PROCEDURE (* [ccall] *) TrapHandler (sig: INTEGER; siginfo: Libc.Ptrsiginfo_t; context: Libc.Ptrucontext_t);
+	PROCEDURE [ccall] TrapHandler (sig: INTEGER; siginfo: Libc.Ptrsiginfo_t; context: Libc.Ptrucontext_t);
 	BEGIN
 		IF isReadableCheck THEN
 			isReadableCheck := FALSE;

BIN
BlackBox/_Linux_/libBB.so


BIN
BlackBox/_Linux_/libBB0.so


BIN
BlackBox/_OpenBSD_/System/Mod/Kernel.odc


+ 4 - 24
BlackBox/_OpenBSD_/System/Mod/Kernel.txt

@@ -16,7 +16,6 @@ MODULE Kernel;
 
 		TODO:
 			handle stack overflow exceptions
-			correct cmdLine
 			Quit from TrapHandler
 	*)
 
@@ -277,8 +276,6 @@ MODULE Kernel;
 		isReadableCheck: BOOLEAN;
 		
 		guiHook: GuiHook;
-		
-		cmdLine-: ARRAY 1024 OF CHAR;
 
 		(* !!! This variable has to be the last variable in the list.  !!! *)
 		bootInfo-: BootInfo;
@@ -1986,7 +1983,9 @@ MODULE Kernel;
 				DefaultTrapViewer
 			ELSE
 				trapped := TRUE;
+				
 				trapViewer();
+				
 				trapped := FALSE
 			END
 		END;
@@ -2088,32 +2087,13 @@ MODULE Kernel;
 		told := 0; shift := 0
 	END Init;
 
-	PROCEDURE SetCmdLine;
-		VAR i, l: INTEGER;
-	BEGIN
-		l := LEN(cmdLine);
-		cmdLine := bootInfo.argv[0]$;
-		FOR i := 1 TO bootInfo.argc - 1 DO cmdLine := cmdLine + " " + bootInfo.argv[i]END
-	END SetCmdLine;
-	
-	PROCEDURE SetCmdLine2;
-		VAR x: Libc.PtrSTR;
-	BEGIN
-		x := Libc.getenv("CMDLINE");
-		IF x # NIL THEN
-			cmdLine := x$
-		END
-	END SetCmdLine2;
-
 BEGIN
 	IF modList = NIL THEN	(* only once *)
 		S.GETREG(SP, baseStack); (* TODO: Check that this is ok. *)
 		IF bootInfo # NIL THEN
-			modList := bootInfo.modList; (* boot loader initializes the bootInfo struct *)
-			SetCmdLine
+			modList := bootInfo.modList (* boot loader initializes the bootInfo struct *)
 		ELSE
-			S.GETREG(ML, modList);	(* linker loads module list to BX *)
-			SetCmdLine2
+			S.GETREG(ML, modList)	(* linker loads module list to BX *)
 		END;
 		static := init IN modList.opts;
 		inDll := dll IN modList.opts;

BIN
BlackBox/_OpenBSD_/libBB.so


BIN
BlackBox/_OpenBSD_/libBB0.so


+ 0 - 2
README

@@ -63,8 +63,6 @@ Files:
 					Kernel.InstallSignals:
 						do not install signal handler for SIGTHR (when executable linked with -pthread)
 					IsReadable
-				Kernel.cmdLine support:
-					Kernel.INIT (SetCmdLine2)
 		_Linux_/System/Mod/Kernel.odc:
 			_OpenBSD_/System/Mod/Kernel.odc modified for Linux:
 				Time*

+ 0 - 2
TODO

@@ -1,6 +1,4 @@
 By priority:
-	remove Kernel.cmdLine
-
 	ConsConverter
 		example: ConsConverter.Convert('System/Mod','Kernel.odc','Kernel.txt')