sem_open value

2013-11-20 Thread Ted Unangst
Read the standard again and discovered some more missing features. 1. sem_open allows setting the value via a fourth argument. Fixed. 2. Multiple sem_open calls of the same path in the same process are supposed to return the same pointer. Not the same semaphore, the same pointer. This is mind bog

Re: sem_open

2013-11-20 Thread Ted Unangst
On Wed, Nov 20, 2013 at 23:12, Stuart Henderson wrote: > On 2013/11/20 18:09, Ted Unangst wrote: >> On Wed, Nov 20, 2013 at 21:59, Stuart Henderson wrote: >> > graphics/ilmbase hangs during autoconf; it runs something close to this >> >> The diff I previously posted seems to fix this. At least, I c

Re: sem_open

2013-11-20 Thread Stuart Henderson
On 2013/11/20 18:09, Ted Unangst wrote: > On Wed, Nov 20, 2013 at 21:59, Stuart Henderson wrote: > > graphics/ilmbase hangs during autoconf; it runs something close to this > > The diff I previously posted seems to fix this. At least, I could > repro with a snapshot and now I can't reproduce after

Re: sem_open

2013-11-20 Thread Ted Unangst
On Wed, Nov 20, 2013 at 21:59, Stuart Henderson wrote: > graphics/ilmbase hangs during autoconf; it runs something close to this The diff I previously posted seems to fix this. At least, I could repro with a snapshot and now I can't reproduce after installing the new library. I also spotted one m

sem_open

2013-11-20 Thread Stuart Henderson
graphics/ilmbase hangs during autoconf; it runs something close to this #include int main() { sem_t mysem; if (sem_init(&mysem, 1, 1) == 0) { if (sem_wait(&mysem) == 0) { sem_post(&mysem); sem_destroy(&mysem);

Re: linebuffering diff for tr(1)

2013-11-20 Thread Theo de Raadt
> > FreeBSD and Dragonfly BSD have this option in tr. So, this actually > > improves portability. > >>> > >>> It's just spreading the disease. portable means it works everywhere. > >>> Increasing the number of people who can write nonportable code is not > >>> the same as increasing portab

Re: linebuffering diff for tr(1)

2013-11-20 Thread Franco Fichtner
On 20 Nov 2013, at 21:40, Theo de Raadt wrote: > FreeBSD and Dragonfly BSD have this option in tr. So, this actually > improves portability. >>> >>> It's just spreading the disease. portable means it works everywhere. >>> Increasing the number of people who can write nonportable code is

Re: linebuffering diff for tr(1)

2013-11-20 Thread Theo de Raadt
> > >> FreeBSD and Dragonfly BSD have this option in tr. So, this actually > > >> improves portability. > > > > It's just spreading the disease. portable means it works everywhere. > > Increasing the number of people who can write nonportable code is not > > the same as increasing portability. >

Re: linebuffering diff for tr(1)

2013-11-20 Thread Shawn K. Quinn
On Wed, Nov 20, 2013, at 12:49 PM, Ted Unangst wrote: > > On 2013/11/20 07:40, Shawn K. Quinn wrote: > > >> FreeBSD and Dragonfly BSD have this option in tr. So, this actually > >> improves portability. > > It's just spreading the disease. portable means it works everywhere. > Increasing the numb

better sem_open internals

2013-11-20 Thread Ted Unangst
Fix a few things. I think I started down the sem inside a sem road because I misunderstood some minor point of the API. Turns out it's entirely possible to just map the semaphore and be done with it. We only need a flag to identify shared semaphores. This makes everything a little bit easier. In t

Re: linebuffering diff for tr(1)

2013-11-20 Thread Ted Unangst
> On 2013/11/20 07:40, Shawn K. Quinn wrote: >> FreeBSD and Dragonfly BSD have this option in tr. So, this actually >> improves portability. It's just spreading the disease. portable means it works everywhere. Increasing the number of people who can write nonportable code is not the same as incre

Re: initial i217/i218 Haswell Ethernet support for em(4)

2013-11-20 Thread Markus Hennecke
On Wed, 20 Nov 2013, Jonathan Gray wrote: > On Tue, Nov 19, 2013 at 01:09:32AM +1100, Jonathan Gray wrote: > > On Sat, Nov 16, 2013 at 10:42:05AM +0100, Markus Hennecke wrote: > > > On Sat, 9 Nov 2013, Jonathan Gray wrote: > > > > > > > This adds the initial bits for the i217/i218 PHY and the > >

LC_MONETARY 3: regression test

2013-11-20 Thread Vladimir Támara Patiño
Tests for POSIX, en_US and spanish speaking countries. -- Dios, gracias por tu amor infinito. -- Vladimir Támara Patiño. http://vtamara.pasosdeJesus.org/ http://www.pasosdejesus.org/dominio_publico_colombia.html diff -ruN -x *~ -x obj -x *orig src55-orig/regress/lib/libc/locale/Makefile s

