Fix em(4) stripping of vlanprio.

2011-08-27 Thread Christiano F. Haesbaert
Don't OR the 12 bit vlan-id mask, we wan't the whole TCI (3 bits for PCP and 1 bit for CF). This makes our stack see the vlanprio in bpf and thus tcpdump correctly displays the received tag. Tested on i386. ok ? Index: ./dev/pci/if_em.c

Re: passing vlan priority tag through bridge

2011-08-27 Thread Christiano F. Haesbaert
Heya, So here is a crude diff, the shiffting can be improved and if we wan't this in the future we'll need a knob to enable "don't touch the vlanprio thingy". Please it would be great if you can give this a spin Peter. I did some basic tests with a re(4) (hw tagging) and a rl(4) (no hw tagging).

Re: [PATCH] dired mg patch

2011-08-27 Thread Henri Kemppainen
> > The warpdot() has at least one issue. It leads to > > segfaults if you try to open a directory like (BCD). New diff below. I wanted to make d_warpdot behave exactly like the rest of mg functions in that it'd take the two standard int (f, n) arguments, and dereference curwp->* to do its job.

Re: [PATCH] dired mg patch

2011-08-27 Thread Henri Kemppainen
> The warpdot() has at least one issue. It leads to > segfaults if you try to open a directory like (BCD). [.. diff ..] > ed > > mg doesn't segfault. Your fix is wrong, and only works by chance. If you craft a directory with enough spaces in its name, it'll segfault again. And you cannot fix t

Re: [PATCH] dired mg patch

2011-08-27 Thread Henri Kemppainen
> The idea of removing the error to behave like the rest > of mg would lead to a brittle design. It's like assuming > errors can only happen once. It makes code faster, but > later changes could cause subtle bugs that could be hard to > track IMHO. Quite the opposite

Re: [PATCH] dired mg patch

2011-08-27 Thread Loganaden Velvindron
The warpdot() has at least one issue. It leads to segfaults if you try to open a directory like (BCD). Try mkdir \(BCD\) and then reading the contents of it. Here's what I get: drwxr-xr-x 2 root wheel 512 Aug 25 01:09 sh: syntax error: `(' unexpected-rw-r--r-- 1 root wheel 0

Re: top(1) make 2 variables relationship more explicit

2011-08-27 Thread Loganaden Velvindron
I don't know top details, but I can confirm that it compiles & runs.

Re: [PATCH] dired mg patch

2011-08-27 Thread Loganaden Velvindron
Both diffs you submitted work. However, there are some changes that I don't quite agree on. Assigning the value of a function directly to w_doto without checking the return value don't seem right to me. The idea of removing the error to behave like the rest of mg would lead to a brittle design. I

top(1) make 2 variables relationship more explicit

2011-08-27 Thread Mark Lumsden
If a terminals capability is deemed insufficient for top, the variable is_a_terminal is switched to 0 in the init_screen function, as is the variable smart_terminal. This diff makes this logical relationship more explicit in the relevant code. There is no functional change. ok/comments? -lum Ind

Re: [PATCH] dired mg patch

2011-08-27 Thread Henri Kemppainen
> In the long run, the error could be removed entirely by making > dired behave like the rest of mg -- that is, abort somewhere up > the stream if lalloc fails. This way the rest of the functions > will never have to worry about a NULL ltext. Actually, this seems to be the case already. dired ca

Re: [PATCH] dired mg patch

2011-08-27 Thread Henri Kemppainen
> Logan has already tested this. Any other test's/oks? Is there a good reason to all those if/else blocks which call d_warpdot twice if it succeeds? I don't see one. At the very least, I'd remove the redundant call. But we can do better: just be sane and default to zero on error. In the long r

Re: [PATCH] dired mg patch

2011-08-27 Thread Mark Lumsden
Here is a modified diff, the changes revolve around the d_warpdot function. Logan has already tested this. Any other test's/oks? -lum Index: dired.c === RCS file: /cvs/src/usr.bin/mg/dired.c,v retrieving revision 1.48 diff -u -p -r