Commit 8e157ccb23

Euan T <euantorano@users.noreply.github.com>
2019-08-03 08:50:30
Update returned error return when not a character device.
Co-Authored-By: Andrew Kelley <andrew@ziglang.org>
1 parent 24fbd1f
Changed files (1)
std
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;