From a7f83ff7c7052191abc77323e4b5f146583d3bd0 Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Thu, 26 Jan 2023 16:02:04 +0100 Subject: seitan: add return action The return action return a value to the target. Signed-off-by: Alice Frosi --- actions.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actions.c') diff --git a/actions.c b/actions.c index b1d3791..946d9fc 100644 --- a/actions.c +++ b/actions.c @@ -193,6 +193,14 @@ int do_actions(struct action actions[], unsigned int n_actions, int pid, if (send_target(&resp, notifyfd) == -1) return -1; break; + case A_RETURN: + resp.id = id; + resp.flags = 0; + resp.error = 0; + resp.val = actions[i].ret.value; + if (send_target(&resp, notifyfd) == -1) + return -1; + break; default: fprintf(stderr, "unknow action %d \n", actions[i].type); } -- cgit v1.2.3