aboutsummaryrefslogtreecommitdiffstats
path: root/brctl
diff options
context:
space:
mode:
authorshemminger <shemminger>2004-05-28 18:00:28 +0000
committershemminger <shemminger>2004-05-28 18:00:28 +0000
commitf8eed52bc9ca6b3fc9281b16877abd5178a246bf (patch)
tree1a97873dac01f35975959b0f8e09357acb1c7efe /brctl
parent9cbb894faa55ec0c6e98215151004d350270812e (diff)
downloadandroid_external_brctl-f8eed52bc9ca6b3fc9281b16877abd5178a246bf.tar.gz
android_external_brctl-f8eed52bc9ca6b3fc9281b16877abd5178a246bf.tar.bz2
android_external_brctl-f8eed52bc9ca6b3fc9281b16877abd5178a246bf.zip
Fix problems relating to ifindex vs. index in the
get port info arguments.
Diffstat (limited to 'brctl')
-rw-r--r--brctl/brctl_disp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/brctl/brctl_disp.c b/brctl/brctl_disp.c
index 6c03099..36c2b8a 100644
--- a/brctl/brctl_disp.c
+++ b/brctl/brctl_disp.c
@@ -55,18 +55,17 @@ void br_dump_interface_list(const char *br)
printf("\n");
}
-static int dump_port_info(const char *br, const char *p, int ifindex,
- void *arg)
+static int dump_port_info(const char *br, const char *p, int count, void *arg)
{
struct port_info pinfo;
- printf("%s (%i)\n", p, ifindex);
- if (br_get_port_info(br, ifindex, &pinfo)) {
- printf(" can't get port info\n");
+ printf("%s (%i)", p, count);
+ if (br_get_port_info(br, p, count, &pinfo)) {
+ printf("\tcan't get port info\n");
return 1;
}
- printf(" port id\t\t%.4x\t\t\t", pinfo.port_id);
+ printf("\n port id\t\t%.4x\t\t\t", pinfo.port_id);
printf("state\t\t%15s\n", br_get_state_name(pinfo.state));
printf(" designated root\t");
br_dump_bridge_id((unsigned char *)&pinfo.designated_root);