Skip to content

Conversation

@yangsong8-a1
Copy link
Contributor

@yangsong8-a1 yangsong8-a1 commented Dec 9, 2025

Summary

fix switchboot command spelling error.
sh cle_fd returns EOF if there is no data be read.

Impact

when there is no data to be read. sh cle_fd returns EOF but not -EIO

Testing

When CONFIG_NSH_CLE is enabled, after the adb shell service is destroyed, sh detects nread as 0 when reading data, but instead of returning EOF, it returns -EIO, thus preventing sh from exiting.
target: sim and xiaomi product

modify swtichboot -> switchboot

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
xiaoxiang781216
xiaoxiang781216 previously approved these changes Dec 9, 2025
@xiaoxiang781216
Copy link
Contributor

@yangsong8-a1 fix:

../nuttx/tools/checkpatch.sh -c -u -m -g 641f7ced84fe7f2ec4b624296ffac1d714a68dd5..HEAD
Used config files:
    1: .codespellrc
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/cle/cle.c:375: postion ==> position
/home/runner/work/nuttx-apps/nuttx-apps/apps/system/cle/cle.c:381: retrun ==> return
Some checks failed. For contributing guidelines, see:
  https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md

linguini1
linguini1 previously approved these changes Dec 9, 2025
Copy link
Contributor

@linguini1 linguini1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be -EOF or is it expected to return a positive value everywhere?

@xiaoxiang781216
Copy link
Contributor

Should be -EOF or is it expected to return a positive value everywhere?

EOF is already negative number(-1).

simbit18
simbit18 previously approved these changes Dec 9, 2025
If enable CONFIG NSH_CLE. When sh reads data and detects that nread is 0,
return EOF and exit.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit f82e6c2 into apache:master Dec 10, 2025
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants