aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Jackson <jerj@coplanar.net>2007-05-08 11:10:34 -0700
committerStephen Hemminger <shemminger@linux-foundation.org>2007-05-08 11:10:34 -0700
commit0397c6aa48769505e6aa4481f0786c8f4eaaf890 (patch)
tree78140452a65f644ca0701f9665fcde75b220058d
parent45ab1e6ebd9d29ea4ad0761eebafede1384b46f5 (diff)
downloadandroid_external_brctl-0397c6aa48769505e6aa4481f0786c8f4eaaf890.tar.gz
android_external_brctl-0397c6aa48769505e6aa4481f0786c8f4eaaf890.tar.bz2
android_external_brctl-0397c6aa48769505e6aa4481f0786c8f4eaaf890.zip
I've noticed for a while that
output is showing 0 for port_no and port_id It seems that somewhere in 2.6 sysfs land the following items got printed in hexadecimal, and brctl code was parsing for decimal only doug:/sys/class/net/eth0/brport# cat port_id 0x8001 doug:/sys/class/net/eth0/brport# cat port_no 0x1
-rw-r--r--libbridge/libbridge_devif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c
index 58828c3..1decc28 100644
--- a/libbridge/libbridge_devif.c
+++ b/libbridge/libbridge_devif.c
@@ -56,7 +56,7 @@ static int fetch_int(const char *dev, const char *name)
if (!f)
fprintf(stderr, "%s: %s\n", dev, strerror(errno));
else {
- fscanf(f, "%d", &value);
+ fscanf(f, "%i", &value);
fclose(f);
}
return value;