Kernel: Remove SYS_OPEN

This can be done with SYS_OPENAT with fd set to AT_FDCWD
This commit is contained in:
2024-09-17 16:16:47 +03:00
parent 7177da7d62
commit 708a720d9d
6 changed files with 27 additions and 44 deletions

View File

@@ -68,7 +68,7 @@ static int s_random_fd;
void init_random()
{
s_random_fd = syscall(SYS_OPEN, "/dev/random", O_RDONLY);
s_random_fd = syscall(SYS_OPENAT, AT_FDCWD, "/dev/random", O_RDONLY);
if (s_random_fd < 0)
print_error_and_exit("could not open /dev/random", s_random_fd);
}