Hi,

On 04/30/2011 10:25 AM, Wolfgang Denk wrote:
> Dear Valentin Longchamp,
> 
> In message 
> <30d7413306aba80ca4540c3353d884bdffe9a643.1302272395.git.valentin.longch...@keymile.com>
>  you wrote:
>> From: Holger Brunck <holger.bru...@keymile.com>
>>
>> Read out board id and HW key from the IVM eeprom and set
>> these values as an environment variable was now done inside the
>> code as a command.
> 
> This begs to ask: and how has it been done so far?  Should this patch
> not remove some old code, then?
> 

Yes it does, we did it previously in the default environment. But this was an
out of tree patch so far. Maybe I should adapt the commit message.

>> +{
>> +    unsigned char buf[32];
>> +    char *p;
>> +
>> +    p = get_local_var("IVM_BoardId");
>> +    sprintf((char *)buf, "%s", p);
>> +    setenv("boardid", (char *)buf);
>> +    p = get_local_var("IVM_HWKey");
>> +    sprintf((char *)buf, "%s", p);
>> +    setenv("hwkey", (char *)buf);
> 
> get_local_var() will return NULL in some cases. Error handling
> missing.
> 

Ok.

>> +    return 0;
> 
> As is, the return 0 makes no sense, but I guess this will change when
> you add error handling.
>

Yes.

Thanks.

Best regards
Holger Brunck
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to