blob: 354d49e7b7de9a4772472c2733b3acbd5d0eb021 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <Kernel/Syscall.h>
extern "C" {
int ioctl(int fd, unsigned request, ...)
{
va_list ap;
va_start(ap, request);
unsigned arg = va_arg(ap, unsigned);
int rc = syscall(SC_ioctl, fd, request, arg);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
}
|