This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: Fix for CONFIG_STRING option in RedBoot
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Xavier Debreuil <xavier dot debreuil at inventel dot fr>
- Cc: Andrew Lunn <andrew dot lunn at ascom dot ch>,eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 19 Aug 2003 06:37:41 -0600
- Subject: Re: Fix for CONFIG_STRING option in RedBoot
- Organization: MLB Associates
- References: <5.2.0.9.0.20030731085700.00b35460@172.16.0.2> <5.2.0.9.0.20030731085700.00b35460@172.16.0.2> <5.2.0.9.0.20030818101709.00b4d008@172.16.0.2>
On Mon, 2003-08-18 at 02:26, Xavier Debreuil wrote:
> The default value config_option_any_string.dflt is initialised to 0.
> Then the :
> case CONFIG_STRING:
> memcpy(dp, (void *)opt->dflt, config_length(CONFIG_STRING));
> does a memory fault.
>
> The patch I proposed is wrong indeed.
> The solution is to set a default value to the STRING option :
>
> RedBoot_config_option("Any string",
> any_string,
> ALWAYS_ENABLED, true,
> CONFIG_STRING,
> "default_string"
> );
>
> or to check if value of opt->dflt is a valid ram or rom address.
>
Would you mind filing a bug in our database for this, please?
That way, we can track it and make sure that it gets fixed.
Just visit http://bugs.ecos.sourceware.org/
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates