[U-Boot] [PATCH] cmd_nvedit.c: setenv_hex must prefix hex with '0x'
Stephen Warren
swarren at wwwdotorg.org
Sat Oct 5 00:30:28 CEST 2013
On 10/04/2013 04:12 PM, Wolfgang Denk wrote:
> Dear Stephen,
>
> In message <524F376C.7070703 at wwwdotorg.org> you wrote:
>>
>>> I think we should NAK your patch, and suggest to fix the problem by
>>> reverting commit 3f83c87 and making "load" default to hex input mode.
>>
>> Reverting 3f83c87 would do the opposite of what you want; it'd make
>> extload/fatload require 0x prefixes instead of assuming hex. Perhaps
>> what you want is a tweak to that patch so that the generic load/ls
>> commands always expect a hex value, rather than requiring the 0x prefix?
>
> Well, that should be the result, yes.
>
> You mean the extload/fatload commands have been broken before that?
> OK, eventually the bug was introduced before that. BUt in any case
> it's a bug, and should be fixed.
extload/fatload were broken between the following two commits:
3f83c87 fs: fix number base behaviour change in fatload/ext*load
...
045fa1e fs: add filesystem switch libary, implement ls and fsload commands
(i.e. for about 50 commits)
The generic load command has been "broken" (by design...) since it was
introduced. I suppose you can change the behaviour if you want; anyone
writing "0x..." for their values presumably won't be affected, and if
people really do assume all values in U-Boot are in hex, presumably
nobody currently relies upon using non-prefixed values with the generic
load command, since it doesn't work like that right now.
More information about the U-Boot
mailing list