| author | |
| committer | |
| log | ca012e5b69b9ff275c6e366c0348219d1c816f18 |
| tree | 8a82fa41a2709de3377beb853988b8abc8c3f7de |
| parent | 6976a5da19bf45f315eba2a0047977c6e659b2b3 |
4 files changed, 8 insertions(+), 0 deletions(-)
lib/compiler/fmt.zig+1| ... | ... | @@ -185,6 +185,7 @@ const FmtError = error{ |
| 185 | 185 | BrokenPipe, |
| 186 | 186 | Unexpected, |
| 187 | 187 | WouldBlock, |
| 188 | Canceled, | |
| 188 | 189 | FileClosed, |
| 189 | 190 | DestinationAddressRequired, |
| 190 | 191 | DiskQuota, |
lib/std/posix.zig+5| ... | ... | @@ -791,6 +791,10 @@ pub const ReadError = error{ |
| 791 | 791 | /// and reading from the file descriptor would block. |
| 792 | 792 | WouldBlock, |
| 793 | 793 | |
| 794 | /// reading a timerfd with CANCEL_ON_SET will lead to this error | |
| 795 | /// when the clock goes through a discontinuous change | |
| 796 | Canceled, | |
| 797 | ||
| 794 | 798 | /// In WASI, this error occurs when the file descriptor does |
| 795 | 799 | /// not hold the required rights to read from it. |
| 796 | 800 | AccessDenied, |
| ... | ... | @@ -851,6 +855,7 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize { |
| 851 | 855 | .INVAL => unreachable, |
| 852 | 856 | .FAULT => unreachable, |
| 853 | 857 | .AGAIN => return error.WouldBlock, |
| 858 | .CANCELED => return error.Canceled, | |
| 854 | 859 | .BADF => return error.NotOpenForReading, // Can be a race condition. |
| 855 | 860 | .IO => return error.InputOutput, |
| 856 | 861 | .ISDIR => return error.IsDir, |
lib/std/zig/system.zig+1| ... | ... | @@ -1141,6 +1141,7 @@ fn preadAtLeast(file: fs.File, buf: []u8, offset: u64, min_read_len: usize) !usi |
| 1141 | 1141 | const len = file.pread(buf[i..], offset + i) catch |err| switch (err) { |
| 1142 | 1142 | error.OperationAborted => unreachable, // Windows-only |
| 1143 | 1143 | error.WouldBlock => unreachable, // Did not request blocking mode |
| 1144 | error.Canceled => unreachable, // timerfd is unseekable | |
| 1144 | 1145 | error.NotOpenForReading => unreachable, |
| 1145 | 1146 | error.SystemResources => return error.SystemResources, |
| 1146 | 1147 | error.IsDir => return error.UnableToReadElfFile, |
src/link.zig+1| ... | ... | @@ -350,6 +350,7 @@ pub const File = struct { |
| 350 | 350 | SocketNotConnected, |
| 351 | 351 | NotOpenForReading, |
| 352 | 352 | WouldBlock, |
| 353 | Canceled, | |
| 353 | 354 | AccessDenied, |
| 354 | 355 | Unexpected, |
| 355 | 356 | DiskQuota, |