| author | |
| committer | |
| log | 733f1c25bd34270b76c5fa43928dfffda1ecd5e3 |
| tree | 97bffcd642dcd04cd66a20762004783eb03b437c |
| parent | ea6525797d0db83a8560179b317837cb58634049 |
7 files changed, 13 insertions(+), 9 deletions(-)
lib/std/child_process.zig+1| ... | ... | @@ -357,6 +357,7 @@ pub const ChildProcess = struct { |
| 357 | 357 | error.NoSpaceLeft => unreachable, |
| 358 | 358 | error.FileTooBig => unreachable, |
| 359 | 359 | error.DeviceBusy => unreachable, |
| 360 | error.FileLocksNotSupported => unreachable, | |
| 360 | 361 | else => |e| return e, |
| 361 | 362 | } |
| 362 | 363 | else |
lib/std/fs.zig+1| ... | ... | @@ -843,6 +843,7 @@ pub const Dir = struct { |
| 843 | 843 | error.IsDir => unreachable, // we're providing O_DIRECTORY |
| 844 | 844 | error.NoSpaceLeft => unreachable, // not providing O_CREAT |
| 845 | 845 | error.PathAlreadyExists => unreachable, // not providing O_CREAT |
| 846 | error.FileLocksNotSupported => unreachable, // locking folders is not supported | |
| 846 | 847 | else => |e| return e, |
| 847 | 848 | }; |
| 848 | 849 | return Dir{ .fd = fd }; |
lib/std/os.zig+8| ... | ... | @@ -819,26 +819,34 @@ pub const OpenError = error{ |
| 819 | 819 | SystemFdQuotaExceeded, |
| 820 | 820 | NoDevice, |
| 821 | 821 | FileNotFound, |
| 822 | ||
| 822 | 823 | /// The path exceeded `MAX_PATH_BYTES` bytes. |
| 823 | 824 | NameTooLong, |
| 825 | ||
| 824 | 826 | /// Insufficient kernel memory was available, or |
| 825 | 827 | /// the named file is a FIFO and per-user hard limit on |
| 826 | 828 | /// memory allocation for pipes has been reached. |
| 827 | 829 | SystemResources, |
| 830 | ||
| 828 | 831 | /// The file is too large to be opened. This error is unreachable |
| 829 | 832 | /// for 64-bit targets, as well as when opening directories. |
| 830 | 833 | FileTooBig, |
| 834 | ||
| 831 | 835 | /// The path refers to directory but the `O_DIRECTORY` flag was not provided. |
| 832 | 836 | IsDir, |
| 837 | ||
| 833 | 838 | /// A new path cannot be created because the device has no room for the new file. |
| 834 | 839 | /// This error is only reachable when the `O_CREAT` flag is provided. |
| 835 | 840 | NoSpaceLeft, |
| 841 | ||
| 836 | 842 | /// A component used as a directory in the path was not, in fact, a directory, or |
| 837 | 843 | /// `O_DIRECTORY` was specified and the path was not a directory. |
| 838 | 844 | NotDir, |
| 845 | ||
| 839 | 846 | /// The path already exists and the `O_CREAT` and `O_EXCL` flags were provided. |
| 840 | 847 | PathAlreadyExists, |
| 841 | 848 | DeviceBusy, |
| 849 | ||
| 842 | 850 | /// The underlying filesystem does not support file locks |
| 843 | 851 | FileLocksNotSupported, |
| 844 | 852 | } || UnexpectedError; |
lib/std/zig/system.zig+2-3| ... | ... | @@ -468,9 +468,8 @@ pub const NativeTargetInfo = struct { |
| 468 | 468 | error.InvalidUtf8 => unreachable, |
| 469 | 469 | error.BadPathName => unreachable, |
| 470 | 470 | error.PipeBusy => unreachable, |
| 471 | error.PermissionDenied => unreachable, | |
| 472 | error.FileBusy => unreachable, | |
| 473 | error.Locked => unreachable, | |
| 471 | error.FileLocksNotSupported => unreachable, | |
| 472 | error.WouldBlock => unreachable, | |
| 474 | 473 | |
| 475 | 474 | error.IsDir, |
| 476 | 475 | error.NotDir, |
src-self-hosted/stage2.zig+1-4| ... | ... | @@ -115,7 +115,6 @@ const Error = extern enum { |
| 115 | 115 | InvalidOperatingSystemVersion, |
| 116 | 116 | UnknownClangOption, |
| 117 | 117 | NestedResponseFile, |
| 118 | PermissionDenied, | |
| 119 | 118 | FileBusy, |
| 120 | 119 | Locked, |
| 121 | 120 | }; |
| ... | ... | @@ -849,9 +848,7 @@ export fn stage2_libc_parse(stage1_libc: *Stage2LibCInstallation, libc_file_z: [ |
| 849 | 848 | error.NoDevice => return .NoDevice, |
| 850 | 849 | error.NotDir => return .NotDir, |
| 851 | 850 | error.DeviceBusy => return .DeviceBusy, |
| 852 | error.PermissionDenied => return .PermissionDenied, | |
| 853 | error.FileBusy => return .FileBusy, | |
| 854 | error.Locked => return .Locked, | |
| 851 | error.FileLocksNotSupported => unreachable, | |
| 855 | 852 | }; |
| 856 | 853 | stage1_libc.initFromStage2(libc); |
| 857 | 854 | return .None; |
src/error.cpp-1| ... | ... | @@ -85,7 +85,6 @@ const char *err_str(Error err) { |
| 85 | 85 | case ErrorInvalidOperatingSystemVersion: return "invalid operating system version"; |
| 86 | 86 | case ErrorUnknownClangOption: return "unknown Clang option"; |
| 87 | 87 | case ErrorNestedResponseFile: return "nested response file"; |
| 88 | case ErrorPermissionDenied: return "permission is denied"; | |
| 89 | 88 | case ErrorFileBusy: return "file is busy"; |
| 90 | 89 | case ErrorLocked: return "file is locked by another process"; |
| 91 | 90 | } |
src/stage2.h-1| ... | ... | @@ -107,7 +107,6 @@ enum Error { |
| 107 | 107 | ErrorInvalidOperatingSystemVersion, |
| 108 | 108 | ErrorUnknownClangOption, |
| 109 | 109 | ErrorNestedResponseFile, |
| 110 | ErrorPermissionDenied, | |
| 111 | 110 | ErrorFileBusy, |
| 112 | 111 | ErrorLocked, |
| 113 | 112 | }; |