kernel: report /dev/random and /dev/urandom as character devices (#1140)

kernel: report entropy sources as character devices

Co-authored-by: nmzik <Nmzik@mail.ru>
This commit is contained in:
Henrique Reis Neves
2026-10-07 20:35:58 -03:00
committed by GitHub
parent 34f6fd1f5f
commit de62664908
2 changed files with 17 additions and 10 deletions
+2 -10
View File
@@ -1138,19 +1138,11 @@ int KYTY_SYSV_ABI KernelFstat(int d, FileStat* sb) {
auto wt = at;
if (file->special != SpecialFile::None) {
stat.st_mode = 0020644u;
stat.st_size = 0;
stat.st_blksize = 512;
stat.st_blocks = 0;
SecToTimespec(&stat.st_atim, at.ToUnix());
SecToTimespec(&stat.st_mtim, wt.ToUnix());
stat.st_ctim = stat.st_atim;
stat.st_birthtim = stat.st_mtim;
*sb = stat;
return OK;
}
if (!file->directory) {
} else if (!file->directory) {
file->mutex.Lock();
bool is_invalid = file->f.IsInvalid();