Skip to content

Commit

Permalink
rpmsgfs: fix ioctl operation can not work bug
Browse files Browse the repository at this point in the history
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
  • Loading branch information
CV-Bowen authored and xiaoxiang781216 committed Aug 16, 2022
1 parent a362c2c commit 0b95148
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/rpmsgfs/rpmsgfs_client.c
Expand Up @@ -176,7 +176,7 @@ static int rpmsgfs_ioctl_handler(FAR struct rpmsg_endpoint *ept,

if (cookie->result >= 0 && rsp->arglen > 0)
{
memcpy(cookie->data, (FAR void *)(uintptr_t)rsp->arg, rsp->arglen);
memcpy(cookie->data, (FAR void *)(uintptr_t)rsp->buf, rsp->arglen);
}

rpmsg_post(ept, &cookie->sem);
Expand Down
2 changes: 1 addition & 1 deletion fs/rpmsgfs/rpmsgfs_server.c
Expand Up @@ -480,7 +480,7 @@ static int rpmsgfs_ioctl_handler(FAR struct rpmsg_endpoint *ept,
}

msg->header.result = ret;
return rpmsg_send(ept, msg, sizeof(*msg));
return rpmsg_send(ept, msg, len);
}

static int rpmsgfs_sync_handler(FAR struct rpmsg_endpoint *ept,
Expand Down

0 comments on commit 0b95148

Please sign in to comment.