20 Sep, 2018

2 commits

  • While 1kB or 1kiB will be parsed correctly, 1k will return the right
    amount, but the metric suffix will not be escaped once the char
    pointer updated. Fix this situation by simplifying the move of the
    endp pointer.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Stefan Roese

    Miquel Raynal
     
  • Both ustrtoul and ustrtoull interpret 1k but not 1m or 1g. Even if the
    SI symbols for Mega and Giga are 'M' and 'G', certain entries of
    eg. mtdparts also use (wrongly) the metric prefix 'm' and 'g'.

    I do not see how parsing lowercase prefixes could break anything, so
    parse them like their uppercase counterpart.

    Also, even though kiB is not equal to kB in general, lets not change
    U-Boot behavior and always use kiB and kB (same applies for MiB vs. MB
    and GiB vs. GB) as a representation for 1024 instead of 1000.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Stefan Roese

    Miquel Raynal
     

15 Sep, 2017

1 commit

  • The strto functions should honor the specified base (if non-zero) rather
    than permitting a hex or octal string when the user wanted (for example)
    base 10.

    This has been fixed somewhere along the way in the upstream linux kernel
    src tree, at some point after these was copied in to u-boot. And also
    in a way that duplicates less code. So port _parse_integer_fixup_radix()
    to u-boot.

    Signed-off-by: Rob Clark
    Reviewed-by: Simon Glass

    Rob Clark
     

11 Oct, 2016

1 commit


14 Dec, 2015

1 commit