On 30 December 2015 at 12:10, Rafał Miłecki <zaj...@gmail.com> wrote: > Supported syntax is inspired by ethtool. Example usage: > swconfig dev switch0 port 2 set link "duplex half speed 100 autoneg off"
Any comments to this usage/syntax? It doesn't look too nice (this long quoted string as a value), but swconfig is strongly focused on simple values. Making swconfig accept something like: swconfig dev switch0 port 2 set link duplex half speed 100 autoneg off would require big rewrite of handling arguments in main function. Moreover swconfig uses magic mapping of UCI options into swconfig attributes. Thanks to this - with proposed patch - I can simply use: network.@switch_port[0]=switch_port network.@switch_port[0].device='switch0' network.@switch_port[0].port='3' network.@switch_port[0].link='duplex full speed 10 autoneg on' and it works without any extra changes. Making swconfig understand more friendly options, e.g. network.@switch_port[0].link_duplex network.@switch_port[0].link_speed network.@switch_port[0].link_autoneg would require big changes to swlib_apply_from_uci and swlib_map_settings. _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel