Patchwork [U-Boot,1/2] fw_env: add redundand env support for MTD_ABSENT

login
register
mail settings
Submitter Oliver Metz
Date Aug. 27, 2013, 5:35 p.m.
Message ID <20130827173557.4C5C811C0ED4@dd12814.kasserver.com>
Download mbox | patch
Permalink /patch/270170/
State Not Applicable
Delegated to: Tom Rini
Headers show

Comments

Oliver Metz - Aug. 27, 2013, 5:35 p.m.
Robert P. J. Day schrieb am 26.08.2013 16:25:

> On Sun, 25 Aug 2013, Oliver Metz wrote:
> 
>> Signed-off-by: Oliver Metz <oliver@freetz.org>
>> ---
>>  tools/env/fw_env.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
>> index 44607b1..65be5f3 100644
>> --- a/tools/env/fw_env.c
>> +++ b/tools/env/fw_env.c
>> @@ -1136,6 +1136,9 @@ int fw_env_open(void)
>>  		} else if (DEVTYPE(dev_current) == MTD_UBIVOLUME &&
>>  			   DEVTYPE(!dev_current) == MTD_UBIVOLUME) {
>>  			environment.flag_scheme = FLAG_INCREMENTAL;
>> +		} else if (DEVTYPE(dev_current) == MTD_ABSENT &&
>> +			   DEVTYPE(!dev_current) == MTD_ABSENT) {
>> +			environment.flag_scheme = FLAG_INCREMENTAL;
>>  		} else {
>>  			fprintf (stderr, "Incompatible flash types!\n");
>>  			return -1;
> 
>  pedantically, it's "redundant", not "redundand". and it might be
> useful to add some commentary in the sample fw_env.config file that
> explains this new feature, as the patch is clearly not adding any
> documentation.
> 
> rday
> 
I will send a new version of the patches with the typo fixed.

But I'm unsure how to comment the changes in fw_env.config since redundant
env description is already in the comment at the top.

Is something like this enough?



--
Oliver
Luka Perkov - Aug. 27, 2013, 11:03 p.m.
Hi Oliver,

On Tue, Aug 27, 2013 at 07:35:57PM +0200, Oliver Metz wrote:
> But I'm unsure how to comment the changes in fw_env.config since redundant
> env description is already in the comment at the top.
> 
> Is something like this enough?
> 
> diff --git a/tools/env/fw_env.config b/tools/env/fw_env.config
> index 90e499d..fcaab55 100644
> --- a/tools/env/fw_env.config
> +++ b/tools/env/fw_env.config
> @@ -20,3 +20,4 @@
>  
>  # Block device example
>  #/dev/mmcblk0          0xc0000         0x20000
> +#/dev/mmcblk0          0xe0000         0x20000

I'd say it's unnecessary...

Luka

Patch

diff --git a/tools/env/fw_env.config b/tools/env/fw_env.config
index 90e499d..fcaab55 100644
--- a/tools/env/fw_env.config
+++ b/tools/env/fw_env.config
@@ -20,3 +20,4 @@ 
 
 # Block device example
 #/dev/mmcblk0          0xc0000         0x20000
+#/dev/mmcblk0          0xe0000         0x20000