mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
Add FileLocksNotSupported error to OpenError
This commit is contained in:
parent
f757f0ea59
commit
e7cf3f92a9
@ -846,6 +846,9 @@ pub const OpenError = error{
|
||||
/// The path already exists and the `O_CREAT` and `O_EXCL` flags were provided.
|
||||
PathAlreadyExists,
|
||||
DeviceBusy,
|
||||
|
||||
/// The underlying filesystem does not support file locks
|
||||
FileLocksNotSupported
|
||||
} || UnexpectedError;
|
||||
|
||||
/// Open and possibly create a file. Keeps trying if it gets interrupted.
|
||||
@ -931,6 +934,7 @@ pub fn openatZ(dir_fd: fd_t, file_path: [*:0]const u8, flags: u32, mode: mode_t)
|
||||
EPERM => return error.AccessDenied,
|
||||
EEXIST => return error.PathAlreadyExists,
|
||||
EBUSY => return error.DeviceBusy,
|
||||
EOPNOTSUPP => return error.FileLocksNotSupported,
|
||||
else => |err| return unexpectedErrno(err),
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user