From 54bca55ae5212002f8b5178f3d427cb4f54be233 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 14 Jun 2023 13:32:15 +0200 Subject: cooker: Fix up debugging messages for "return" Signed-off-by: Stefano Brivio --- operations.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'operations.c') diff --git a/operations.c b/operations.c index 70c8f08..bb995df 100644 --- a/operations.c +++ b/operations.c @@ -346,10 +346,12 @@ int op_return(const struct seccomp_notif *req, int notifier, struct gluten *g, } else { resp.id = req->id; resp.flags = 0; - resp.error = desc->error; if (gluten_read(&req->data, g, &resp.val, desc->val, sizeof(resp.val)) == -1) return -1; + if (gluten_read(&req->data, g, &resp.error, desc->error, + sizeof(resp.error)) == -1) + return -1; debug(" op_return: val=%ld errno=%d", resp.val, resp.error); } @@ -552,5 +554,6 @@ int eval(struct gluten *g, const struct seccomp_notif *req, ret_err(-1, "unknown operation %d", op->type); } } + return 0; } -- cgit v1.2.3