Kernel: Create /dev/urandom -> /dev/random symlink

Most software uses urandom instead of random so this allows it work
normally.
This commit is contained in:
Bananymous 2024-12-03 16:08:05 +02:00
parent 713daf6cd3
commit 67e9ca56ac
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,10 @@ namespace Kernel
s_instance->add_device(MUST(ZeroDevice::create(0666, 0, 0)));
s_instance->add_device(MUST(KeyboardDevice::create(0440, 0, 901)));
s_instance->add_device(MUST(MouseDevice::create(0440, 0, 901)));
// create symlink urandom -> random
auto urandom = MUST(TmpSymlinkInode::create_new(DevFileSystem::get(), 0777, 0, 0, "random"_sv));
s_instance->add_inode("urandom"_sv, urandom);
}
DevFileSystem& DevFileSystem::get()