[BUG] Fix int 0x15, e820 call

2010-06-23 Thread Daniel Dickman
Int 0x15, AX=e820 doesn't return the length of the buffer in EDX. That's actually returned in ECX. So I think the patch below is needed. For reference see: http://www.ctyme.com/intr/rb-1741.htm Tested on amd64. Index: amd64/stand/libsa/memprobe.c ===

Re: missing POSIX: sem_timedwait

2010-06-23 Thread Matthew Dempsky
On Wed, Jun 23, 2010 at 6:22 PM, Federico G. Schwindt wrote: > On Thu, Jun 24, 2010 at 02:13:55AM +0100, Federico G. Schwindt wrote: >> i just wrote it but for some reason is not working as expected, which is odd >> since it's relying on pthread_cond_timedwait. maybe the tests are wrong. >> be

Re: missing POSIX: sem_timedwait

2010-06-23 Thread Federico G. Schwindt
On Thu, Jun 24, 2010 at 02:13:55AM +0100, Federico G. Schwindt wrote: > On Wed, Jun 23, 2010 at 05:32:13PM -0700, Matthew Dempsky wrote: > > On Wed, Jun 23, 2010 at 4:10 PM, Joerg Goltermann wrote: > > > I am working on a port and need the POSIX function sem_timedwait. Does > > > anyone > > > hav

Re: missing POSIX: sem_timedwait

2010-06-23 Thread Federico G. Schwindt
On Wed, Jun 23, 2010 at 05:32:13PM -0700, Matthew Dempsky wrote: > On Wed, Jun 23, 2010 at 4:10 PM, Joerg Goltermann wrote: > > I am working on a port and need the POSIX function sem_timedwait. Does > > anyone > > have a nice/simple idea how to mimic this function? Is anyone working on an > > imp

Re: missing POSIX: sem_timedwait

2010-06-23 Thread Matthew Dempsky
Please try the patch below and report back to me. :) # cd /usr/src/lib/libpthread # patch -p0 < /path/to/patch # make # make includes # make install Index: include/semaphore.h === RCS file: /cvs/src/lib/libpthrea

Re: missing POSIX: sem_timedwait

2010-06-23 Thread Matthew Dempsky
On Wed, Jun 23, 2010 at 4:10 PM, Joerg Goltermann wrote: > I am working on a port and need the POSIX function sem_timedwait. Does anyone > have a nice/simple idea how to mimic this function? Is anyone working on an > implementation in libpthread? It looks like it should be simple enough to add.

Re: missing POSIX: sem_timedwait

2010-06-23 Thread Christiano F. Haesbaert
On 23 June 2010 20:10, Joerg Goltermann wrote: > Hello, > > I am working on a port and need the POSIX function sem_timedwait. Does anyone > have a nice/simple idea how to mimic this function? Is anyone working on an > implementation in libpthread? > > Kind regards, > > Joerg Goltermann > > Why do

missing POSIX: sem_timedwait

2010-06-23 Thread Joerg Goltermann
Hello, I am working on a port and need the POSIX function sem_timedwait. Does anyone have a nice/simple idea how to mimic this function? Is anyone working on an implementation in libpthread? Kind regards, Joerg Goltermann

Re: Patch for bogus pointer arithmetic in adw(4)

2010-06-23 Thread Theo de Raadt
> On Tue, Jun 22, 2010 at 03:40:44PM -0300, Hudson Flavio V Mateus wrote: > > >> Is there any reson you use bcopy() not memcpy()? > > >> If not considder using memcpy() please. :) > > > > > We couldn't care what you believe, unless you have diffs of your own > > > to submit. > > > > I think the g

Re: OpenBSD closes TCP connections between unrelated hosts

2010-06-23 Thread Claudio Jeker
On Wed, Jun 23, 2010 at 09:11:37PM +0800, Patrick Coleman wrote: > On Wed, Jun 23, 2010 at 12:57 AM, Claudio Jeker > wrote: > > > > I think something like the attached version may be the best solution. > > I don't like to do the bcmp() for every unicast packet since network cards > > come with nic

Re: OpenBSD closes TCP connections between unrelated hosts

2010-06-23 Thread Patrick Coleman
On Wed, Jun 23, 2010 at 12:57 AM, Claudio Jeker wrote: > > I think something like the attached version may be the best solution. > I don't like to do the bcmp() for every unicast packet since network cards > come with nice mac filters that make this superfluous. > From code inspection bridge(4) sh

Re: Patch for bogus pointer arithmetic in adw(4)

2010-06-23 Thread Marc Espie
Actually, I think there's nothing "natural" about bcopy or memcopy order. Those are just API, they're mostly equivalent. Switching all the time is annoying. I tend to like that memcpy works like strlcpy, miod prefers bcopy. Who cares ? those are totally equivalent APIs (in the documentation) Of c

Re: Patch for bogus pointer arithmetic in adw(4)

2010-06-23 Thread Joachim Schipper
On Tue, Jun 22, 2010 at 03:40:44PM -0300, Hudson Flavio V Mateus wrote: > >> Is there any reson you use bcopy() not memcpy()? > >> If not considder using memcpy() please. :) > > > We couldn't care what you believe, unless you have diffs of your own > > to submit. > > I think the guy there asked i

Re: [PATCH] Unprotected imsg header

2010-06-23 Thread Nicholas Marriott
Hi Adding the multiple inclusion stuff is right, thanks. I don't think we need to include sys/queue.h in imsg.h - the man page documents that you should include sys/types.h and sys/queue.h yourself. On Tue, Jun 22, 2010 at 10:40:45PM -0300, Christiano F. Haesbaert wrote: > Also a missing includ