Re: [PATCH 00/15] lib: Add support for a decimal 0m prefix for numbers

Jonathan A. Kollasch
2021-07-20T15:05:35Z

On Tue, Jul 20, 2021 at 07:29:24AM -0600, Simon Glass wrote:
> U-Boot mostly uses hex for value input, largely because addresses are much
> easier to understand in hex.
>
> But in some cases a hex value is requested, but it is more convenient to
> provide a decimal value. This may be because the value comes from another
> source, where its base cannot be controlled.
>
> This series adds support for a 0m prefix to indicate a decimal number. The
> letter 'm' is chosen because:
>
> - 'm' as in deciMal
> - cannot use a-f since they indicate a hex value (e.g. 0d would be
> ambiguous)
> - 'l' is harder to read since 1 and l look similar (0l123)
> - 't' (as in ten) seems a bit obscure

NetBSD ddb(4) uses 0t as a prefix for base 10.

Jonathan