Re: [patch] armv7/imx/imxesdhc.c: add imxesdhc_dump_regs

2015-11-07 Thread Jonathan Gray
On Fri, Nov 06, 2015 at 08:04:43PM -0500, kremlin wrote: > Hello, > > This patch adds a debugging function dumping the contents of all > registers implicated in the armv7/imx specific sd/mmc controller. It > only prints if the kernel is built with option SDHC_DEBUG and a call is > inserted somewhe

[PATCH 2/2] flex 2.5.39

2015-11-07 Thread Serguey Parkhomovsky
This patch includes minor changes to files that wouldn't compile with flex 2.5.39. Index: usr.sbin/config/scan.l === RCS file: /cvs/src/usr.sbin/config/scan.l,v retrieving revision 1.22 diff -u -p -u -r1.22 scan.l --- usr.sbin/config/

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-07 Thread Michael McConville
Michael W. Bombardieri wrote: > On Thu, Nov 05, 2015 at 03:50:29PM +0100, Tobias Stoeckmann wrote: > > On Thu, Nov 05, 2015 at 09:50:48AM +, Nicholas Marriott wrote: > > > I don't know why cvs and rcs xmalloc.c has ended up so different. > > > > It's not just about cvs and rcs: > > > > /usr/s

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-07 Thread Michael W. Bombardieri
On Thu, Nov 05, 2015 at 03:50:29PM +0100, Tobias Stoeckmann wrote: > On Thu, Nov 05, 2015 at 09:50:48AM +, Nicholas Marriott wrote: > > I don't know why cvs and rcs xmalloc.c has ended up so different. > > It's not just about cvs and rcs: > > /usr/src/usr.bin/cvs/xmalloc.c > /usr/src/usr.bin/

Re: Patch 2/3 - make DIOCRDELADDRS to accept on IP address per ioctl() call

2015-11-07 Thread Alexander Bluhm
On Wed, Oct 28, 2015 at 06:21:10PM +0100, Alexandr Nedvedicky wrote: > Index: sbin/pfctl/pfctl_radix.c > === > RCS file: /cvs/src/sbin/pfctl/pfctl_radix.c,v > retrieving revision 1.32 > diff -u -p -r1.32 pfctl_radix.c > --- sbin/pfctl/

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-07 Thread Ted Unangst
Tobias Stoeckmann wrote: > Is this okay for ssh and tmux, which are out to be very portable? > Nicholas mentioned that malloc is not required to set errno. I've also > checked the standard and it's just an extension. Although at worst, > the user sees a wrong error message... Are they portable to

Re: Patch 1/3 - make DIOCRADDADDRS to accept on IP address per ioctl() call

2015-11-07 Thread Alexander Bluhm
On Wed, Oct 28, 2015 at 06:19:48PM +0100, Alexandr Nedvedicky wrote: > The idea has been proposed by Claudio at Varazdin. I guess the idea is to eliminate the workq. Or is ther naother reason to change it? Comments inline > Index: sbin/pfctl/pfctl_radix.c > =

Re: remove IF_PREPEND in src/sys/dev/pci, was Re: IFQ_PREPEND

