commit 8e157ccb23885b2a9a8a5d66c3955fc560fd0074 (tree)
parent 24fbd1f1d58125f34ca2ae52a592028f39412aa9
Author: Euan T <euantorano@users.noreply.github.com>
Date: Sat, 3 Aug 2019 07:50:30 +0100
Update returned error return when not a character device.
Co-Authored-By: Andrew Kelley <andrew@ziglang.org>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/std/os.zig b/std/os.zig
@@ -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;