From f876e66e717c4dd853da12892048262afe47ffdf Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 19 Feb 2015 20:18:39 +0100 Subject: Add syscall for ioctl on open handle --- src/lib/include/syscall.h | 1 + src/lib/libkogata/syscall.c | 3 +++ 2 files changed, 4 insertions(+) (limited to 'src/lib') diff --git a/src/lib/include/syscall.h b/src/lib/include/syscall.h index 3d9fcd5..0f1efb0 100644 --- a/src/lib/include/syscall.h +++ b/src/lib/include/syscall.h @@ -33,6 +33,7 @@ size_t read(fd_t file, size_t offset, size_t len, char *buf); size_t write(fd_t file, size_t offset, size_t len, const char* buf); bool readdir(fd_t file, dirent_t *d); bool stat_open(fd_t file, stat_t *s); +int ioctl_open(fd_t file, int command, void* data); int get_mode(fd_t file); // more todo diff --git a/src/lib/libkogata/syscall.c b/src/lib/libkogata/syscall.c index 008a2a9..2e0ef0f 100644 --- a/src/lib/libkogata/syscall.c +++ b/src/lib/libkogata/syscall.c @@ -82,6 +82,9 @@ bool readdir(fd_t file, dirent_t *d) { bool stat_open(fd_t file, stat_t *s) { return call(SC_STAT_OPEN, file, (uint32_t)s, 0, 0, 0); } +int ioctl_open(fd_t file, int command, void* data) { + return call(SC_IOCTL_OPEN, file, command, (uint32_t)data, 0, 0); +} int get_mode(fd_t file) { return call(SC_GET_MODE, file, 0, 0, 0, 0); } -- cgit v1.2.3