[U-Boot-Users] [patch] setenv(...) can delete environmental variables

Jeff Mann MannJ at embeddedplanet.com
Fri Apr 20 05:32:19 CEST 2007


>Umm, correct me if I'm wrong, but doesn't 'setenv foo' with no
argument already delete an environment var called foo?

No. It creates (or modifies) the environmental variable and gives it the value located at memory location zero (since that would be interpreted as a pointer to a char array at 0x0000000). To erase it, do_setenv needs to be called with two arguments, not three (see that difference in the patch?). 

-Jeff Mann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070419/ecfc0969/attachment.htm 


More information about the U-Boot mailing list