Update returned error return when not a character device.
Co-Authored-By: Andrew Kelley <andrew@ziglang.org>
This commit is contained in:
parent
24fbd1f1d5
commit
8e157ccb23
|
@ -135,7 +135,7 @@ fn getRandomBytesDevURandom(buf: []u8) !void {
|
|||
|
||||
const st = try fstat(fd);
|
||||
if (!system.S_ISCHR(st.mode)) {
|
||||
return error.Unexpected;
|
||||
return error.NoDevice;
|
||||
}
|
||||
|
||||
const stream = &std.fs.File.openHandle(fd).inStream().stream;
|
||||
|
|
Loading…
Reference in New Issue
Block a user