Something went wrong. Try again.
Cider Isn't Darwin Emulation, Really
Something went wrong. Try again.
123456789101112131415161718192021222324252627#include "ioctl.h"#include "../base.h"#include "../../../../../platform-include/sys/errno.h"#include <stddef.h>#include <stdbool.h>#include "termios.h"#include "filio.h"#include "termios.h"#include "socket.h"
#define IOCTL_STEP(x) { int state, retval; state = (x); \ if (state == IOCTL_HANDLED) return retval; }
// Emulated ioctl implementationlong sys_ioctl(int fd, int cmd, void* arg){ IOCTL_STEP(handle_filio(fd, cmd, arg, &retval)); IOCTL_STEP(handle_socket(fd, cmd, arg, &retval)); IOCTL_STEP(handle_termios(fd, cmd, arg, &retval)); run_ioctl: return __real_ioctl(fd, cmd, arg);}