From: Jorrit Herder Date: Tue, 2 Aug 2005 15:32:12 +0000 (+0000) Subject: Various updates to support dynamically starting drivers. X-Git-Tag: v3.1.0~478 X-Git-Url: http://zhaoyanbai.com/repos/icons/debian/openlogo-25.jpg?a=commitdiff_plain;h=1d60e866c3826dc3145a803d2d06e3cbeb4937e1;p=minix.git Various updates to support dynamically starting drivers. --- diff --git a/lib/other/Makefile b/lib/other/Makefile index 35af0c48e..1d3d81f13 100755 --- a/lib/other/Makefile +++ b/lib/other/Makefile @@ -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 diff --git a/lib/other/_findproc.c b/lib/other/_findproc.c index 8e110d9f6..c57189e9a 100644 --- a/lib/other/_findproc.c +++ b/lib/other/_findproc.c @@ -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); diff --git a/lib/other/_getprocnr.c b/lib/other/_getprocnr.c index 8c613dcad..3b1b92446 100644 --- a/lib/other/_getprocnr.c +++ b/lib/other/_getprocnr.c @@ -3,13 +3,12 @@ #include -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); } diff --git a/lib/syscall/Makefile b/lib/syscall/Makefile index fdafa8452..50a3e1cc3 100755 --- a/lib/syscall/Makefile +++ b/lib/syscall/Makefile @@ -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 diff --git a/tools/Makefile b/tools/Makefile index 189826266..90ab4bfc4 100755 --- a/tools/Makefile +++ b/tools/Makefile @@ -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