public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] hashtable lib and escaping
@ 2012-11-01 17:45 Mats Kärrman
  2012-11-01 20:00 ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: Mats Kärrman @ 2012-11-01 17:45 UTC (permalink / raw)
  To: u-boot

Hi,

I used to have a working setup using U-Boot 2009.03 before upgrading to U-Boot 2012.07. The problem I'm facing is related to the escaping policies of lib/hashtable.c.

What I did before was for example having something like this in my default environment:

bootcmd=run first_boot
first_boot=setenv bootcmd my_select\;run ubi_boot;saveenv;boot

The trick accomplished was that the environment was saved after setting the real bootcmd (to "my_select;run ubi_boot") on first boot so that the booted OS could always be relying on a valid environment in one of the flash env partitions.

With the escape parsing of himport_r(), the '\' is simply dropped and it is no longer possible to escape ';' so the "run ubi_boot" is immediately executed and nothing is saved... The function header mentions the possibility for multi-line values but this should not come at the cost of not being able to escape ';'.

I am not sure about what other uses the escape may have or used to have so I have not come up with a patch yet. Does anyone have any feedback/opinions concerning this?

BR // Mats

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-11-06  7:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-01 17:45 [U-Boot] hashtable lib and escaping Mats Kärrman
2012-11-01 20:00 ` Wolfgang Denk
2012-11-02  7:30   ` Mats Kärrman
2012-11-02 22:20     ` Wolfgang Denk
2012-11-05 13:34       ` Mats Kärrman
2012-11-05 18:33         ` Wolfgang Denk
2012-11-06  7:35           ` Mats Kärrman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox