isatty syscall

This commit is contained in:
Matheus
2022-08-20 12:18:54 -03:00
parent fce640c0f9
commit b3b5981f7a
6 changed files with 62 additions and 1 deletions
+9
View File
@@ -78,6 +78,15 @@ int vfs_write(int* error, vnode_t* node, void* buff, size_t count, size_t offset
}
int vfs_isatty(vnode_t* node){
if(GETTYPE(node->st.st_mode) != TYPE_CHARDEV)
return ENOTTY;
return devman_isatty(node->st.st_rdev);
}
int vfs_read(int* error, vnode_t* node, void* buff, size_t count, size_t offset){
int type = GETTYPE(node->st.st_mode);