PATCH: brctl show

Denys Vlasenko vda.linux at googlemail.com
Thu May 1 07:32:18 UTC 2008


On Wednesday 30 April 2008 22:51, Bernhard Fischer wrote:
> On Sun, Apr 06, 2008 at 09:19:24AM +0200, Denys Vlasenko wrote:
> >On Saturday 05 April 2008 23:10, L. Gabriel Somlo wrote:
> >> Hi,
> >> 
> >> I need to be able to see the list of ports currently configured on a
> >> bridge, so I took a shot at implementing 'brctl show'. Might follow up
> >> with 'showmacs' later, but for now, let me know what you think, and
> >> please apply...
> >
> >Applied, thanks.
> >
> >NB: "standard" brctl talks to kernel via /sys, not ioctls.
> 
> No, it doesn't.
> Either it would work without *any* ioctl or exclusively via sysfs ¹)
> I don't see how mixing sysfs and ioctl interfaces makes any sense at
> all, please explain?

I discovered a bug in "standard" brctl. It manifested only
when you run it on 32/64 user/kernelspace system.

The bug was directly caused by unimplemented ioctl conversion
in kernel. Which was done on purpose - newer brctl
(supposed to) use sysfs, so supporting this conversion is pointless.

The bug was that in this case brctl was erroneously
still using ioctls (which works on non 32/64-split system).

I sent a fix to the maintainer.

Thats how I learned that brctl uses mostly sysfs these days,
and even contributing for it doing that a bit more.
--
vda



More information about the busybox mailing list