summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-aux/stack.c.gen18
-rw-r--r--cmd/sbc_harness/main.c6
2 files changed, 22 insertions, 2 deletions
diff --git a/build-aux/stack.c.gen b/build-aux/stack.c.gen
index e7a647a..2acce60 100755
--- a/build-aux/stack.c.gen
+++ b/build-aux/stack.c.gen
@@ -397,6 +397,23 @@ class PluginApplication:
# Application-specific code
+class AppPlugin:
+ def extra_nodes(self) -> typing.Collection[Node]:
+ return []
+
+ def indirect_callees(self, loc: str, line: str) -> tuple[list[str], bool] | None:
+ if "/3rd-party/" in loc:
+ return None
+ if "srv->auth" in line:
+ return [], False
+ if "srv->rootdir" in line:
+ return ["get_root"], False
+ return None
+
+ def skip_call(self, chain: list[str], call: str) -> bool:
+ return False
+
+
class LibObjPlugin:
objcalls: dict[str, set[str]] # method_name => {method_impls}
@@ -965,6 +982,7 @@ def main(
hooks_is_intrhandler += [sbc_is_intrhandler]
plugins += [
+ AppPlugin(),
LibObjPlugin(arg_c_fnames),
LibHWPlugin(),
LibCRIPCPlugin(),
diff --git a/cmd/sbc_harness/main.c b/cmd/sbc_harness/main.c
index 18a649e..6f1d0ca 100644
--- a/cmd/sbc_harness/main.c
+++ b/cmd/sbc_harness/main.c
@@ -138,8 +138,10 @@ static COROUTINE dhcp_cr(void *) {
static COROUTINE read9p_cr(void *) {
cr_begin();
- lib9p_srv_read_cr(&globals.srv,
- LO_CALL(lo_box_w5500_if_as_net_iface(&globals.dev_w5500), tcp_listen, CONFIG_9P_PORT));
+ lo_interface net_iface iface = lo_box_w5500_if_as_net_iface(&globals.dev_w5500);
+ lo_interface net_stream_listener listener = LO_CALL(iface, tcp_listen, CONFIG_9P_PORT);
+
+ lib9p_srv_read_cr(&globals.srv, listener);
cr_end();
}