
In message 200802130921.38894.matthias.fuchs@esd-electronics.com you wrote:
what about a 'scrubenv' or 'cleanenv' command that tries to unset all variables leaving readonlys untouched.
Make this "clearenv", please.
The command could request a confirmation:
No.
=> scrubenv Do you really want to do this ('yes' or 'no')? yes
No. Such code will not go into U-Boot.
"UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things." - Doug Gwyn
Can't overwrite "serial#" Can't overwrite "ethaddr"
I would not print such messages, especially since you aren't overwriting these. If you want, print a similar warning as used by the "erase" command for protected flash sectors, i. e. something like:
=> cleanenv Warning: 5 protected variables will not be cleared =>
What do you think?
Looks good to me...
Best regards,
Wolfgang Denk