LC_MONETARY 1: in libc

2013-11-20 Thread Vladimir Támara Patiño
Based on FreeBSD implementation. It applies on sources of -current (has small overlap with patch for LC_NUMERIC I sent on Nov.12). -- Dios, gracias por tu amor infinito. -- Vladimir Támara Patiño. http://vtamara.pasosdeJesus.org/ http://www.pasosdejesus.org/dominio_publico_colombia.html

Re: linebuffering diff for tr(1)

2013-11-20 Thread Theo de Raadt
> On Tue, Nov 19, 2013, at 03:10 PM, Theo de Raadt wrote: > > In general, new non-standard options are bad. > > > > Basically, if we add this someone will use it in a script. Then it will > > become non-portable. You cannot just invent something on your own like > > this, without doing research

Re: Kill IA_SIN()

2013-11-20 Thread Stuart Henderson
On 2013/11/20 11:32, Martin Pieuchot wrote: > On 20/11/13(Wed) 10:16, Stuart Henderson wrote: > > On 2013/11/20 10:10, Martin Pieuchot wrote: > > > This one is not under _KERNEL but it's used at only one place and > > > if a port use it, it should probably define it by itself. > > > > This is used

Re: linebuffering diff for tr(1)

2013-11-20 Thread Stuart Henderson
On 2013/11/20 07:40, Shawn K. Quinn wrote: > On Tue, Nov 19, 2013, at 03:10 PM, Theo de Raadt wrote: > > In general, new non-standard options are bad. > > > > Basically, if we add this someone will use it in a script. Then it will > > become non-portable. You cannot just invent something on your

Re: linebuffering diff for tr(1)

2013-11-20 Thread Shawn K. Quinn
On Tue, Nov 19, 2013, at 03:10 PM, Theo de Raadt wrote: > In general, new non-standard options are bad. > > Basically, if we add this someone will use it in a script. Then it will > become non-portable. You cannot just invent something on your own like > this, without doing research to find out

Re: linebuffering diff for tr(1)

2013-11-20 Thread Christian Weisgerber
Jan Klemkow wrote: > here is a diff that adds optional linebuffering to tr(1) with command > line switch -u like in sed(1). I need this to remove '\r' characters > from a continues input steam which lines have to be there immediately. It's really odd to make tr output line-buffered, since tr do

Re: pfsync(4) mangles prio in master/slave setup

2013-11-20 Thread Alexey Suslikov
On Wed, Nov 20, 2013 at 2:15 PM, Florian Obser wrote: > On Wed, Nov 20, 2013 at 01:38:11PM +0200, Alexey Suslikov wrote: >> On Wed, Nov 20, 2013 at 1:32 PM, Mike Belopuhov wrote: >> > could you please add more description to this report since >> > it's very hard to follow and interpret your mail.

Re: pfsync(4) mangles prio in master/slave setup

2013-11-20 Thread Mike Belopuhov
On 20 November 2013 13:10, Alexey Suslikov wrote: > On Wed, Nov 20, 2013 at 1:38 PM, Alexey Suslikov > wrote: >> On Wed, Nov 20, 2013 at 1:32 PM, Mike Belopuhov wrote: >>> could you please add more description to this report since >>> it's very hard to follow and interpret your mail. >> >> basic

Re: pfsync(4) mangles prio in master/slave setup

2013-11-20 Thread Florian Obser
On Wed, Nov 20, 2013 at 01:38:11PM +0200, Alexey Suslikov wrote: > On Wed, Nov 20, 2013 at 1:32 PM, Mike Belopuhov wrote: > > could you please add more description to this report since > > it's very hard to follow and interpret your mail. > > basically, when setup switches to slave, packets (matc

Re: pfsync(4) mangles prio in master/slave setup

2013-11-20 Thread Alexey Suslikov
On Wed, Nov 20, 2013 at 1:38 PM, Alexey Suslikov wrote: > On Wed, Nov 20, 2013 at 1:32 PM, Mike Belopuhov wrote: >> could you please add more description to this report since >> it's very hard to follow and interpret your mail. > > basically, when setup switches to slave, packets (matching > give

Re: pfsync(4) mangles prio in master/slave setup

2013-11-20 Thread Alexey Suslikov
On Wed, Nov 20, 2013 at 1:32 PM, Mike Belopuhov wrote: > could you please add more description to this report since > it's very hard to follow and interpret your mail. basically, when setup switches to slave, packets (matching given state) have wrong prio set ("wrong" means they were "right" when

Re: pfsync(4) mangles prio in master/slave setup

2013-11-20 Thread Mike Belopuhov
could you please add more description to this report since it's very hard to follow and interpret your mail. On 20 November 2013 12:11, Alexey Suslikov wrote: > Hi. > > This is on 5.4-stable. Trivial master/slave carp(4) setup. vlan(4) is to > make picture clear wrt prio. > > Test 1 (without usin

