etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libc / sys / svrctl.c
blob67649f853acbafeed390291faeed50273c0d0ef6
1 /* svrctl() - special server control functions. Author: Kees J. Bot
2 * 24 Apr 1994
3 */
4 #include <lib.h>
5 #include <stdio.h>
6 #include <string.h>
7 #include <sys/svrctl.h>
9 int svrctl(unsigned long request, void *argp)
11 message m;
13 memset(&m, 0, sizeof(m));
14 m.m_lc_svrctl.request = request;
15 m.m_lc_svrctl.arg = (vir_bytes)argp;
17 switch (IOCGROUP(request)) {
18 case 'M': /* old, phasing out */
19 case 'P': /* to PM */
20 return _syscall(PM_PROC_NR, PM_SVRCTL, &m);
21 case 'F': /* to VFS */
22 return _syscall(VFS_PROC_NR, VFS_SVRCTL, &m);
23 default:
24 errno = EINVAL;
25 return -1;