Skip to contentSkip to conversation

patch for a message bug

Bridge Applied Santiago Garcia Mantinan 2 participants 2 messages Aug 26, 2006 – Aug 28, 2006 Ethernet bridge

lore
Share & tools
lore
#0 lore raw

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...

Signature · 27 lines
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:
#1 lore raw
Quoted 6 lines · On Sat, 26 Aug 2006 19:41:28 +0200 Santiago Garcia Mantinan <[email protected]>…

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.

Quoted 6 lines

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...

Applied to current git tree, will show up in next version

Signature · 3 lines
Stephen Hemminger <[email protected]>

All non-trivial abstractions, to some degree, are leaky.