2019-06-07 06:49:03 -03:00
|
|
|
#include <Kernel/Syscall.h>
|
2018-11-16 10:11:21 -02:00
|
|
|
#include <errno.h>
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
|
|
|
|
|
int ioctl(int fd, unsigned request, ...)
|
|
|
|
|
{
|
|
|
|
|
va_list ap;
|
|
|
|
|
va_start(ap, request);
|
|
|
|
|
unsigned arg = va_arg(ap, unsigned);
|
2018-12-21 00:02:06 -02:00
|
|
|
int rc = syscall(SC_ioctl, fd, request, arg);
|
2018-11-16 10:11:21 -02:00
|
|
|
__RETURN_WITH_ERRNO(rc, rc, -1);
|
|
|
|
|
}
|
|
|
|
|
}
|