Use ds_retrieve_u32 to get the endpoint of inet.

This commit is contained in:
Philip Homburg 2007-05-02 11:32:22 +00:00
parent 33d31720a5
commit a124958e59

View File

@ -62,6 +62,7 @@
#include <string.h> #include <string.h>
#include <stddef.h> #include <stddef.h>
#include <minix/com.h> #include <minix/com.h>
#include <minix/ds.h>
#include <minix/keymap.h> #include <minix/keymap.h>
#include <minix/syslib.h> #include <minix/syslib.h>
#include <minix/type.h> #include <minix/type.h>
@ -305,11 +306,13 @@ extern int errno;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int fkeys, sfkeys; int fkeys, sfkeys;
int inet_proc_nr; u32_t inet_proc_nr;
int i, r; int i, r;
re_t *rep; re_t *rep;
long v; long v;
(progname=strrchr(argv[0],'/')) ? progname++ : (progname=argv[0]);
env_setargs(argc, argv); env_setargs(argc, argv);
v= 0; v= 0;
@ -329,10 +332,11 @@ int main(int argc, char *argv[])
* be found, assume this is the first time we started and INET is * be found, assume this is the first time we started and INET is
* not yet alive. * not yet alive.
*/ */
(progname=strrchr(argv[0],'/')) ? progname++ : (progname=argv[0]); r= ds_retrieve_u32("inet", &inet_proc_nr);
r = _pm_findproc("inet", &inet_proc_nr); if (r == OK)
if (r == OK) notify(inet_proc_nr); notify(inet_proc_nr);
else if (r != ESRCH)
printf("rtl8139: ds_retrieve_u32 failed for 'inet': %d\n", r);
while (TRUE) while (TRUE)
{ {