From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Jeremy Jackson <jerj@coplanar.net>
Cc: bridge@linux-foundation.org
Subject: Re: [Bridge] two fields are missing in brctl output when using /sys
Date: Tue, 8 May 2007 11:11:23 -0700 [thread overview]
Message-ID: <20070508111123.39cbb2d2@freekitty> (raw)
In-Reply-To: <1175803859.24828.3.camel@ragnarok>
On Thu, 05 Apr 2007 16:10:59 -0400
Jeremy Jackson <jerj@coplanar.net> wrote:
> I've noticed for a while that
>
> # brctl showstp
>
> 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
>
> The following patch to bridge-utils (git and 1.2 release) lets it do the
> right thing:
>
> diff -ur bridge-utils-1.2/libbridge/libbridge_devif.c
> bridge-utils/libbridge/lib
> bridge_devif.c
> --- bridge-utils-1.2/libbridge/libbridge_devif.c 2007-04-05
> 16:02:58.2870
> 22220 -0400
> +++ bridge-utils/libbridge/libbridge_devif.c 2007-04-05
> 14:51:19.362040447 -0
> 400
> @@ -56,7 +56,7 @@
> if (!f)
> fprintf(stderr, "%s: %s\n", dev, strerror(errno));
> else {
> - fscanf(f, "%i", &value);
> + fscanf(f, "%d", &value);
> fclose(f);
> }
> return value;
>
Applied manually, (your patch was backwards)
--
Stephen Hemminger <shemminger@linux-foundation.org>
prev parent reply other threads:[~2007-05-08 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-05 20:10 [Bridge] two fields are missing in brctl output when using /sys Jeremy Jackson
2007-05-08 18:11 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070508111123.39cbb2d2@freekitty \
--to=shemminger@linux-foundation.org \
--cc=bridge@linux-foundation.org \
--cc=jerj@coplanar.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox