[PATCH 13/15] RFC: lib: Support a binary prefix 0y

Simon Glass sjg at chromium.org
Wed Jul 21 16:23:27 CEST 2021


Hi Wolfgang,

On Wed, 21 Jul 2021 at 02:27, Wolfgang Denk <wd at denx.de> wrote:
>
> Dear Simon,
>
> In message <20210720132940.1171011-14-sjg at chromium.org> you wrote:
> > In some cases it is useful to be able to supply a binary value to a
> > command. Use the '0y' prefix for this (binarY).
>
> We also don't handle octal input yet, and also miss a number of
> other interesting numberbases, like 42.
>
> But ... do we really *need* all this stuff?

No...

I added binary as an RFC because I have found a few cases where it is
nice to be able to specify the bits (e.g. programming GPIOs). We could
update 'md' to support it too.

I added octal as an RFC since the current impl is almost never
available (only when 0 is parted to simple_strtoul()) which seems odd.

>
> %% (signatures)
> Perfection is reached, not when there is no longer anything  to  add,
> but when there is no longer anything to take away.
>                                            - Antoine de Saint-Exupery

Well, yes. Perhaps we should just drop octal?

Regards,
Simon


More information about the U-Boot mailing list