Add /dev/(u)random on NT (#1163)

This commit is contained in:
Gavin Hayes 2024-05-03 10:59:51 -04:00 committed by GitHub
parent 8f6bc9dabc
commit b6e40a3a58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 97 additions and 22 deletions

View file

@ -786,6 +786,10 @@ textwindows ssize_t ReadBuffer(int fd, void *data, size_t size, int64_t offset,
return 0;
}
if (f->kind == kFdDevRandom) {
return ProcessPrng(data, size) ? size : __winerr();
}
if (f->kind == kFdConsole) {
return ReadFromConsole(f, data, size, waitmask);
}