backfire: swconfig: Fix switch name. (backport of r20938)
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 16 Apr 2010 20:30:00 +0000 (20:30 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 16 Apr 2010 20:30:00 +0000 (20:30 +0000)
This patch fixes a small typo in swconfig's client side that caused
it to print the interface name instead of the switch's device name
on the help page.

Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@20947 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/swconfig/src/swlib.c

index 04b3bef49df9defd6a65dc90b5c425b3fb98f705..8a9fd7a29ce8b3659d057ab350400321a598b0e4 100644 (file)
@@ -581,7 +581,7 @@ add_switch(struct nl_msg *msg, void *arg)
        if (tb[SWITCH_ATTR_ID])
                dev->id = nla_get_u32(tb[SWITCH_ATTR_ID]);
        if (tb[SWITCH_ATTR_NAME])
-               dev->name = strdup(nla_get_string(tb[SWITCH_ATTR_DEV_NAME]));
+               dev->name = strdup(nla_get_string(tb[SWITCH_ATTR_NAME]));
        if (tb[SWITCH_ATTR_PORTS])
                dev->ports = nla_get_u32(tb[SWITCH_ATTR_PORTS]);
        if (tb[SWITCH_ATTR_VLANS])