Re: [PATCH 014/171] lib: Add a Kconfig for SPL_ERRNO_STR

Simon Glass
2023-01-31T14:18:44Z

Hi Heinrich,

On Mon, 30 Jan 2023 at 07:57, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 1/30/23 15:40, Simon Glass wrote:
> > This is implicitly used in the source and seems useful, so add it.
>
> Do not use the same commit message for all patches.
>
> Clearly describe how you plan to use this and put this patch in a series
> where you actually use the new CONFIG option

It is actually used today. To see that, you only need to grep for use
this with CONFIG_IS_ENABLDE().

Of course it is never actually enabled, but that doesn't mean we can drop it.

The reason this works today is that CONFIG_IS_ENABLED() looks for
Kconfig options which are not actually in Kconfig. That is what I am
trying to change, since it is incompatible with separating out the
builds.

>
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > lib/Kconfig | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/lib/Kconfig b/lib/Kconfig
> > index 549bd357785..999ae99bf68 100644
> > --- a/lib/Kconfig
> > +++ b/lib/Kconfig
> > @@ -782,6 +782,10 @@ config ERRNO_STR
> > - if errno is null or positive number - a pointer to "Success" message
> > - if errno is negative - a pointer to errno related message
> >
> > +config SPL_ERRNO_STR
> > + def_bool n # Enable function for getting errno-related string message (SPL)
> > + depends on SPL
> > +
> > config HEXDUMP
> > bool "Enable hexdump"
> > help
>