minix/kernel/system/do_iopenable.c
2005-09-30 12:54:59 +00:00

34 lines
805 B
C

/* The system call implemented in this file:
* m_type: SYS_IOPENABLE
*
* The parameters for this system call are:
* m2_i2: PROC_NR (process to give I/O Protection Level bits)
*
* Author:
* Jorrit N. Herder <jnherder@cs.vu.nl>
*/
#include "../kernel.h"
#include "../system.h"
/*===========================================================================*
* do_iopenable *
*===========================================================================*/
PUBLIC int do_iopenable(m_ptr)
register message *m_ptr; /* pointer to request message */
{
int proc_nr;
#if 1 /* ENABLE_USERPRIV && ENABLE_USERIOPL */
proc_nr= m_ptr->PROC_NR;
if (proc_nr == SELF)
proc_nr = m_ptr->m_source;
enable_iop(proc_addr(proc_nr));
return(OK);
#else
return(EPERM);
#endif
}