From fc00c656c96528112d05cf0edf8631bd5eaea446 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 7 Dec 2025 20:10:31 +0100 Subject: Add build system scaffolding and libc headers --- lib/libc/devctl/posix_devctl.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/libc/devctl/posix_devctl.c (limited to 'lib/libc/devctl') diff --git a/lib/libc/devctl/posix_devctl.c b/lib/libc/devctl/posix_devctl.c new file mode 100644 index 00000000..bc8e7331 --- /dev/null +++ b/lib/libc/devctl/posix_devctl.c @@ -0,0 +1,17 @@ +#include +#include +#include +#include + +int posix_devctl(int fildes, int dcmd, void *restrict dev_data_ptr, + size_t unused nbyte, int *restrict dev_info_ptr) +{ + long r; + + if ((r = syscall(ioctl, fildes, dcmd, dev_data_ptr)) < 0) + return errno; + + *dev_info_ptr = r; + + return 0; +} -- cgit v1.2.3