windows: match the same error code for EBADF

This commit is contained in:
Andrew Kelley
2020-08-19 20:51:06 -07:00
parent 59711becc7
commit 23c427b5fb
2 changed files with 1 additions and 4 deletions

View File

@@ -469,7 +469,7 @@ pub const WriteFileError = error{
SystemResources,
OperationAborted,
BrokenPipe,
InvalidFd,
NotOpenForWriting,
Unexpected,
};

View File

@@ -164,7 +164,6 @@ export fn stage2_render_ast(tree: *ast.Tree, output_file: *FILE) Error {
error.OutOfMemory => return .OutOfMemory,
error.Unexpected => return .Unexpected,
error.InputOutput => return .FileSystem,
error.InvalidFd => return .FileSystem,
};
return .None;
}
@@ -636,7 +635,6 @@ export fn stage2_libc_parse(stage1_libc: *Stage2LibCInstallation, libc_file_z: [
error.NotDir => return .NotDir,
error.DeviceBusy => return .DeviceBusy,
error.FileLocksNotSupported => unreachable,
error.InvalidFd => return .FileSystem,
};
stage1_libc.initFromStage2(libc);
return .None;
@@ -681,7 +679,6 @@ export fn stage2_libc_render(stage1_libc: *Stage2LibCInstallation, output_file:
error.AccessDenied => return .AccessDenied,
error.Unexpected => return .Unexpected,
error.InputOutput => return .FileSystem,
error.InvalidFd => return .FileSystem,
};
return .None;
}