From 995adbae43c35d3e76365842679e10d6ece2d9b0 Mon Sep 17 00:00:00 2001 From: chao an Date: Wed, 22 Jan 2025 22:37:08 +0800 Subject: [PATCH 1/2] system/cu: remove canonical input mode from termios flag ASCII_DEL will unable to handle after below change: https://github.com/apache/nuttx/pull/14037 | commit df5c876932c4c82e8aee32adca651bb99d9d6200 | Author: zhangwenjian | Date: Thu May 23 13:13:48 2024 +0800 | | libc:getline support backspace | | Signed-off-by: zhangwenjian remove canonical input mode to support backspace in cu Signed-off-by: chao an --- system/cu/cu_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/cu/cu_main.c b/system/cu/cu_main.c index 2b8fabda181..a3a0f2d61e5 100644 --- a/system/cu/cu_main.c +++ b/system/cu/cu_main.c @@ -194,7 +194,7 @@ static int set_termios(FAR struct cu_globals_s *cu, int nocrlf) tio.c_iflag = 0; tio.c_oflag = 0; - tio.c_lflag &= ~ECHO; + tio.c_lflag &= ~(ECHO | ICANON); ret = tcsetattr(cu->stdfd, TCSANOW, &tio); if (ret) From 265b247b957c16aaab341af4ea32f139cf0b71ad Mon Sep 17 00:00:00 2001 From: chao an Date: Wed, 22 Jan 2025 22:46:36 +0800 Subject: [PATCH 2/2] system/cu: fix nxstyle error $ ../nuttx/tools/checkpatch.sh -g HEAD~1 apps/system/cu/cu_main.c:5:78: error: Long line found Signed-off-by: chao an --- system/cu/cu_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/cu/cu_main.c b/system/cu/cu_main.c index a3a0f2d61e5..20cd101b51b 100644 --- a/system/cu/cu_main.c +++ b/system/cu/cu_main.c @@ -2,7 +2,8 @@ * apps/system/cu/cu_main.c * * SPDX-License-Identifier: BSD-3-Clause - * SPDX-FileCopyrightText: 2014 sysmocom - s.f.m.c. GmbH. All rights reserved. + * SPDX-FileCopyrightText: + * 2014 sysmocom - s.f.m.c. GmbH. All rights reserved. * SPDX-FileContributor: Harald Welte * * Redistribution and use in source and binary forms, with or without