aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Garcia Mantinan <bridge@manty.net>2006-08-26 19:41:28 +0200
committerStephen Hemminger <shemminger@osdl.org>2006-08-28 09:40:06 -0700
commitcf06742ec8fd4e7ac7d393ebe093839379aa3f46 (patch)
tree546e3206beb9e7a7c2d9fdf7ab3ca7367caca15c
parentcd38c7590d3cd1d1d068b394558e6070cb926e12 (diff)
downloadandroid_external_brctl-cf06742ec8fd4e7ac7d393ebe093839379aa3f46.tar.gz
android_external_brctl-cf06742ec8fd4e7ac7d393ebe093839379aa3f46.tar.bz2
android_external_brctl-cf06742ec8fd4e7ac7d393ebe093839379aa3f46.zip
patch for a message bug
Hi! Jens Seidel reported a bug to Debian about a wrong message on brctl, you can see it at http://bugs.debian.org/383938, it is kind of the continuation of the ENODEV bug #348617 that was already patched by Stephen on the git. I have applied the same solution that Stephen applied for the first one, follows the patch against git plus a minor exclamation mark modification I did so that all ENODEV messages were exclamative (Stephen patch had missed that mark). Regards... -- Manty/BestiaTester -> http://manty.net Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
-rw-r--r--brctl/brctl_cmd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/brctl/brctl_cmd.c b/brctl/brctl_cmd.c
index a05d5b1..c93dd55 100644
--- a/brctl/brctl_cmd.c
+++ b/brctl/brctl_cmd.c
@@ -99,7 +99,7 @@ static int br_cmd_addif(int argc, char *const* argv)
if (if_nametoindex(ifname) == 0)
fprintf(stderr, "interface %s does not exist!\n", ifname);
else
- fprintf(stderr, "bridge %s does not exist\n", brname);
+ fprintf(stderr, "bridge %s does not exist!\n", brname);
break;
case EBUSY:
@@ -139,8 +139,10 @@ static int br_cmd_delif(int argc, char *const* argv)
continue;
case ENODEV:
- fprintf(stderr, "interface %s does not exist!\n",
- ifname);
+ if (if_nametoindex(ifname) == 0)
+ fprintf(stderr, "interface %s does not exist!\n", ifname);
+ else
+ fprintf(stderr, "bridge %s does not exist!\n", brname);
break;
case EINVAL: