From: Philip Homburg Date: Wed, 2 May 2007 11:32:22 +0000 (+0000) Subject: Use ds_retrieve_u32 to get the endpoint of inet. X-Git-Tag: v3.1.4~385 X-Git-Url: http://zhaoyanbai.com/repos/cppcheck-error.log?a=commitdiff_plain;h=a124958e59210f5f7e0952df85fde3b9fc861544;p=minix.git Use ds_retrieve_u32 to get the endpoint of inet. --- diff --git a/drivers/rtl8139/rtl8139.c b/drivers/rtl8139/rtl8139.c index dbe91a549..d3f082c1b 100755 --- a/drivers/rtl8139/rtl8139.c +++ b/drivers/rtl8139/rtl8139.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -305,11 +306,13 @@ extern int errno; int main(int argc, char *argv[]) { int fkeys, sfkeys; - int inet_proc_nr; + u32_t inet_proc_nr; int i, r; re_t *rep; long v; + (progname=strrchr(argv[0],'/')) ? progname++ : (progname=argv[0]); + env_setargs(argc, argv); 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 * not yet alive. */ - (progname=strrchr(argv[0],'/')) ? progname++ : (progname=argv[0]); - r = _pm_findproc("inet", &inet_proc_nr); - if (r == OK) notify(inet_proc_nr); - + r= ds_retrieve_u32("inet", &inet_proc_nr); + if (r == OK) + notify(inet_proc_nr); + else if (r != ESRCH) + printf("rtl8139: ds_retrieve_u32 failed for 'inet': %d\n", r); while (TRUE) {