From b22a7c266eac25818ca9f9714d96fce9a366f18c Mon Sep 17 00:00:00 2001 From: hw_llm Date: Wed, 21 Aug 2024 20:57:40 +0800 Subject: [PATCH] =?UTF-8?q?Description:=20console=20read=20=E6=BC=8F?= =?UTF-8?q?=E6=B4=9E=E4=BF=AE=E5=A4=8D=20IssueNo:=20https://gitee.com/open?= =?UTF-8?q?harmony/kernel=5Fliteos=5Fa/issues/IALLNX=3Ffrom=3Dproject-issu?= =?UTF-8?q?e=20Feature=20Or=20Bugfix:=20Feature=20Binary=20Source:=20No=20?= =?UTF-8?q?Signed-off-by:=20hw=5Fllm=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/common/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/common/console.c b/kernel/common/console.c index bfaa4c59..624a0775 100644 --- a/kernel/common/console.c +++ b/kernel/common/console.c @@ -687,7 +687,7 @@ STATIC ssize_t ConsoleRead(struct file *filep, CHAR *buffer, size_t bufLen) } if (userBuf) { - if (LOS_ArchCopyToUser(buffer, sbuffer, bufLen) != 0) { + if (LOS_ArchCopyToUser(buffer, sbuffer, ret) != 0) { ret = -EFAULT; goto ERROUT; }