. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / other / __pm_findproc.c
blobdeaa260762f4bffc6f7545b9611c48f779e12c49
1 #include <lib.h>
2 #define _pm_findproc __pm_findproc
3 #include <unistd.h>
4 #include <string.h>
6 PUBLIC int _pm_findproc(proc_name, proc_nr)
7 char *proc_name; /* name of process to search for */
8 int *proc_nr; /* return process number here */
10 message m;
12 m.m1_p1 = proc_name;
13 m.m1_i1 = -1; /* search by name */
14 m.m1_i2 = strlen(proc_name) + 1;
15 if (_syscall(MM, GETPROCNR, &m) < 0) return(-1);
16 *proc_nr = m.m1_i1;
17 return(0);