[PATCH v2] cmd: cat: add new command

Roger Knecht rknecht at pm.me
Thu Jun 9 22:27:35 CEST 2022



On Wednesday, June 8th, 2022 at 15:59, Tom Rini <trini at konsulko.com> wrote:
> 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!

Thanks for the review. Will be fixed in the next version.

Roger






More information about the U-Boot mailing list