Fix compile errors in stage2
parent
ea6525797d
commit
733f1c25bd
|
@ -357,6 +357,7 @@ pub const ChildProcess = struct {
|
||||||
error.NoSpaceLeft => unreachable,
|
error.NoSpaceLeft => unreachable,
|
||||||
error.FileTooBig => unreachable,
|
error.FileTooBig => unreachable,
|
||||||
error.DeviceBusy => unreachable,
|
error.DeviceBusy => unreachable,
|
||||||
|
error.FileLocksNotSupported => unreachable,
|
||||||
else => |e| return e,
|
else => |e| return e,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -843,6 +843,7 @@ pub const Dir = struct {
|
||||||
error.IsDir => unreachable, // we're providing O_DIRECTORY
|
error.IsDir => unreachable, // we're providing O_DIRECTORY
|
||||||
error.NoSpaceLeft => unreachable, // not providing O_CREAT
|
error.NoSpaceLeft => unreachable, // not providing O_CREAT
|
||||||
error.PathAlreadyExists => unreachable, // not providing O_CREAT
|
error.PathAlreadyExists => unreachable, // not providing O_CREAT
|
||||||
|
error.FileLocksNotSupported => unreachable, // locking folders is not supported
|
||||||
else => |e| return e,
|
else => |e| return e,
|
||||||
};
|
};
|
||||||
return Dir{ .fd = fd };
|
return Dir{ .fd = fd };
|
||||||
|
|
|
@ -819,26 +819,34 @@ pub const OpenError = error{
|
||||||
SystemFdQuotaExceeded,
|
SystemFdQuotaExceeded,
|
||||||
NoDevice,
|
NoDevice,
|
||||||
FileNotFound,
|
FileNotFound,
|
||||||
|
|
||||||
/// The path exceeded `MAX_PATH_BYTES` bytes.
|
/// The path exceeded `MAX_PATH_BYTES` bytes.
|
||||||
NameTooLong,
|
NameTooLong,
|
||||||
|
|
||||||
/// Insufficient kernel memory was available, or
|
/// Insufficient kernel memory was available, or
|
||||||
/// the named file is a FIFO and per-user hard limit on
|
/// the named file is a FIFO and per-user hard limit on
|
||||||
/// memory allocation for pipes has been reached.
|
/// memory allocation for pipes has been reached.
|
||||||
SystemResources,
|
SystemResources,
|
||||||
|
|
||||||
/// The file is too large to be opened. This error is unreachable
|
/// The file is too large to be opened. This error is unreachable
|
||||||
/// for 64-bit targets, as well as when opening directories.
|
/// for 64-bit targets, as well as when opening directories.
|
||||||
FileTooBig,
|
FileTooBig,
|
||||||
|
|
||||||
/// The path refers to directory but the `O_DIRECTORY` flag was not provided.
|
/// The path refers to directory but the `O_DIRECTORY` flag was not provided.
|
||||||
IsDir,
|
IsDir,
|
||||||
|
|
||||||
/// A new path cannot be created because the device has no room for the new file.
|
/// A new path cannot be created because the device has no room for the new file.
|
||||||
/// This error is only reachable when the `O_CREAT` flag is provided.
|
/// This error is only reachable when the `O_CREAT` flag is provided.
|
||||||
NoSpaceLeft,
|
NoSpaceLeft,
|
||||||
|
|
||||||
/// A component used as a directory in the path was not, in fact, a directory, or
|
/// A component used as a directory in the path was not, in fact, a directory, or
|
||||||
/// `O_DIRECTORY` was specified and the path was not a directory.
|
/// `O_DIRECTORY` was specified and the path was not a directory.
|
||||||
NotDir,
|
NotDir,
|
||||||
|
|
||||||
/// The path already exists and the `O_CREAT` and `O_EXCL` flags were provided.
|
/// The path already exists and the `O_CREAT` and `O_EXCL` flags were provided.
|
||||||
PathAlreadyExists,
|
PathAlreadyExists,
|
||||||
DeviceBusy,
|
DeviceBusy,
|
||||||
|
|
||||||
/// The underlying filesystem does not support file locks
|
/// The underlying filesystem does not support file locks
|
||||||
FileLocksNotSupported,
|
FileLocksNotSupported,
|
||||||
} || UnexpectedError;
|
} || UnexpectedError;
|
||||||
|
|
|
@ -468,9 +468,8 @@ pub const NativeTargetInfo = struct {
|
||||||
error.InvalidUtf8 => unreachable,
|
error.InvalidUtf8 => unreachable,
|
||||||
error.BadPathName => unreachable,
|
error.BadPathName => unreachable,
|
||||||
error.PipeBusy => unreachable,
|
error.PipeBusy => unreachable,
|
||||||
error.PermissionDenied => unreachable,
|
error.FileLocksNotSupported => unreachable,
|
||||||
error.FileBusy => unreachable,
|
error.WouldBlock => unreachable,
|
||||||
error.Locked => unreachable,
|
|
||||||
|
|
||||||
error.IsDir,
|
error.IsDir,
|
||||||
error.NotDir,
|
error.NotDir,
|
||||||
|
|
|
@ -115,7 +115,6 @@ const Error = extern enum {
|
||||||
InvalidOperatingSystemVersion,
|
InvalidOperatingSystemVersion,
|
||||||
UnknownClangOption,
|
UnknownClangOption,
|
||||||
NestedResponseFile,
|
NestedResponseFile,
|
||||||
PermissionDenied,
|
|
||||||
FileBusy,
|
FileBusy,
|
||||||
Locked,
|
Locked,
|
||||||
};
|
};
|
||||||
|
@ -849,9 +848,7 @@ export fn stage2_libc_parse(stage1_libc: *Stage2LibCInstallation, libc_file_z: [
|
||||||
error.NoDevice => return .NoDevice,
|
error.NoDevice => return .NoDevice,
|
||||||
error.NotDir => return .NotDir,
|
error.NotDir => return .NotDir,
|
||||||
error.DeviceBusy => return .DeviceBusy,
|
error.DeviceBusy => return .DeviceBusy,
|
||||||
error.PermissionDenied => return .PermissionDenied,
|
error.FileLocksNotSupported => unreachable,
|
||||||
error.FileBusy => return .FileBusy,
|
|
||||||
error.Locked => return .Locked,
|
|
||||||
};
|
};
|
||||||
stage1_libc.initFromStage2(libc);
|
stage1_libc.initFromStage2(libc);
|
||||||
return .None;
|
return .None;
|
||||||
|
|
|
@ -85,7 +85,6 @@ const char *err_str(Error err) {
|
||||||
case ErrorInvalidOperatingSystemVersion: return "invalid operating system version";
|
case ErrorInvalidOperatingSystemVersion: return "invalid operating system version";
|
||||||
case ErrorUnknownClangOption: return "unknown Clang option";
|
case ErrorUnknownClangOption: return "unknown Clang option";
|
||||||
case ErrorNestedResponseFile: return "nested response file";
|
case ErrorNestedResponseFile: return "nested response file";
|
||||||
case ErrorPermissionDenied: return "permission is denied";
|
|
||||||
case ErrorFileBusy: return "file is busy";
|
case ErrorFileBusy: return "file is busy";
|
||||||
case ErrorLocked: return "file is locked by another process";
|
case ErrorLocked: return "file is locked by another process";
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,6 @@ enum Error {
|
||||||
ErrorInvalidOperatingSystemVersion,
|
ErrorInvalidOperatingSystemVersion,
|
||||||
ErrorUnknownClangOption,
|
ErrorUnknownClangOption,
|
||||||
ErrorNestedResponseFile,
|
ErrorNestedResponseFile,
|
||||||
ErrorPermissionDenied,
|
|
||||||
ErrorFileBusy,
|
ErrorFileBusy,
|
||||||
ErrorLocked,
|
ErrorLocked,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue