summaryrefslogtreecommitdiff
path: root/core/exec.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/exec.zig')
-rw-r--r--core/exec.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/exec.zig b/core/exec.zig
index 1ec47eb3..74037db0 100644
--- a/core/exec.zig
+++ b/core/exec.zig
@@ -418,7 +418,7 @@ fn refusedPlacement(p: *Pardes, id: usize) bool {
/// Whether a shell would be started in `dir` and `dir` is not there: asked
/// only of a host that starts shells, and only of a local path.
pub fn missingDir(p: *Pardes, dir: []const u8) bool {
- if (p.host.vtable.spawn == null) return false;
+ if (!p.tape.has(p, .spawn)) return false;
// A peer's directory (`/n/peer/x`) is no directory on this host, where
// the shell would start: no command or terminal runs there, and none
// is made to say `exit 127`.
@@ -535,7 +535,7 @@ const repl_quiet_ns: u64 = 100 * std.time.ns_per_ms;
/// The host's clock now; core time (`now_ns`, `stepped_ns`) is as old as
/// the last frame, seconds in an idle session.
pub fn clockNow(p: *Pardes) u64 {
- return if (p.host.vtable.now) |clock| clock(p.host.ctx) else p.clock.now_ns;
+ return p.tape.host(p, .now, .{}) orelse p.clock.now_ns;
}
/// Sends the Enters a paste into pane `id`'s REPL is owed: when the REPL
@@ -1018,7 +1018,7 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Settings.Setting, arg: ?[
const spec = config.Settings.FontSpec.parse(arg orelse return) orelse return;
// The session's machine's fonts, a question to its disk: a
// client's replay takes the session's answer, never its own.
- const found = pardes.tape.site(.fonts, p.scratch.allocator(), fontNamed, .{ p.scratch.allocator(), spec.name });
+ const found = p.tape.site(.fonts, p.scratch.allocator(), fontNamed, .{ p.scratch.allocator(), spec.name });
const nul = std.mem.indexOfScalar(u8, found, 0) orelse return;
if (!p.settings.requestFont(found[0..nul], found[nul + 1 ..], spec.size_hundredths)) return;
p.font_request_taken = false;
@@ -1035,7 +1035,7 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Settings.Setting, arg: ?[
return p.setMessage(.at(v.active), said.print("Shell: the default again, {s} ($SHELL, else /bin/sh)", .{p.sessionShell()[0..@min(p.sessionShell().len, 256)]}));
}
var why: [320]u8 = undefined;
- if (pardes.tape.site(.shell, null, @import("dev").host_io.Shell.refusal, .{ want[0..@min(want.len, 200)], &why })) |refused| {
+ if (p.tape.site(.shell, null, @import("dev").host_io.Shell.refusal, .{ want[0..@min(want.len, 200)], &why })) |refused| {
var text: pardes.Kind.Buf(340) = .{};
return p.reportFailure(v.active, text.print("Shell: {s}", .{refused}));
}