From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Fri, 04 Oct 2013 16:30:28 -0600 Subject: [U-Boot] [PATCH] cmd_nvedit.c: setenv_hex must prefix hex with '0x' In-Reply-To: <20131004221230.92156380A3C@gemini.denx.de> References: <1380901758-30360-1-git-send-email-trini@ti.com> <20131004213519.75C4E38040E@gemini.denx.de> <524F376C.7070703@wwwdotorg.org> <20131004221230.92156380A3C@gemini.denx.de> Message-ID: <524F4184.4020305@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/04/2013 04:12 PM, Wolfgang Denk wrote: > Dear Stephen, > > In message <524F376C.7070703@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.