Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] nsh free is not present even if not disabled in the config. #13884

Open
1 task done
cederom opened this issue Oct 7, 2024 · 2 comments
Open
1 task done

[BUG] nsh free is not present even if not disabled in the config. #13884

cederom opened this issue Oct 7, 2024 · 2 comments
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: Applications Issues related to Applications Area: Configuring Configuring issues Area: Memory Management Memory Management issues OS: BSD Issues related to *BSD OSes (building system, etc)

Comments

@cederom
Copy link
Contributor

cederom commented Oct 7, 2024

Description / Steps to reproduce the issue

  1. Check the .config to contain # CONFIG_NSH_DISABLE_FREE is not set.
  2. Build and flash the firmware.
  3. See that free command is not present.
nsh> ?
help usage:  help [-v] [<cmd>]

    ?          exec       exit       help       hexdump    xd

On which OS does this issue occur?

[OS: BSD]

What is the version of your OS?

FreeBSD 13.3-RELEASE-p7 GENERIC amd64

NuttX Version

12.7.0-RC0

Issue Architecture

[Arch: arm]

Issue Area

[Area: Applications], [Area: Configuring], [Area: Memory Management]

Verification

  • I have verified before submitting the report.
@github-actions github-actions bot added Arch: arm Issues related to ARM (32-bit) architecture Area: Applications Issues related to Applications Area: Configuring Configuring issues Area: Memory Management Memory Management issues OS: BSD Issues related to *BSD OSes (building system, etc) labels Oct 7, 2024
@raiden00pl
Copy link
Member

CONFIG_FS_PROCFS=y must be set, otherwise free doesn't work:
https://github.com/apache/nuttx-apps/blob/c30583dda48a812f045961f88e0d751f06196b28/nshlib/nsh.h#L498-L501

This 'silent' disabling of commands in nsh.h can be really irritating and if someone doesn't know where to look, it can cause problems. But I don't know if there is a more user-friendly solution here, PROCFS must be supported for free.

@acassis
Copy link
Contributor

acassis commented Oct 8, 2024

@raiden00pl maybe we should put "depends on FS_PROCFS" there, but this solution it bad because it hides the option from users.

A clumsy workaround is creating a menu entry depending on !FS_PROCFS just to warn the user:

+menu "[ ] Disable free (please enable FS_PROCFS first)"
+       depends on !FS_PROCFS
+endmenu

But I think many people don't like this approach (it pollutes the Kconfig). In fact Kconfig has some limitations when we think about some user friendly interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: Applications Issues related to Applications Area: Configuring Configuring issues Area: Memory Management Memory Management issues OS: BSD Issues related to *BSD OSes (building system, etc)
Projects
None yet
Development

No branches or pull requests

3 participants