[PATCH v2] cmd: cat: add new command

Tom Rini trini at konsulko.com
Wed Jun 8 15:59:12 CEST 2022


On Sat, Jun 04, 2022 at 11:19:15AM +0000, Roger Knecht wrote:

> Add cat command to print file content to standard out
> 
> Signed-off-by: Roger Knecht <rknecht at pm.me>
> ---
> v2:
>  - Moved cat from boot to shell commands
>  - Added MAINTAINERS entry
>  - Added comments
>  - Improved variable naming
> 
>  MAINTAINERS  |  5 +++++
>  cmd/Kconfig  |  6 ++++++
>  cmd/Makefile |  1 +
>  cmd/cat.c    | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 70 insertions(+)
>  create mode 100644 cmd/cat.c
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 56be0bfad0..7c5cd178d9 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -729,6 +729,11 @@ M:	Simon Glass <sjg at chromium.org>
>  S:	Maintained
>  F:	tools/buildman/
> 
> +CAT
> +M:	Roger Knecht <rknecht at pm.me>
> +S:	Maintained
> +F:	cmd/cat.c
> +
>  CFI FLASH
>  M:	Stefan Roese <sr at denx.de>
>  S:	Maintained
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index 69c1814d24..8b531c7ebe 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -1492,6 +1492,12 @@ endmenu
> 
>  menu "Shell scripting commands"
> 
> +config CMD_CAT
> +	bool "cat"
> +	default y

New commands shouldn't be default enabled.  I also don't see a test.
Please add a test, and enable the command in sandbox so the test is run.
Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220608/58e14ecb/attachment.sig>


More information about the U-Boot mailing list