From: Ben Gras Date: Sat, 25 Mar 2006 04:49:04 +0000 (+0000) Subject: Renamed findproc() to _pm_findproc() to reduce polluting of application X-Git-Tag: v3.1.2a~138 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/jquery.js?a=commitdiff_plain;h=7b58dd7f9b4c5cb5bb0dbe6e55daa2f067eb5c3b;p=minix.git Renamed findproc() to _pm_findproc() to reduce polluting of application namespace. --- diff --git a/drivers/dp8390/dp8390.c b/drivers/dp8390/dp8390.c index c0f8cd78d..287312011 100644 --- a/drivers/dp8390/dp8390.c +++ b/drivers/dp8390/dp8390.c @@ -195,7 +195,7 @@ int main(int argc, char *argv[]) eth_ign_proto= htons((u16_t) v); /* Try to notify inet that we are present (again) */ - r = findproc("inet", &tasknr); + r = _pm_findproc("inet", &tasknr); if (r == OK) notify(tasknr); diff --git a/drivers/dpeth/dp.c b/drivers/dpeth/dp.c index 06d43d26f..8894b1396 100644 --- a/drivers/dpeth/dp.c +++ b/drivers/dpeth/dp.c @@ -579,7 +579,7 @@ PUBLIC int main(int argc, char **argv) #endif /* Try to notify inet that we are present (again) */ - rc = findproc("inet", &tasknr); + rc = _pm_findproc("inet", &tasknr); if (rc == OK) notify(tasknr); diff --git a/drivers/fxp/fxp.c b/drivers/fxp/fxp.c index 0617779da..223cb81b6 100644 --- a/drivers/fxp/fxp.c +++ b/drivers/fxp/fxp.c @@ -284,7 +284,7 @@ int main(int argc, char *argv[]) #endif /* Try to notify inet that we are present (again) */ - r = findproc("inet", &tasknr); + r = _pm_findproc("inet", &tasknr); if (r == OK) notify(tasknr); diff --git a/drivers/lance/lance.c b/drivers/lance/lance.c index 15909cb78..8f8ee9977 100644 --- a/drivers/lance/lance.c +++ b/drivers/lance/lance.c @@ -327,7 +327,7 @@ void main( int argc, char **argv ) eth_ign_proto= htons((u16_t) v); /* Try to notify inet that we are present (again) */ - r = findproc("inet", &tasknr); + r = _pm_findproc("inet", &tasknr); if (r == OK) notify(tasknr); diff --git a/drivers/rtl8139/rtl8139.c b/drivers/rtl8139/rtl8139.c index 456369b75..2d7c81e8a 100755 --- a/drivers/rtl8139/rtl8139.c +++ b/drivers/rtl8139/rtl8139.c @@ -303,7 +303,7 @@ int main(int argc, char *argv[]) * not yet alive. */ (progname=strrchr(argv[0],'/')) ? progname++ : (progname=argv[0]); - r = findproc("inet", &inet_proc_nr); + r = _pm_findproc("inet", &inet_proc_nr); if (r == OK) notify(inet_proc_nr); diff --git a/include/unistd.h b/include/unistd.h index d4a25d26b..2d50fcf98 100755 --- a/include/unistd.h +++ b/include/unistd.h @@ -180,7 +180,7 @@ _PROTOTYPE( int getsigset, (sigset_t *sigset) ); _PROTOTYPE( int getprocnr, (void) ); _PROTOTYPE( int getnprocnr, (pid_t pid) ); _PROTOTYPE( int getpprocnr, (void) ); -_PROTOTYPE( int findproc, (char *proc_name, int *proc_nr) ); +_PROTOTYPE( int _pm_findproc, (char *proc_name, int *proc_nr) ); _PROTOTYPE( int allocmem, (phys_bytes size, phys_bytes *base) ); _PROTOTYPE( int freemem, (phys_bytes size, phys_bytes base) ); #define DEV_MAP 1 diff --git a/lib/other/Makefile.in b/lib/other/Makefile.in index 2fbc0467b..e94157397 100644 --- a/lib/other/Makefile.in +++ b/lib/other/Makefile.in @@ -8,7 +8,7 @@ libc_FILES=" \ _allocmem.c \ _brk.c \ _devctl.c \ - _findproc.c \ + __pm_findproc.c \ _freemem.c \ _getnpid.c \ _getsigset.c \ diff --git a/lib/other/_findproc.c b/lib/other/__pm_findproc.c similarity index 82% rename from lib/other/_findproc.c rename to lib/other/__pm_findproc.c index c57189e9a..deaa26076 100644 --- a/lib/other/_findproc.c +++ b/lib/other/__pm_findproc.c @@ -1,10 +1,9 @@ #include -#define findproc _findproc +#define _pm_findproc __pm_findproc #include #include - -PUBLIC int findproc(proc_name, proc_nr) +PUBLIC int _pm_findproc(proc_name, proc_nr) char *proc_name; /* name of process to search for */ int *proc_nr; /* return process number here */ { diff --git a/lib/syscall/Makefile.in b/lib/syscall/Makefile.in index 932c6f5f9..c3b7490b1 100644 --- a/lib/syscall/Makefile.in +++ b/lib/syscall/Makefile.in @@ -4,6 +4,7 @@ LIBRARIES=libc libc_FILES=" \ _exit.s \ + _pm_findproc.s \ access.s \ alarm.s \ allocmem.s \ @@ -29,7 +30,6 @@ libc_FILES=" \ execve.s \ execvp.s \ fcntl.s \ - findproc.s \ fork.s \ fpathconf.s \ freemem.s \ diff --git a/lib/syscall/_pm_findproc.s b/lib/syscall/_pm_findproc.s new file mode 100644 index 000000000..93c4b3b78 --- /dev/null +++ b/lib/syscall/_pm_findproc.s @@ -0,0 +1,7 @@ +.sect .text +.extern ___pm_findproc +.define __pm_findproc +.align 2 + +__pm_findproc: + jmp ___pm_findproc diff --git a/lib/syscall/findproc.s b/lib/syscall/findproc.s deleted file mode 100644 index 806e4842d..000000000 --- a/lib/syscall/findproc.s +++ /dev/null @@ -1,7 +0,0 @@ -.sect .text -.extern __findproc -.define _findproc -.align 2 - -_findproc: - jmp __findproc diff --git a/lib/syslib/pci_init1.c b/lib/syslib/pci_init1.c index d46e4807b..443ca1a98 100644 --- a/lib/syslib/pci_init1.c +++ b/lib/syslib/pci_init1.c @@ -20,9 +20,9 @@ char *name; size_t len; message m; - r= findproc("pci", &pci_procnr); + r= _pm_findproc("pci", &pci_procnr); if (r != 0) - panic("pci", "pci_init1: findproc failed for 'pci'", r); + panic("pci", "pci_init1: _pm_findproc failed for 'pci'", r); m.m_type= BUSC_PCI_INIT; len= strlen(name); diff --git a/servers/inet/mnx_eth.c b/servers/inet/mnx_eth.c index 50dbb7de6..75a810e12 100644 --- a/servers/inet/mnx_eth.c +++ b/servers/inet/mnx_eth.c @@ -46,7 +46,7 @@ PUBLIC void osdep_eth_init() #ifdef __minix_vmd r= sys_findproc(ecp->ec_task, &tasknr, 0); #else /* Minix 3 */ - r = findproc(ecp->ec_task, &tasknr); + r = _pm_findproc(ecp->ec_task, &tasknr); #endif if (r != OK) {