1
0
Fork 0
forked from nuttx/nuttx-update

rpmsgblk: correct args of read operations

Signed-off-by: liaoao <liaoao@xiaomi.com>
This commit is contained in:
liaoao 2023-07-20 17:11:35 +08:00 committed by Xiang Xiao
parent bc0af1e531
commit 9ef19af5bb

View file

@ -200,7 +200,7 @@ static int rpmsgblk_read_handler(FAR struct rpmsg_endpoint *ept,
}
ret = server->bops->read(server->blknode, (unsigned char *)rsp->buf,
msg->startsector, msg->nsectors);
msg->startsector, nsectors);
rsp->header.result = ret;
rpmsg_send_nocopy(ept, rsp, (ret < 0 ? 0 : ret * msg->sectorsize) +
sizeof(*rsp) - 1);