mirror of
https://github.com/ksherlock/marignotti.git
synced 2024-12-11 17:51:04 +00:00
29 lines
484 B
C
29 lines
484 B
C
#include "marignotti.h"
|
|
#include <gno/kerntool.h>
|
|
#include <errno.h>
|
|
|
|
#pragma noroot
|
|
#pragma optimize 79
|
|
|
|
|
|
int mshutdown(Entry *e, void *p1, void *p2, void *p3, void *p4, void *p5)
|
|
{
|
|
int how = *(int *)p1;
|
|
|
|
switch(how)
|
|
{
|
|
case 0: // shutrd
|
|
e->_SHUT_RD = 1;
|
|
break;
|
|
case 1:
|
|
e->_SHUT_WR = 1;
|
|
break;
|
|
case 2:
|
|
e->_SHUT_RD = 1;
|
|
e->_SHUT_WR = 1;
|
|
break;
|
|
default:
|
|
return EINVAL;
|
|
}
|
|
return 0;
|
|
} |