make vfs & filesystems use failable copying
[minix3.git] / lib / libsys / getprocnr.c
blob2750aed30d912edc5b45856f358e482d748aee76
1 #include "syslib.h"
2 #include <unistd.h>
3 #include <string.h>
5 int
6 getprocnr(pid_t pid, endpoint_t *proc_e)
8 message m;
9 int r;
11 memset(&m, 0, sizeof(m));
12 m.PM_GETPROCNR_PID = pid;
14 if ((r = _taskcall(PM_PROC_NR, PM_GETPROCNR, &m)) < 0)
15 return r;
17 *proc_e = m.PM_GETPROCNR_ENDPT;
18 return r;