devman and vfs: check if a function is not implemented before calling

This commit is contained in:
Matheus
2022-10-25 19:27:47 -03:00
parent 8ed219638b
commit 9dd308599b
8 changed files with 37 additions and 37 deletions
+1 -5
View File
@@ -13,17 +13,13 @@ static int write(int* error, int minor, void* buff, size_t count, size_t offset)
return count;
}
static int isatty(int minor){
return ENOTTY;
}
static int isseekable(int minor, size_t* max){
*max = ~(size_t)0;
return 0;
}
static devcalls calls = {
read, write, isatty, isseekable
read, write, NULL, isseekable
};
void zerodev_init(){