#include "Log.h" #include "fs/VFS.h" #include "memory/MemoryManager.h" #include "sys/Syscall.h" Result sys_mkdir(Registers*, SyscallArgs args) { auto path = TRY(MemoryManager::strdup_from_user(args[0])); mode_t mode = (mode_t)args[1]; kinfoln("mkdir: attempting to create %s", path.chars()); auto inode = TRY(VFS::create_directory(path.chars())); inode->chmod(mode); return 0; }