summaryrefslogtreecommitdiff
path: root/package/swconfig/src/cli.c
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2011-07-27 18:00:18 +0000
committerJonas Gorski <jogo@openwrt.org>2011-07-27 18:00:18 +0000
commiteaa935658b7ec77bfd8b99b557ad196425b620f4 (patch)
tree85ae0f6e1bff3c06ac7b12de828d5a6a86194931 /package/swconfig/src/cli.c
parent8ff7756e829dde4fcf69eeb9cca673cc7c7bd945 (diff)
downloadmtk-20170518-eaa935658b7ec77bfd8b99b557ad196425b620f4.zip
mtk-20170518-eaa935658b7ec77bfd8b99b557ad196425b620f4.tar.gz
mtk-20170518-eaa935658b7ec77bfd8b99b557ad196425b620f4.tar.bz2
swconfig: Add generic switch identifiers
Also make switches available under a generic name "switch<num>" for device name agnostic access. The old device name is used as an alias for backward compatibility. SVN-Revision: 27800
Diffstat (limited to 'package/swconfig/src/cli.c')
-rw-r--r--package/swconfig/src/cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/swconfig/src/cli.c b/package/swconfig/src/cli.c
index eea88d8..eff34fb 100644
--- a/package/swconfig/src/cli.c
+++ b/package/swconfig/src/cli.c
@@ -74,7 +74,7 @@ print_attrs(const struct switch_attr *attr)
static void
list_attributes(struct switch_dev *dev)
{
- printf("Switch %d: %s(%s), ports: %d (cpu @ %d), vlans: %d\n", dev->id, dev->dev_name, dev->name, dev->ports, dev->cpu_port, dev->vlans);
+ printf("%s: %s(%s), ports: %d (cpu @ %d), vlans: %d\n", dev->dev_name, dev->alias, dev->name, dev->ports, dev->cpu_port, dev->vlans);
printf(" --switch\n");
print_attrs(dev->ops);
printf(" --vlan\n");