Remove building with NOCRYPTO option
[minix3.git] / minix / kernel / arch / i386 / do_iopenable.c
blobdbb431b8555db327c9dd5ead611aa7e4dc6e3168
1 /* The system call implemented in this file:
2 * m_type: SYS_IOPENABLE
4 * The parameters for this system call are:
5 * m_lsys_krn_sys_iopenable.endpt (process to give I/O Protection Level bits)
7 * Author:
8 * Jorrit N. Herder <jnherder@cs.vu.nl>
9 */
11 #include "kernel/system.h"
12 #include <minix/endpoint.h>
14 #include "arch_proto.h"
16 /*===========================================================================*
17 * do_iopenable *
18 *===========================================================================*/
19 int do_iopenable(struct proc * caller, message * m_ptr)
21 int proc_nr;
23 #if 1 /* ENABLE_USERPRIV && ENABLE_USERIOPL */
24 if (m_ptr->m_lsys_krn_sys_iopenable.endpt == SELF) {
25 okendpt(caller->p_endpoint, &proc_nr);
26 } else if(!isokendpt(m_ptr->m_lsys_krn_sys_iopenable.endpt, &proc_nr))
27 return(EINVAL);
28 enable_iop(proc_addr(proc_nr));
29 return(OK);
30 #else
31 return(EPERM);
32 #endif