]> Zhao Yanbai Git Server - minix.git/commitdiff
Various updates to support dynamically starting drivers.
authorJorrit Herder <jnherder@minix3.org>
Tue, 2 Aug 2005 15:32:12 +0000 (15:32 +0000)
committerJorrit Herder <jnherder@minix3.org>
Tue, 2 Aug 2005 15:32:12 +0000 (15:32 +0000)
lib/other/Makefile
lib/other/_findproc.c
lib/other/_getprocnr.c
lib/syscall/Makefile
tools/Makefile

index 35af0c48edbfb77d29ed804e1a3744b883fe1ff9..1d3d81f134df17e872c06323b507f50a85494fa2 100755 (executable)
@@ -18,6 +18,7 @@ OBJECTS       = \
        $(LIBRARY)(_svrctl.o) \
        $(LIBRARY)(_getsysinfo.o) \
        $(LIBRARY)(_getprocnr.o) \
+       $(LIBRARY)(_devctl.o) \
        $(LIBRARY)(_findproc.o) \
        $(LIBRARY)(asynchio.o) \
        $(LIBRARY)(configfile.o) \
@@ -90,6 +91,9 @@ $(LIBRARY)(_seekdir.o):       _seekdir.c
 $(LIBRARY)(_svrctl.o): _svrctl.c
        $(CC1) _svrctl.c
 
+$(LIBRARY)(_devctl.o): _devctl.c
+       $(CC1) _devctl.c
+
 $(LIBRARY)(_getprocnr.o):      _getprocnr.c
        $(CC1) _getprocnr.c
 
index 8e110d9f62c366d74478aaf6f692710f769ad6f6..c57189e9aa5e4fa08ba4b714d99d7e1fdc97563d 100644 (file)
@@ -11,7 +11,8 @@ int *proc_nr;                 /* return process number here */
   message m;
 
   m.m1_p1 = proc_name;
-  m.m1_i1 = strlen(proc_name) + 1;
+  m.m1_i1 = -1;                        /* search by name */
+  m.m1_i2 = strlen(proc_name) + 1;
   if (_syscall(MM, GETPROCNR, &m) < 0) return(-1);
   *proc_nr = m.m1_i1;
   return(0);
index 8c613dcad4dddf1db28f16c7f41bba5af4b302ca..3b1b924462b57751565b40f16dd57400e7655c5e 100644 (file)
@@ -3,13 +3,12 @@
 #include <unistd.h>
 
 
-PUBLIC int getprocnr(proc_nr)
-int *proc_nr;                  /* return process number here */
+PUBLIC int getprocnr()
 {
   message m;
-  m.m1_i1 = 0;                 /* tell PM to get own process nr */
+  m.m1_i1 = -1;                        /* get own process number */
+  m.m1_i2 = 0;                 /* get own process number */
   if (_syscall(MM, GETPROCNR, &m) < 0) return(-1);
-  *proc_nr = m.m1_i1;
-  return(0);
+  return(m.m1_i1);
 }
 
index fdafa84520e46627cfe339782963d0b710657c01..50a3e1cc3ef1513c8c936ccbea952abbd01657e0 100755 (executable)
@@ -23,6 +23,7 @@ OBJECTS       = \
        $(LIBRARY)(close.o) \
        $(LIBRARY)(closedir.o) \
        $(LIBRARY)(creat.o) \
+       $(LIBRARY)(devctl.o) \
        $(LIBRARY)(dup.o) \
        $(LIBRARY)(dup2.o) \
        $(LIBRARY)(execl.o) \
@@ -162,6 +163,9 @@ $(LIBRARY)(closedir.o):     closedir.s
 $(LIBRARY)(creat.o):   creat.s
        $(CC1) creat.s
 
+$(LIBRARY)(devctl.o):  devctl.s
+       $(CC1) devctl.s
+
 $(LIBRARY)(dup.o):     dup.s
        $(CC1) dup.s
 
index 189826266b7eb7d530a393a2943286c53b178821..90ab4bfc428105d61f7f6a48a6dc87063e965e3f 100755 (executable)
@@ -11,13 +11,10 @@ PROGRAMS=   ../kernel/kernel \
        ../servers/pm/pm \
        ../servers/fs/fs \
        ../servers/sm/sm \
-       ../servers/is/is \
        ../drivers/tty/tty \
        ../drivers/memory/memory \
-       ../drivers/at_wini/at_wini \
-       ../drivers/rtl8139/rtl8139 \
-       ../drivers/fxp/fxp \
        ../drivers/log/log \
+       ../drivers/at_wini/at_wini \
        ../drivers/bios_wini/bios_wini \
        ../servers/init/init \
 #      bootdev.img