diff options
author | Alice Frosi <afrosi@redhat.com> | 2023-02-21 13:15:16 +0100 |
---|---|---|
committer | Alice Frosi <afrosi@redhat.com> | 2023-02-21 13:28:09 +0100 |
commit | 6ad5dd9567d541ad9403354629f068fa37de32b9 (patch) | |
tree | 8f0bea26c6004cfcedbbf9e347aae7d8bb18b2d9 | |
parent | a9f04c33e5370755f36e9e85250c6ab997f94004 (diff) | |
download | seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar.gz seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar.bz2 seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar.lz seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar.xz seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.tar.zst seitan-6ad5dd9567d541ad9403354629f068fa37de32b9.zip |
actions: set error on act_call
-rw-r--r-- | actions.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -181,10 +181,23 @@ int do_actions(void *data, struct action actions[], unsigned int n_actions, int c.args = &actions[i].call; c.pid = pid; if (do_call(&c) == -1) { + resp.error = -1; + if (send_target(&resp, notifyfd) == -1) + return -1; + } + if (c.err != 0) { resp.error = c.err; if (send_target(&resp, notifyfd) == -1) return -1; } + /* + * The result of the call needs to be save as + * reference + */ + if (actions[i].call.has_ret) { + memcpy(data + actions[i].call.ret_off, + &c.ret, sizeof(c.ret)); + } break; case A_BLOCK: resp.id = id; |