commit 284ab0ad86310df45ecc3887cb6ed2f8cf507e45 (tree)
parent 333724ff777a96c31416e7a64c7584c9ca3f54c5
Author: Siddharth Sinha <sid@scixor.com>
Date: Sun, 5 Apr 2026 20:18:39 +0530
std.Io.Uring: handle ReadOnlyFileSystem in dirOpenDir and dirRealPathFile
f4eecf8d7d added ROFS handling to openat but missed these two read-only
callers, breaking compilation of any Io.Evented program.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/std/Io/Uring.zig b/lib/std/Io/Uring.zig
@@ -2739,6 +2739,7 @@ fn dirOpenDir(
error.FileBusy => return errnoBug(.TXTBSY),
error.PathAlreadyExists => return errnoBug(.EXIST), // Not creating.
error.OperationUnsupported => return errnoBug(.OPNOTSUPP), // No TMPFILE, no locks.
+ error.ReadOnlyFileSystem => return errnoBug(.ROFS), // Not creating.
else => |e| return e,
},
};
@@ -3164,6 +3165,7 @@ fn dirRealPathFile(
}, 0) catch |err| switch (err) {
error.WouldBlock => return errnoBug(.AGAIN),
error.OperationUnsupported => return errnoBug(.OPNOTSUPP), // Not asking for locks.
+ error.ReadOnlyFileSystem => return errnoBug(.ROFS), // Not creating.
else => |e| return e,
};
defer ev.closeAsync(fd);