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

Simon Glass
2021-07-21T14:23:47Z

Hi Wolfgang,

On Wed, 21 Jul 2021 at 02:27, Wolfgang Denk <wd@denx.de> wrote:
>
> Dear Simon,
>
> In message <20210720132940.1171011-14-sjg@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