| author | |
| committer | |
| log | 55e879d2eda0a73b73778923dd4bbc6904aa107c |
| tree | 56082547c86fdc20a6abcf1cc666821fda6958da |
| parent | 3cb1ab0e055320702a96398959e13761cb2bfc5a |
Closes #136315 files changed, 11 insertions(+), 1 deletions(-)
lib/std/os.zig+3| ... | ... | @@ -641,6 +641,9 @@ pub const ReadError = error{ |
| 641 | 641 | ConnectionTimedOut, |
| 642 | 642 | NotOpenForReading, |
| 643 | 643 | |
| 644 | // Windows only | |
| 645 | NetNameDeleted, | |
| 646 | ||
| 644 | 647 | /// This error occurs when no global event loop is configured, |
| 645 | 648 | /// and reading from the file descriptor would block. |
| 646 | 649 | WouldBlock, |
lib/std/os/windows.zig+5-1| ... | ... | @@ -435,8 +435,9 @@ pub fn FindClose(hFindFile: HANDLE) void { |
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | pub const ReadFileError = error{ |
| 438 | OperationAborted, | |
| 439 | 438 | BrokenPipe, |
| 439 | NetNameDeleted, | |
| 440 | OperationAborted, | |
| 440 | 441 | Unexpected, |
| 441 | 442 | }; |
| 442 | 443 | |
| ... | ... | @@ -475,6 +476,7 @@ pub fn ReadFile(in_hFile: HANDLE, buffer: []u8, offset: ?u64, io_mode: std.io.Mo |
| 475 | 476 | .IO_PENDING => unreachable, |
| 476 | 477 | .OPERATION_ABORTED => return error.OperationAborted, |
| 477 | 478 | .BROKEN_PIPE => return error.BrokenPipe, |
| 479 | .NETNAME_DELETED => return error.NetNameDeleted, | |
| 478 | 480 | .HANDLE_EOF => return @as(usize, bytes_transferred), |
| 479 | 481 | else => |err| return unexpectedError(err), |
| 480 | 482 | } |
| ... | ... | @@ -506,9 +508,11 @@ pub fn ReadFile(in_hFile: HANDLE, buffer: []u8, offset: ?u64, io_mode: std.io.Mo |
| 506 | 508 | } else null; |
| 507 | 509 | if (kernel32.ReadFile(in_hFile, buffer.ptr, want_read_count, &amt_read, overlapped) == 0) { |
| 508 | 510 | switch (kernel32.GetLastError()) { |
| 511 | .IO_PENDING => unreachable, | |
| 509 | 512 | .OPERATION_ABORTED => continue, |
| 510 | 513 | .BROKEN_PIPE => return 0, |
| 511 | 514 | .HANDLE_EOF => return 0, |
| 515 | .NETNAME_DELETED => return error.NetNameDeleted, | |
| 512 | 516 | else => |err| return unexpectedError(err), |
| 513 | 517 | } |
| 514 | 518 | } |
lib/std/zig/system/NativeTargetInfo.zig+1| ... | ... | @@ -917,6 +917,7 @@ fn preadMin(file: fs.File, buf: []u8, offset: u64, min_read_len: usize) !usize { |
| 917 | 917 | error.Unseekable => return error.UnableToReadElfFile, |
| 918 | 918 | error.ConnectionResetByPeer => return error.UnableToReadElfFile, |
| 919 | 919 | error.ConnectionTimedOut => return error.UnableToReadElfFile, |
| 920 | error.NetNameDeleted => return error.UnableToReadElfFile, | |
| 920 | 921 | error.Unexpected => return error.Unexpected, |
| 921 | 922 | error.InputOutput => return error.FileSystem, |
| 922 | 923 | error.AccessDenied => return error.Unexpected, |
src/link.zig+1| ... | ... | @@ -489,6 +489,7 @@ pub const File = struct { |
| 489 | 489 | NameTooLong, |
| 490 | 490 | CurrentWorkingDirectoryUnlinked, |
| 491 | 491 | LockViolation, |
| 492 | NetNameDeleted, | |
| 492 | 493 | }; |
| 493 | 494 | |
| 494 | 495 | /// Called from within the CodeGen to lower a local variable instantion as an unnamed |
src/main.zig+1| ... | ... | @@ -4482,6 +4482,7 @@ const FmtError = error{ |
| 4482 | 4482 | UnsupportedEncoding, |
| 4483 | 4483 | ConnectionResetByPeer, |
| 4484 | 4484 | LockViolation, |
| 4485 | NetNameDeleted, | |
| 4485 | 4486 | } || fs.File.OpenError; |
| 4486 | 4487 | |
| 4487 | 4488 | fn fmtPath(fmt: *Fmt, file_path: []const u8, check_mode: bool, dir: fs.Dir, sub_path: []const u8) FmtError!void { |