summaryrefslogtreecommitdiff
path: root/src/linux/v9fs.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/linux/v9fs.zig')
-rw-r--r--src/linux/v9fs.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/linux/v9fs.zig b/src/linux/v9fs.zig
index 5e031bfe..0d1e2e33 100644
--- a/src/linux/v9fs.zig
+++ b/src/linux/v9fs.zig
@@ -64,11 +64,11 @@ pub fn helperPath(buf: []u8) ![:0]u8 {
const path = if (std.c.getenv("PARDES_V9FS_HELPER")) |env| blk: {
const override = std.mem.span(env);
if (!std.fs.path.isAbsolute(override)) return error.AbsoluteHelperPathRequired;
- break :blk try std.fmt.bufPrintZ(buf, "{s}", .{override});
+ break :blk try std.fmt.bufPrintSentinel(buf, "{s}", .{override}, 0);
} else blk: {
var own: [4096]u8 = undefined;
const parent = std.fs.path.dirname(try selfPath(&own)) orelse return error.ExecutablePathUnavailable;
- break :blk try std.fmt.bufPrintZ(buf, "{s}/{s}", .{ parent, executable });
+ break :blk try std.fmt.bufPrintSentinel(buf, "{s}/{s}", .{ parent, executable }, 0);
};
if (std.c.access(path.ptr, 1) != 0) return error.V9fsHelperNotFound;
return path;
@@ -89,7 +89,7 @@ var sudo_pid: std.atomic.Value(c_int) = .init(-1);
fn forwardSignal(sig: std.posix.SIG) callconv(.c) void {
const pid = sudo_pid.load(.monotonic);
- if (pid > 0) _ = kill(pid, @intCast(@intFromEnum(sig)));
+ if (pid > 0) _ = kill(pid, @intCast(@backingInt(sig)));
}
fn launch(arena: std.mem.Allocator, args: []const [:0]const u8) !u8 {
@@ -123,8 +123,8 @@ fn launch(arena: std.mem.Allocator, args: []const [:0]const u8) !u8 {
const default: std.posix.Sigaction = .{ .handler = .{ .handler = std.posix.SIG.DFL }, .mask = std.posix.sigemptyset(), .flags = 0 };
var sig: u8 = 1;
while (sig < 65) : (sig += 1) {
- if (sig == @intFromEnum(std.posix.SIG.KILL) or sig == @intFromEnum(std.posix.SIG.STOP)) continue;
- _ = std.c.sigaction(@enumFromInt(sig), &default, null);
+ if (sig == @backingInt(std.posix.SIG.KILL) or sig == @backingInt(std.posix.SIG.STOP)) continue;
+ _ = std.c.sigaction(@fromBackingInt(@intCast(sig)), &default, null);
}
const none = std.posix.sigemptyset();
std.posix.sigprocmask(std.posix.SIG.SETMASK, &none, null);