| ... | @@ -3151,3 +3151,9 @@ pub fn readlinkat(dirfd: c_int, noalias path: [*:0]const u8, noalias buf: []u8) | ... | @@ -3151,3 +3151,9 @@ pub fn readlinkat(dirfd: c_int, noalias path: [*:0]const u8, noalias buf: []u8) |
| 3151 | std.debug.assert(rc >= 0); | 3151 | std.debug.assert(rc >= 0); |
| 3152 | return buf[0..@intCast(rc) :0]; | 3152 | return buf[0..@intCast(rc) :0]; |
| 3153 | } | 3153 | } |
| | 3154 | pub fn write(fd: c_int, buf: []const u8) !usize { |
| | 3155 | const rc = libc.write(fd, buf.ptr, buf.len); |
| | 3156 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| | 3157 | std.debug.assert(rc >= 0); |
| | 3158 | return @intCast(rc); |
| | 3159 | } |