[PATCH] disk: part: change from hextoul to dectoul

Tom Rini trini at konsulko.com
Fri Jun 17 14:27:04 CEST 2022


On Fri, Jun 17, 2022 at 07:01:59PM +0900, Jaehoon Chung wrote:

> When 'ls' command is running with partition number, it's passed by a hex
> value. For example, if want to check a 15th partition, it has to input
> as 0xf.
> Before applied
> - ls mmc 0:f
> After applied
> - ls mmc 0:15
> 
> The using decimal number is more readable than passed by a hex value.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung at samsung.com>

NAK.  I agree it's a more obvious way of interacting.  But the CLI is
our API with our users and there's lots of stuff out there today that
knows (and then deals with) needing to pass hex not decimal for
partitions.  And given SoCs that have large numbers of partitions, you
can't assume that "12" isn't in intentional and referring to partition
18 in decimal.

We could maybe do this with a flag or environment variable to allow
people to opt-in, since that would at least allow for multi-platform
scripts to know what to expect and not have to guess / hard-code per
platform.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220617/279cba6b/attachment.sig>


More information about the U-Boot mailing list