no1wudi commented on code in PR #1559:
URL: https://github.com/apache/nuttx-apps/pull/1559#discussion_r1103727946


##########
system/readline/readline_fd.c:
##########
@@ -149,6 +156,13 @@ static void readline_write(FAR struct rl_common_s *vtbl,
   FAR struct readline_s *priv = (FAR struct readline_s *)vtbl;
   DEBUGASSERT(priv && buffer && buflen > 0);
 
+  /* If output fd is invalid, return directly. */
+
+  if (priv->outfd < 0)

Review Comment:
   In this patch we need to use readline() to replace fgets() but don't want to 
echo the input on console (like input password),
   so can pass a invalid outfd here to disable echo temporal.
   
   The echo of readline will be removed later with echo character in serial 
driver.



##########
system/readline/readline_fd.c:
##########
@@ -149,6 +156,13 @@ static void readline_write(FAR struct rl_common_s *vtbl,
   FAR struct readline_s *priv = (FAR struct readline_s *)vtbl;
   DEBUGASSERT(priv && buffer && buflen > 0);
 
+  /* If output fd is invalid, return directly. */
+
+  if (priv->outfd < 0)

Review Comment:
   In this patch we need to use readline() to replace fgets() but don't want to 
echo the input on console (like input password), so can pass a invalid outfd 
here to disable echo temporal.
   
   The echo of readline will be removed later with echo character in serial 
driver.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to