diff options
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/sys/device.h | 1 | ||||
-rw-r--r-- | sys/include/sys/syscall.h | 1 | ||||
-rw-r--r-- | sys/include/sys/system.h | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/sys/include/sys/device.h b/sys/include/sys/device.h index a3ce983..9851ee2 100644 --- a/sys/include/sys/device.h +++ b/sys/include/sys/device.h @@ -41,6 +41,7 @@ struct device { size_t blocksize; int(*write)(struct device *dev, struct sio_txn *sio); int(*read)(struct device *dev, struct sio_txn *sio); + int(*ioctl)(struct device *dev, uint32_t cmd, uintptr_t arg); paddr_t(*mmap)(struct device *dev, off_t off, vm_prot_t prot); TAILQ_ENTRY(device) link; }; diff --git a/sys/include/sys/syscall.h b/sys/include/sys/syscall.h index 59b6036..0f5abf0 100644 --- a/sys/include/sys/syscall.h +++ b/sys/include/sys/syscall.h @@ -45,6 +45,7 @@ enum { SYS_lseek, SYS_mmap, SYS_munmap, + SYS_ioctl, __MAX_SYSCALLS }; diff --git a/sys/include/sys/system.h b/sys/include/sys/system.h index c2e47c2..03ac710 100644 --- a/sys/include/sys/system.h +++ b/sys/include/sys/system.h @@ -31,11 +31,13 @@ #define _SYS_SYSTEM_H_ #include <sys/types.h> +#include <sys/syscall.h> #if defined(_KERNEL) int copyin(uintptr_t uaddr, void *kaddr, size_t len); int copyout(const void *kaddr, uintptr_t uaddr, size_t len); int copyinstr(uintptr_t uaddr, char *kaddr, size_t len); +uint64_t sys_ioctl(struct syscall_args *args); #endif #endif /* !_SYS_SYSTEM_H_ */ |