Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2012-03-30 Thread Gerlando Falauto
On 03/29/2012 10:19 PM, Marek Vasut wrote: Dear Gerlando Falauto, WD prodded me too long to review this patchset ;-D Well, better late than never! ;-) [...] +#if defined(CONFIG_CMD_NET) + else if (strcmp(name, bootfile) == 0) { + copy_filename(BootFile, newval,

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2012-03-30 Thread Marek Vasut
Dear Gerlando Falauto, On 03/29/2012 10:19 PM, Marek Vasut wrote: Dear Gerlando Falauto, WD prodded me too long to review this patchset ;-D Well, better late than never! ;-) [...] +#if defined(CONFIG_CMD_NET) + else if (strcmp(name, bootfile) == 0) { +

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2012-03-30 Thread Gerlando Falauto
On 03/30/2012 03:08 PM, Marek Vasut wrote: Dear Gerlando Falauto, On 03/29/2012 10:19 PM, Marek Vasut wrote: Dear Gerlando Falauto, WD prodded me too long to review this patchset ;-D Well, better late than never! ;-) [...] +#if defined(CONFIG_CMD_NET) + else if (strcmp(name,

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2012-03-30 Thread Marek Vasut
Dear Gerlando Falauto, On 03/30/2012 03:08 PM, Marek Vasut wrote: Dear Gerlando Falauto, On 03/29/2012 10:19 PM, Marek Vasut wrote: Dear Gerlando Falauto, WD prodded me too long to review this patchset ;-D Well, better late than never! ;-) [...] +#if

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2012-03-30 Thread Gerlando Falauto
On 03/30/2012 03:55 PM, Marek Vasut wrote: Dear Gerlando Falauto, On 03/30/2012 03:08 PM, Marek Vasut wrote: Dear Gerlando Falauto, On 03/29/2012 10:19 PM, Marek Vasut wrote: [...] + return 0; + } +#endif + return 0; +} + [...] --- a/include/search.h +++

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2012-03-30 Thread Marek Vasut
Dear Gerlando Falauto, On 03/30/2012 03:55 PM, Marek Vasut wrote: Dear Gerlando Falauto, On 03/30/2012 03:08 PM, Marek Vasut wrote: Dear Gerlando Falauto, On 03/29/2012 10:19 PM, Marek Vasut wrote: [...] + return 0; + } +#endif + return 0; +} +

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2012-03-30 Thread Gerlando Falauto
On 03/30/2012 03:00 PM, Gerlando Falauto wrote: On 03/29/2012 10:19 PM, Marek Vasut wrote: [...] +#if defined(CONFIG_CMD_NET) + else if (strcmp(name, bootfile) == 0) { + copy_filename(BootFile, newval, sizeof(BootFile)); Can you remove the camel-case here please? That's code I just moved

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2012-03-29 Thread Marek Vasut
Dear Gerlando Falauto, WD prodded me too long to review this patchset ;-D The logic of checking special parameters (e.g. baudrate, stdin, stdout, for a valid value and/or whether can be overwritten) and applying the new value to the running system is now all within a single function

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2011-12-12 Thread Gerlando Falauto
On 12/07/2011 11:02 PM, Simon Glass wrote: [...] /* - * Set a new environment variable, - * or replace or delete an existing one. + * Performs consistency checking before setting, replacing, + * or deleting an environment variable, then (if successful) + * apply the changes to internals so to

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2011-12-12 Thread Wolfgang Denk
Dear Gerlando Falauto, In message 4ee5ca38.6090...@keymile.com you wrote: if (process_var(name, nvars, vars) hdelete_r(name, htab) == 0) debug(DELETE ERROR ##\n); This is incorrect indentation. I think it's easier to read it the original

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2011-12-12 Thread Gerlando Falauto
On 12/12/2011 01:18 PM, Wolfgang Denk wrote: Dear Gerlando Falauto, I think it's easier to read it the original way, and it should not make any difference as far as code size is concerned. The Coding Style makes an explicit exception regarding the line length for user visible strings: 83

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2011-12-12 Thread Wolfgang Denk
Dear Gerlando Falauto, In message 4ee603d0.5010...@keymile.com you wrote: I don't understand: why are you quoting this here and now? The chunk we are referring to doesn't change a bit about the printable string. Please use proper indentation for it, even if it exceeds the line length then -

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2011-12-12 Thread Simon Glass
Hi Gerlando, On Mon, Dec 12, 2011 at 1:32 AM, Gerlando Falauto gerlando.fala...@keymile.com wrote: On 12/07/2011 11:02 PM, Simon Glass wrote: [...]  /* - * Set a new environment variable, - * or replace or delete an existing one. + * Performs consistency checking before setting,

[U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2011-12-07 Thread Gerlando Falauto
The logic of checking special parameters (e.g. baudrate, stdin, stdout, for a valid value and/or whether can be overwritten) and applying the new value to the running system is now all within a single function env_check_apply() which can be called whenever changes are made to the environment, no

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2011-12-07 Thread Simon Glass
Hi, On Wed, Dec 7, 2011 at 5:30 AM, Gerlando Falauto gerlando.fala...@keymile.com wrote: The logic of checking special parameters (e.g. baudrate, stdin, stdout, for a valid value and/or whether can be overwritten) and applying the new value to the running system is now all within a single

Re: [U-Boot] [PATCH v2 1/3] env: unify logic to check and apply changes

2011-12-07 Thread Mike Frysinger
On Wednesday 07 December 2011 17:02:06 Simon Glass wrote: Also, for me this patch adds 500 bytes. I wonder if more of the code could made optional? yeah, it seems like these new params are only used when CONFIG_CMD_DEFAULTENV_VARS is defined. which means for most people i think, this is