diff options
author | Alice Frosi <afrosi@redhat.com> | 2023-01-26 16:02:04 +0100 |
---|---|---|
committer | Alice Frosi <afrosi@redhat.com> | 2023-02-15 13:10:01 +0100 |
commit | a7f83ff7c7052191abc77323e4b5f146583d3bd0 (patch) | |
tree | 2ebd35ed823e08605fb7d3616c080a28b4796194 | |
parent | 6f915b4104313b62061a0aba085e92d2121bc17d (diff) | |
download | seitan-a7f83ff7c7052191abc77323e4b5f146583d3bd0.tar seitan-a7f83ff7c7052191abc77323e4b5f146583d3bd0.tar.gz seitan-a7f83ff7c7052191abc77323e4b5f146583d3bd0.tar.bz2 seitan-a7f83ff7c7052191abc77323e4b5f146583d3bd0.tar.lz seitan-a7f83ff7c7052191abc77323e4b5f146583d3bd0.tar.xz seitan-a7f83ff7c7052191abc77323e4b5f146583d3bd0.tar.zst seitan-a7f83ff7c7052191abc77323e4b5f146583d3bd0.zip |
seitan: add return action
The return action return a value to the target.
Signed-off-by: Alice Frosi <afrosi@redhat.com>
-rw-r--r-- | actions.c | 8 | ||||
-rw-r--r-- | gluten.h | 1 |
2 files changed, 9 insertions, 0 deletions
@@ -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); } @@ -49,6 +49,7 @@ enum action_type { A_CONT, A_INJECT, A_INJECT_A, + A_RETURN, }; struct act_call { |