diff --git a/lib/std/os.zig b/lib/std/os.zig index 24b438a53e65aaa8ee25cef90796a2f8f778c8b1..59f2a2173f279dfb23f2c6ee11bff28b29ce8318 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -6251,7 +6251,7 @@ pub const CopyFileRangeError = error{ NoSpaceLeft, Unseekable, PermissionDenied, - FileBusy, + SwapFile, } || PReadError || PWriteError || UnexpectedError; var has_copy_file_range_syscall = std.atomic.Atomic(bool).init(true); @@ -6305,7 +6305,7 @@ pub fn copy_file_range(fd_in: fd_t, off_in: u64, fd_out: fd_t, off_out: u64, len .NOSPC => return error.NoSpaceLeft, .OVERFLOW => return error.Unseekable, .PERM => return error.PermissionDenied, - .TXTBSY => return error.FileBusy, + .TXTBSY => return error.SwapFile, // these may not be regular files, try fallback .INVAL => {}, // support for cross-filesystem copy added in Linux 5.3, use fallback diff --git a/src/link.zig b/src/link.zig index b46ea51013b7957684bf8d9d8e650dbac0d2fce9..60c6b24640e0f592cc441a7870f263535d56c338 100644 --- a/src/link.zig +++ b/src/link.zig @@ -426,7 +426,7 @@ pub const File = struct { NoSpaceLeft, Unseekable, PermissionDenied, - FileBusy, + SwapFile, SystemResources, OperationAborted, BrokenPipe,