On 2010-05-01 6:44 PM, [email protected] wrote:
> A number of callers of config_load() which define a config_cb() (for instance
> in /lib/network/config.sh) assume that CONFIG_SECTION is the name of the
> current section, while actually it is not the case.  This patch fixes that.
The patch is wrong. Callers to config_load() can use config_cb() in two
ways. One way is to use the section name provided in $2, which is in
fact the 'current' one. However at this point the options of the parsed
section are not processed yet, so all you can do is set some defaults or
store a reference to the section somewhere else.
When using CONFIG_SECTION, you get the name of the *last* section, which
is useful if you want to process options of a completely parsed section.
For this to work, config_load also emits a final config_cb() call, after
it has parsed the last section.

- Felix
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to