Update returned error return when not a character device.

Co-Authored-By: Andrew Kelley <andrew@ziglang.org>
This commit is contained in:
Euan T 2019-08-03 07:50:30 +01:00 committed by GitHub
parent 24fbd1f1d5
commit 8e157ccb23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;