source: trunk/minix/kernel/system/do_iopenable.c@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 844 bytes
Line 
1/* The system call implemented in this file:
2 * m_type: SYS_IOPENABLE
3 *
4 * The parameters for this system call are:
5 * m2_i2: IO_ENDPT (process to give I/O Protection Level bits)
6 *
7 * Author:
8 * Jorrit N. Herder <jnherder@cs.vu.nl>
9 */
10
11#include "../system.h"
12#include "../kernel.h"
13
14/*===========================================================================*
15 * do_iopenable *
16 *===========================================================================*/
17PUBLIC int do_iopenable(m_ptr)
18register message *m_ptr; /* pointer to request message */
19{
20 int proc_nr;
21
22#if 1 /* ENABLE_USERPRIV && ENABLE_USERIOPL */
23 if (m_ptr->IO_ENDPT == SELF) {
24 proc_nr = who_p;
25 } else if(!isokendpt(m_ptr->IO_ENDPT, &proc_nr))
26 return(EINVAL);
27 enable_iop(proc_addr(proc_nr));
28 return(OK);
29#else
30 return(EPERM);
31#endif
32}
33
34
Note: See TracBrowser for help on using the repository browser.