summaryrefslogtreecommitdiff
path: root/src/ninep/screen.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep/screen.zig')
-rw-r--r--src/ninep/screen.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ninep/screen.zig b/src/ninep/screen.zig
index 33a8717b..634ef640 100644
--- a/src/ninep/screen.zig
+++ b/src/ninep/screen.zig
@@ -70,12 +70,12 @@ pub fn readSnapshot(p: *Pardes, req: Req, pane: ?*Pane) Reply {
}
/// /listeners' text, a dial a line, in the step's scratch.
-pub fn listenersText(p: *Pardes) []const u8 {
+pub fn listenersText(p: *Pardes) std.Io.Writer.Error![]const u8 {
var text: std.Io.Writer.Allocating = .init(p.scratch.allocator());
- if (p.fs.socket_path.len != 0) text.writer.print("unix!{s}\n", .{p.fs.socket_path}) catch {};
+ if (p.fs.socket_path.len != 0) try text.writer.print("unix!{s}\n", .{p.fs.socket_path});
if (p.fs.tcp_address) |address| switch (address) {
- .ip4 => |ip| text.writer.print("tcp!{d}.{d}.{d}.{d}!{d}\n", .{ ip.bytes[0], ip.bytes[1], ip.bytes[2], ip.bytes[3], ip.port }) catch {},
- .ip6 => |ip| text.writer.print("tcp!{f}!{d}\n", .{ std.Io.net.Ip6Address.Unresolved{ .bytes = ip.bytes, .interface_name = null }, ip.port }) catch {},
+ .ip4 => |ip| try text.writer.print("tcp!{d}.{d}.{d}.{d}!{d}\n", .{ ip.bytes[0], ip.bytes[1], ip.bytes[2], ip.bytes[3], ip.port }),
+ .ip6 => |ip| try text.writer.print("tcp!{f}!{d}\n", .{ std.Io.net.Ip6Address.Unresolved{ .bytes = ip.bytes, .interface_name = null }, ip.port }),
};
return text.written();
}