Re: [U-Boot] [RFC 1/3] tools/env: Default to the config specified in FW_CONFIG_FILE

2010-12-04 Thread Steve Sakoman
On Sat, 2010-12-04 at 05:34 -0500, Mike Frysinger wrote: > On Friday, December 03, 2010 23:28:51 Steve Sakoman wrote: > > + if (!config_file || !strlen(config_file)) { > > strlen is a bad bad idea. if you only want to see if it's non-empty, check > the first byte. I'll correct this in the nex

Re: [U-Boot] [RFC 1/3] tools/env: Default to the config specified in FW_CONFIG_FILE

2010-12-04 Thread Steve Sakoman
On Sat, 2010-12-04 at 11:59 +0100, Stefano Babic wrote: > On 12/04/2010 05:28 AM, Steve Sakoman wrote: > > From: Loïc Minier > > > > Hi, > > > #if defined(CONFIG_FILE) > > + /* Default to the config file specified in FW_CONFIG_FILE */ > > + char *config_file = getenv("FW_CONFIG_FILE"); >

Re: [U-Boot] [RFC 1/3] tools/env: Default to the config specified in FW_CONFIG_FILE

2010-12-04 Thread Stefano Babic
On 12/04/2010 05:28 AM, Steve Sakoman wrote: > From: Loïc Minier > Hi, > #if defined(CONFIG_FILE) > + /* Default to the config file specified in FW_CONFIG_FILE */ > + char *config_file = getenv("FW_CONFIG_FILE"); What about to pass the configuration file on the command line instead of

Re: [U-Boot] [RFC 1/3] tools/env: Default to the config specified in FW_CONFIG_FILE

2010-12-04 Thread Mike Frysinger
On Friday, December 03, 2010 23:28:51 Steve Sakoman wrote: > + if (!config_file || !strlen(config_file)) { strlen is a bad bad idea. if you only want to see if it's non-empty, check the first byte. -mike signature.asc Description: This is a digitally signed message part. __

[U-Boot] [RFC 1/3] tools/env: Default to the config specified in FW_CONFIG_FILE

2010-12-03 Thread Steve Sakoman
From: Loïc Minier This patch allows one to override the default location of the config file by setting FW_CONFIG_FILE environment variable. Signed-off-by: Loïc Minier Tested-by: Steve Sakoman --- tools/env/fw_env.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git