From 232d69befb47a8a5fdb2f93e5030560efc9a7d07 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sat, 25 Jul 2020 20:04:19 +0200 Subject: [PATCH] mescc: Mes C Library: Add ioctl for M2-Planet. * lib/m2/ioctl.c: New file. --- lib/m2/ioctl.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lib/m2/ioctl.c diff --git a/lib/m2/ioctl.c b/lib/m2/ioctl.c new file mode 100644 index 00000000..35654531 --- /dev/null +++ b/lib/m2/ioctl.c @@ -0,0 +1,34 @@ +/* -*-comment-start: "//";comment-end:""-*- + * GNU Mes --- Maxwell Equations of Software + * Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * + * This file is part of GNU Mes. + * + * GNU Mes is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * GNU Mes is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Mes. If not, see . + */ + +#include +#include +#include +#include + +int +ioctl (int filedes, long command, int data) +{ + long long_filedes = filedes; + long long_command = command; + long long_data = data; + int r = _sys_call3 (SYS_ioctl, long_filedes, long_command, long_data); + return r; +}