aboutsummaryrefslogtreecommitdiff
path: root/src/link/MappedFile.zig
diff options
context:
space:
mode:
authorrpkak <rpkak@users.noreply.github.com>2025-11-14 23:16:55 +0100
committerAndrew Kelley <andrew@ziglang.org>2025-11-20 15:03:23 -0800
commit6b4f45f782fb9c8906d3fcbfca9e21fc3771c2dd (patch)
treeee11cca9b35e72958e2dc66576b4cb8e4a82d6f5 /src/link/MappedFile.zig
parent4b5351bc0ddc248d6935d7d160a57cb4dfe4dedd (diff)
downloadzig-6b4f45f782fb9c8906d3fcbfca9e21fc3771c2dd.tar.gz
zig-6b4f45f782fb9c8906d3fcbfca9e21fc3771c2dd.zip
system specific errno
Diffstat (limited to 'src/link/MappedFile.zig')
-rw-r--r--src/link/MappedFile.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/link/MappedFile.zig b/src/link/MappedFile.zig
index f0294df350..09d940e85f 100644
--- a/src/link/MappedFile.zig
+++ b/src/link/MappedFile.zig
@@ -645,7 +645,7 @@ fn resizeNode(mf: *MappedFile, gpa: std.mem.Allocator, ni: Node.Index, requested
@intCast(requested_size +| requested_size / growth_factor),
) - old_size;
_, const file_size = Node.Index.root.location(mf).resolve(mf);
- while (true) switch (linux.E.init(switch (std.math.order(range_file_offset, file_size)) {
+ while (true) switch (linux.errno(switch (std.math.order(range_file_offset, file_size)) {
.lt => linux.fallocate(
mf.file.handle,
linux.FALLOC.FL_INSERT_RANGE,
@@ -858,7 +858,7 @@ fn moveRange(mf: *MappedFile, old_file_offset: u64, new_file_offset: u64, size:
// delete the copy of this node at the old location
if (is_linux and !mf.flags.fallocate_punch_hole_unsupported and
size >= mf.flags.block_size.toByteUnits() * 2 - 1) while (true)
- switch (linux.E.init(linux.fallocate(
+ switch (linux.errno(linux.fallocate(
mf.file.handle,
linux.FALLOC.FL_PUNCH_HOLE | linux.FALLOC.FL_KEEP_SIZE,
@intCast(old_file_offset),
@@ -910,7 +910,7 @@ fn copyFileRange(
@intCast(remaining_size),
0,
);
- switch (linux.E.init(copy_len)) {
+ switch (linux.errno(copy_len)) {
.SUCCESS => {
if (copy_len == 0) break;
remaining_size -= copy_len;