[Toybox] FYI, devmem change

enh enh at google.com
Thu Nov 12 13:22:31 PST 2020


merged to AOSP today. i'll let you know if there's any feedback from
angry kernel types.

note that i am worried because "it never accepted hex addresses
before" isn't true:
```
long long atolx(char *numstr)
{
  char *c = numstr, *suffixes="cwbkmgtpe", *end;
  long long val;
  val = xstrtol(numstr, &c, 0);
```
it didn't accept _implicit_ hex, but did accept explicit hex or octal.
and like i said, all the existing use cases i can find [checked in]
are using hex addresses. (when would you even have a decimal address?)

at least the old output included 0x so it should be obvious for
ambiguous cases like "20" that something's changed.

On Sun, Nov 8, 2020 at 8:03 PM Rob Landley <rob at landley.net> wrote:
>
> Heads up, output of devmem is now decimal if you gave it a decimal address and
> hexadecimal if you gave it a 0xhecidecimal address. Meaning the default output
> type changed from hex to decimal, since it never accepted hex addresses before.
>
> (Also, it consistently says 0x for hex output, instead of not saying 0x at the
> front of zero output. I have no idea why the gnu/dammit # extension does that
> but it's creepy.)
>
> Possibly I should pad hex output to the number of bytes requested so it displays
> consistently. :)
>
> Rob



More information about the Toybox mailing list