2015-11-07 Thread David Gwynne
> On 8 Nov 2015, at 8:23 AM, Miod Vallat wrote: > >> noone has a vr? > > You can't expect people to use the crappiest Ethernet chip ever > designed. theyre in the alix, surely someone has those still. i thought le(4) was the worst.

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-07 Thread Tobias Stoeckmann
Here's an updated diff: - use "overflow" error message for snprintf and friends - use err instead of errx for out of memory conditions - if fatal() doesn't print error string, use ": %s", strerror(errno) Is this okay for ssh and tmux, which are out to be very portable? Nicholas mentioned that mal

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-07 Thread Ted Unangst
Tobias Stoeckmann wrote: > > > > > + i = vsnprintf(str, len, fmt, ap); > > > > > va_end(ap); > > > > > > > > > > - if (i == -1 || i >= (int)size) > > > > > - fatal("xsnprintf: overflow"); > > > > > + if (i < 0 || i >= (int)len) > > > > > + fatal("xsnprint

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-07 Thread Tobias Stoeckmann
On Sat, Nov 07, 2015 at 05:57:55PM -0500, Ted Unangst wrote: > > Also, I'm seeing a couple "could not allocate memory" messages added to > > *snprintf() functions. They write to a supplied buffer, no? > > Good catch. Will update that one, thanks. > > > > + i = vsnprintf(str, len, fmt, ap);

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-07 Thread Ted Unangst
Michael McConville wrote: > Nicholas Marriott wrote: > > Looks good, ok nicm > > Reviewing now, generally looks good. > > A few things: > > I don't understand the motive for all the err() -> errx() and fatal() -> > fatalx() changes. If I came across these, I probably would have > suggested the r

Re: patch saves some cycles by extending pfr_walktree() a bit

2015-11-07 Thread Alexander Bluhm
On Wed, Oct 28, 2015 at 06:08:00PM +0100, Alexandr Nedvedicky wrote: > make implementation of reference handling and further MP stuff bit easier. I agree that filling the temporary list makes transition to MP harder. > Also the patch is part of my effort to kill work queues in radix tables. For

Re: remove IF_PREPEND in src/sys/dev/pci, was Re: IFQ_PREPEND

2015-11-07 Thread Miod Vallat
> noone has a vr? You can't expect people to use the crappiest Ethernet chip ever designed.

Re: remove IF_PREPEND in src/sys/dev/pci, was Re: IFQ_PREPEND

2015-11-07 Thread David Gwynne
> On 6 Nov 2015, at 9:35 PM, David Gwynne wrote: > > On Wed, Nov 04, 2015 at 08:18:48AM +0100, Martin Pieuchot wrote: >> On 04/11/15(Wed) 10:39, David Gwynne wrote: >>> im working on making the interface send queue mpsafe. >>> >>> part of that involced deprecating the IFQ_POLL api because it al

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-07 Thread Michael McConville
Nicholas Marriott wrote: > Looks good, ok nicm Reviewing now, generally looks good. A few things: I don't understand the motive for all the err() -> errx() and fatal() -> fatalx() changes. If I came across these, I probably would have suggested the reverse. err(1, "xstrdup") is a lot cleaner tha

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-07 Thread Nicholas Marriott
Hi On Sat, Nov 07, 2015 at 04:39:09PM -0500, Michael McConville wrote: > Nicholas Marriott wrote: > > Looks good, ok nicm > > Reviewing now, generally looks good. > > A few things: > > I don't understand the motive for all the err() -> errx() and fatal() -> > fatalx() changes. If I came across

Re: __progname in base

2015-11-07 Thread Joerg Sonnenberger
On Sat, Nov 07, 2015 at 03:32:11PM +0100, Joerg Sonnenberger wrote: > As Ingo recently reminded me, OpenBSD actually did add getprogname() at > some point, which needs need a actually manual forward definition. Too early for writing. It does *not* need such an ugly manual extern declaration. Joer

Re: __progname in base

2015-11-07 Thread Joerg Sonnenberger
On Sat, Nov 07, 2015 at 12:20:42PM +0100, Tobias Stoeckmann wrote: > Index: bin/mt/mt.c > === > RCS file: /cvs/src/bin/mt/mt.c,v > retrieving revision 1.36 > diff -u -p -u -p -r1.36 mt.c > --- bin/mt/mt.c 12 Nov 2013 04:36:02 -00

__progname in base

2015-11-07 Thread Tobias Stoeckmann
Based on Todd's patch for at and cron, I did a grep through our base tree to see if there are more occurrences of self-made __progname handling. Here's the patch that fixes these cases. In newfs and newfs_ext2fs, I prevent an out-of-boundary access in case someone calls them with argv[0] set to a