syscalls: ioctl

This commit is contained in:
Matheus
2022-09-29 17:40:59 -03:00
parent b8d2d302fa
commit 91a1781ecb
6 changed files with 54 additions and 1 deletions
+9
View File
@@ -95,6 +95,15 @@ int vfs_isatty(vnode_t* node){
}
int vfs_ioctl(vnode_t* node, unsigned long request, void* arg, int* result){
if(GETTYPE(node->st.st_mode) != TYPE_CHARDEV)
return ENOTTY;
return devman_ioctl(node->st.st_rdev, request, arg, result);
}
int vfs_read(int* error, vnode_t* node, void* buff, size_t count, size_t offset){
int type = GETTYPE(node->st.st_mode);