pfsync(4) mangles prio in master/slave setup

2013-11-20 Thread Alexey Suslikov
Hi. This is on 5.4-stable. Trivial master/slave carp(4) setup. vlan(4) is to make picture clear wrt prio. Test 1 (without using match). pf.conf (BOX1 and BOX2). ext_if="vlan101" dmz_if="vlan10" pf_sync="vlan50" block log all pass quick on $pf_sync proto pfsync keep state (no-sync) set prio 7 pa

Re: Kill IA_SIN()

2013-11-20 Thread Martin Pieuchot
On 20/11/13(Wed) 10:16, Stuart Henderson wrote: > On 2013/11/20 10:10, Martin Pieuchot wrote: > > This one is not under _KERNEL but it's used at only one place and > > if a port use it, it should probably define it by itself. > > This is used in at least kde-workspace and embedded copies of slirp

remove the b_cylinder #define to b_resid in struct buf

2013-11-20 Thread David Gwynne
most hardware and most of the kernel has given up on cylinders meaning anything, we generally work in logical block addresses now. now that disksort is (almost) gone it is no longer used for anything meaningful except in floppy disk drivers. the #define b_cylinder b_resid alias has always grated o

remove disksort()

2013-11-20 Thread David Gwynne
the subject says it all really. this is sort of inspired by 5d2ecd5224 in bitrig except this brings all the architectures and device drivers forward (i didnt get to delete any to prepare for this), and maintains an algorithm for trying to order io on spinning rust (nscan). ok? Index: kern/kern_bu

Re: Kill IA_SIN()

2013-11-20 Thread Stuart Henderson
On 2013/11/20 10:10, Martin Pieuchot wrote: > This one is not under _KERNEL but it's used at only one place and > if a port use it, it should probably define it by itself. This is used in at least kde-workspace and embedded copies of slirp (the ones I know about so far are emulators/qemu and emula

Re: sdmmc update

2013-11-20 Thread Stefan Sperling
On Thu, Nov 07, 2013 at 08:10:16PM +0100, Stefan Sperling wrote: > On Thu, Nov 07, 2013 at 08:06:11PM +0100, Sylvestre Gallon wrote: > > +int > > +rtsx_bus_width(sdmmc_chipset_handle_t sch, int width) > > +{ > > + struct rtsx_softc *sc = sch; > > + > > + return (rtsx_set_bus_width(sc, width));

Re: initial i217/i218 Haswell Ethernet support for em(4)

2013-11-20 Thread Mark Kettenis
> Date: Wed, 20 Nov 2013 14:45:38 +1100 > From: Jonathan Gray > > On Tue, Nov 19, 2013 at 01:09:32AM +1100, Jonathan Gray wrote: > > On Sat, Nov 16, 2013 at 10:42:05AM +0100, Markus Hennecke wrote: > > > On Sat, 9 Nov 2013, Jonathan Gray wrote: > > > > > > > This adds the initial bits for the i2

Unused proc argument in in6_control()

2013-11-20 Thread Martin Pieuchot
Any reason to keep this unused proc argument, in_control() does not have it. Ok to kill it? Index: netinet/tcp_usrreq.c === RCS file: /home/ncvs/src/sys/netinet/tcp_usrreq.c,v retrieving revision 1.116 diff -u -p -r1.116 tcp_usrreq.c

Kill IA_SIN()

2013-11-20 Thread Martin Pieuchot
This one is not under _KERNEL but it's used at only one place and if a port use it, it should probably define it by itself. ok? Index: netinet/if_ether.c === RCS file: /home/ncvs/src/sys/netinet/if_ether.c,v retrieving revision 1.111

msgbuf_write audit

2013-11-20 Thread Henning Brauer
so, msgbuf_write can now (again) return EAGAIN. some daemons have been fixed/adopted, some not. I did a full audit of the tree for all msgbuf_write users EAGAIN handling - this is the result. Index: usr.sbin/dvmrpd/control.c === RCS f

icmp cksums

2013-11-20 Thread Henning Brauer
make the icmp stack use the fake offload engine. prevents double cksumming in some cases and happens to fix a bug in an obscure, constructed case. Index: ip_icmp.c === RCS file: /cvs/src/sys/netinet/ip_icmp.c,v retrieving revision 1.1

Re: linebuffering diff for tr(1)

2013-11-20 Thread Jan Klemkow
On Tue, Nov 19, 2013 at 09:34:22PM +, Stuart Henderson wrote: > On 2013/11/19 14:10, Theo de Raadt wrote: > > In general, new non-standard options are bad. I know and this is my own opinion to, in general. > > Basically, if we add this someone will use it in a script. Then it will > > become