diff options
author | shemminger <shemminger> | 2004-06-02 17:38:20 +0000 |
---|---|---|
committer | shemminger <shemminger> | 2004-06-02 17:38:20 +0000 |
commit | a5a664df717e5e6d4135abfa871227b17572a24c (patch) | |
tree | 9e80f3caa31deb46f7110cde6df6216902006100 | |
parent | 148de6e2841fcdb91aa4c98fabc4a2e247f4420d (diff) | |
download | android_external_brctl-a5a664df717e5e6d4135abfa871227b17572a24c.tar.gz android_external_brctl-a5a664df717e5e6d4135abfa871227b17572a24c.tar.bz2 android_external_brctl-a5a664df717e5e6d4135abfa871227b17572a24c.zip |
Error handling, and build cleanup
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | brctl/brctl_disp.c | 16 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | libbridge/Makefile.in | 5 |
4 files changed, 21 insertions, 8 deletions
@@ -1,3 +1,9 @@ +20040601 Stephen Hemminger <shemminger@osdl.org> + * Released bridge-utils 1.0.4 + - should build with out sysfs now. + - report errors on foreach_port failing + - more build cleanup + 20040525 Stephen Hemminger <shemminger@osdl.org> * Released bridge-utils 1.0.1 - Change configure option diff --git a/brctl/brctl_disp.c b/brctl/brctl_disp.c index 36c2b8a..a1f4aa3 100644 --- a/brctl/brctl_disp.c +++ b/brctl/brctl_disp.c @@ -18,7 +18,9 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <sys/time.h> + #include "libbridge.h" #include "brctl.h" @@ -50,9 +52,14 @@ static int dump_interface(const char *b, const char *p, int ind, void *arg) void br_dump_interface_list(const char *br) { + int err; + first = 1; - br_foreach_port(br, dump_interface, NULL); - printf("\n"); + err = br_foreach_port(br, dump_interface, NULL); + if (err < 0) + printf(" can't get port info: %s\n", strerror(-err)); + else + printf("\n"); } static int dump_port_info(const char *br, const char *p, int count, void *arg) @@ -93,6 +100,7 @@ static int dump_port_info(const char *br, const char *p, int count, void *arg) void br_dump_info(const char *br, const struct bridge_info *bri) { + int err; printf("%s\n", br); printf(" bridge id\t\t"); @@ -132,5 +140,7 @@ void br_dump_info(const char *br, const struct bridge_info *bri) printf("\n"); printf("\n"); - br_foreach_port(br, dump_port_info, NULL); + err = br_foreach_port(br, dump_port_info, NULL); + if (err < 0) + printf("can't get ports: %s\n", strerror(-err)); } diff --git a/configure.in b/configure.in index 67a9981..7eeb70f 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(brctl/brctl.c) AC_CONFIG_HEADER(libbridge/config.h) -AM_INIT_AUTOMAKE(bridge-utils,1.0.2) +AM_INIT_AUTOMAKE(bridge-utils,1.0.4) AC_ARG_WITH( linux-headers, [ --with-linux-headers Location of the linux headers to use], KERNEL_HEADERS=$withval, KERNEL_HEADERS="/usr/src/linux/include") diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in index 0997fee..e8bbd95 100644 --- a/libbridge/Makefile.in +++ b/libbridge/Makefile.in @@ -30,10 +30,7 @@ install: libbridge.a clean: - rcsclean * - rm -f *~ - rm -f *.o - rm -f libbridge.a + rm -f *.o libbridge.a libbridge.a: $(libbridge_OBJECTS) $(AR) rcs $@ $(libbridge_OBJECTS) |