syscalls: mknodat

This commit is contained in:
Matheus
2024-08-11 14:44:53 -03:00
parent 40693d8ca0
commit b6ed9c1bac
5 changed files with 101 additions and 8 deletions
+21
View File
@@ -224,4 +224,25 @@ static inline mode_t vfs_getposixtype(int type) {
}
}
static inline mode_t vfs_getsystemtype(int type) {
switch (type) {
case TYPE_REGULAR:
return V_TYPE_REGULAR;
case TYPE_DIR:
return V_TYPE_DIR;
case TYPE_CHARDEV:
return V_TYPE_CHDEV;
case TYPE_BLOCKDEV:
return V_TYPE_BLKDEV;
case TYPE_FIFO:
return V_TYPE_FIFO;
case TYPE_LINK:
return V_TYPE_LINK;
case TYPE_SOCKET:
return V_TYPE_SOCKET;
default:
return -1;
}
}
#endif