[OpenWrt-Devel] Parsing list of options with the callback method

Baptiste Jonglez bjonglez at illyse.org
Wed Aug 27 13:11:39 EDT 2014


Hi,

According to [1], it should be possible to parse list of options in a UCI
file using an "option_cb()" callback.

It does not seem to work as expected, for instance this block:

config example
    list 'import_table' '42'
    list 'import_table' '53'

leads to the following calls:

config_cb example cfg02f223
option_cb import_table_ITEM1 42
option_cb import_table_LENGTH 1
option_cb import_table_ITEM2 53
option_cb import_table_LENGTH 2

I would have simply expected multiple calls to option_cb() with
"import_table" as the first argument and the various value as the second
argument.  Is this intended?

Thanks,
Baptiste

[1] http://wiki.openwrt.org/doc/devel/config-scripting#callbacks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20140827/c529ddf7/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list