
Dear Scott Wood,
In message 4E7A332C.5000705@freescale.com you wrote:
+#ifdef CONFIG_SYS_HUSH_PARSER +#include <hush.h> +#endif
I don't think you need this ifdef.
It should be omitted alltogether.
+#ifdef CONFIG_SYS_HUSH_PARSER
- memset(buf, 0, bufsz);
- sprintf(buf, "nand_writesize=%x", nand->writesize);
- set_local_var(buf, 0);
...
Is there no existing abstraction to add a variable to both the shell (if present) and the environment, without needing such an ifdef in the caller? If not, should one be added?
While it's a good idea to keep such dynamic variables out of the (persistently stored) environment, I don't want to see such a solitary approach. If we start thinking about this it should be implemented differently, and for all dynamic variables (including things like filesize etc.).
Marek, please get rid of the hush special case and always use plain env variables like we do elsewhere, too.
Best regards,
Wolfgang Denk