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

Jonathan A. Kollasch jakllsch at kollasch.net
Tue Jul 20 17:00:13 CEST 2021


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


More information about the U-Boot mailing list