From e9ac1a2317d4e07679520522d3d87e1722c20f6c Mon Sep 17 00:00:00 2001 From: chenrun1 Date: Mon, 13 May 2024 20:24:28 +0800 Subject: [PATCH] rpmsgfs_client:Fix error return exception When handling errors through ioctl, the error returned by the server is always 0 on the client, because cookie.result is not assigned, the error returned should be in msg->result Signed-off-by: chenrun1 --- fs/rpmsgfs/rpmsgfs_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/rpmsgfs/rpmsgfs_client.c b/fs/rpmsgfs/rpmsgfs_client.c index cf47ea80bd2..df285ce40eb 100644 --- a/fs/rpmsgfs/rpmsgfs_client.c +++ b/fs/rpmsgfs/rpmsgfs_client.c @@ -174,6 +174,7 @@ static int rpmsgfs_ioctl_handler(FAR struct rpmsg_endpoint *ept, (FAR struct rpmsgfs_cookie_s *)(uintptr_t)header->cookie; FAR struct rpmsgfs_ioctl_s *rsp = data; + cookie->result = header->result; if (cookie->result >= 0 && rsp->arglen > 0) { memcpy(cookie->data, (FAR void *)(uintptr_t)rsp->buf, rsp->arglen);