[Bridge] patch for a message bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

diff -u -r bridge-utils.old/brctl/brctl_cmd.c bridge-utils-1.1/brctl/brctl_cmd.c
--- bridge-utils.old/brctl/brctl_cmd.c	2006-08-26 19:31:23.000000000 +0200
+++ bridge-utils-1.1/brctl/brctl_cmd.c	2006-08-26 19:31:49.000000000 +0200
@@ -99,7 +99,7 @@
 			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 @@
 			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:


[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux