[U-Boot-Users] RFC: hidden environment variables

Timur Tabi timur at freescale.com
Tue Apr 24 01:19:28 CEST 2007


Wolfgang Denk wrote:

Obviously, at this point you're not going to allow support for hidden variables, so this 
discussion is academic.  With that in mind ...

> You don't  expose  two  user  interfaces.  Make  it  clear  from  the
> documentation  that  the  user is not supposed to manually chage this
> variable. 

I don't like the idea of an environment variable that the user can edit but shouldn't. 
Every times the user does 'print', it shows up.  "Look, but don't touch" is not a good 
user interface paradigm.

> Heck, if you really want then make it difficult by using  a
> non-printing  character in the variable name. But please don't try to
> tell your users that you know better than they what's good for them.

If I write code that stores data in an internal format, especially one that's subject to 
change, of course I know better than the user what's good for him.  If the user 
manipulates the data incorrectly when he's been told (via the documentation) not to touch 
it, then the code is just exposing itself to more crashes.

> The user will probably not care much about  a few more cryptic
> environment variables. And you don't have to support setenv.

How do I not support setenv() if the data is in an environment variable?  If the variable 
I need is called "jumpers", then what's to stop the user from just doing "setenv jumpers 
'blablabla'" and breaking my code?

-- 
Timur Tabi
Linux Kernel Developer @ Freescale




More information about the U-Boot mailing list