libutil: add O_NOCTTY back to old pty open code
[minix.git] / lib / libminlib / svrctl.c
blob6d4578c56c16a95b4914188ebf155b00257a797a
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 <sys/svrctl.h>
8 int svrctl(int request, void *argp)
10 message m;
12 m.m2_i1 = request;
13 m.m2_p1 = argp;
15 switch ((request >> 8) & 0xFF) {
16 case 'M':
17 case 'S':
18 /* PM handles calls for itself and the kernel. */
19 return _syscall(PM_PROC_NR, SVRCTL, &m);
20 case 'F':
21 case 'I':
22 /* VFS handles calls for itself and inet. */
23 return _syscall(VFS_PROC_NR, SVRCTL, &m);
24 default:
25 errno = EINVAL;
26 return -1;