libfuse: fuse.c uses Incorrect version macro

2017-11-03 Thread Helg Bredow
The fuse_version() library function incorrectly returns FUSE_USE_VERSION. This macro is intended to be used by file systems to indicate the version of the libfuse API to compile against. This change returns the highest version of the API that libfuse supports. Both macros have the same value so

Re: optind and friends are already declared

2017-11-03 Thread Jan Stary
> On Nov 03 18:34:11, h...@stare.cz wrote: > > Including when using getopt(3) also makes > > extern int opterr, optind, optopt, optreset; > > and friends declared, but many utils redeclare them again. Here is a diff for regress/ Jan Index: lib/libc/db/dbtest.c ==

Re: optind and friends are already declared

2017-11-03 Thread Jan Stary
> On Nov 03 18:34:11, h...@stare.cz wrote: > > Including when using getopt(3) also makes > > extern int opterr, optind, optopt, optreset; > > and friends declared, but many utils redeclare them again. > > > > Is there a reason for that, or can those be removed? > > As a harmless example, here's a

libfuse: fuse_loop_mt() should return -1

2017-11-03 Thread Helg Bredow
The library function fuse_loop_mt() is currently unimplemented. It should return -1 to indicate failure rather than claim success when it clearly didn't do anything useful. fuse_loop_mt() should never be called by file systems since fuse_parse_cmdline() and fuse_setup() alway return 0 as the val

Re: optind and friends are already declared

2017-11-03 Thread Jan Stary
(Sorry for the missing Subject.) On Nov 03 18:34:11, h...@stare.cz wrote: > Including when using getopt(3) also makes > extern int opterr, optind, optopt, optreset; > and friends declared, but many utils redeclare them again. > > Is there a reason for that, or can those be removed? > As a harmle

[no subject]

2017-11-03 Thread Jan Stary
Including when using getopt(3) also makes extern int opterr, optind, optopt, optreset; and friends declared, but many utils redeclare them again. Is there a reason for that, or can those be removed? As a harmless example, here's a diff to games. Jan Index: fortune/strfile/strfile.c ===

Re: inteldrm: reduce i2c busy-wait to 100us

2017-11-03 Thread joshua stein
On Wed, 11 Oct 2017 at 11:16:07 +0200, Mark Kettenis wrote: > > Date: Tue, 10 Oct 2017 15:42:26 -0500 > > From: joshua stein > > > > On my Kaby Lake laptop, running xbacklight or xrandr causes the > > audio and mouse cursor to pause briefly. This is because those > > codepaths do DRM operations

dwiic: add pci attachment

2017-11-03 Thread joshua stein
Intel 100 Series laptops have the DesignWare I2C controller attaching via PCI instead of ACPI, so move the guts of dwiic(4) into ic/ and add dwiic_acpi and dwiic_pci files. Unfortunately the PCI attachment still needs to reach into ACPI to discover client devices. There is still an issue with

xargs doesn't need to setlocale()

2017-11-03 Thread Jan Stary
It seems that xargs(1) sets LC_MESSAGE in case someone would like to give a 'y' response to xargs -p in their native tongue. Is that so, and is that intended? I never new locale(1) is also supposed to specify what "an affirmative response, ‘y’ in the POSIX locale" is, as the current manpage puts i

Re: merge nd6_rs_input() and nd6_ra_input()

2017-11-03 Thread Florian Obser
On Fri, Nov 03, 2017 at 01:37:40PM +, Martin Pieuchot wrote: > On 02/11/17(Thu) 23:25, Florian Obser wrote: > > We are processing Router Solicitation / Advertisement messages only > > for the Source Link-layer Address Options. > > Merge nd6_rs_input() and nd6_ra_input() into one generic functio

free sizes for pfkeyv2 and rtsock

2017-11-03 Thread Florian Obser
After inlining of raw_detach we know the sizes for free; pointed out by mpi. OK? diff --git pfkeyv2.c pfkeyv2.c index d0ae384aaa2..dcb66c06fe5 100644 --- pfkeyv2.c +++ pfkeyv2.c @@ -284,7 +284,7 @@ pfkeyv2_detach(struct socket *so) so->so_pcb = NULL; sofree(so); - free(&kp

Re: merge nd6_rs_input() and nd6_ra_input()

2017-11-03 Thread Martin Pieuchot
On 02/11/17(Thu) 23:25, Florian Obser wrote: > We are processing Router Solicitation / Advertisement messages only > for the Source Link-layer Address Options. > Merge nd6_rs_input() and nd6_ra_input() into one generic function. Ok, but I'd suggest a different name: nd6_rtr_cache(). I'd also sugg

Re: if_ioctl & netinet{,6}

2017-11-03 Thread Florian Obser
On Fri, Nov 03, 2017 at 12:31:42PM +, Martin Pieuchot wrote: > On 03/11/17(Fri) 13:23, Florian Obser wrote: > > On Wed, Nov 01, 2017 at 06:03:26PM +, Martin Pieuchot wrote: > > > ifioctl() contains two fallthrough paths that end up in ifp->if_ioctl(). > > > The diff below merges them. > > >

Re: if_ioctl & netinet{,6}

2017-11-03 Thread Martin Pieuchot
On 03/11/17(Fri) 13:23, Florian Obser wrote: > On Wed, Nov 01, 2017 at 06:03:26PM +, Martin Pieuchot wrote: > > ifioctl() contains two fallthrough paths that end up in ifp->if_ioctl(). > > The diff below merges them. > > > > But instead of calling ifp->if_ioctl() from inside in{,6}_ioctl(), I

Re: if_ioctl & netinet{,6}

2017-11-03 Thread Florian Obser
On Wed, Nov 01, 2017 at 06:03:26PM +, Martin Pieuchot wrote: > ifioctl() contains two fallthrough paths that end up in ifp->if_ioctl(). > The diff below merges them. > > But instead of calling ifp->if_ioctl() from inside in{,6}_ioctl(), I > changed the logic to return EOPNOTSUPP. The idea is

slaacd(8) install default routes with mpath flag

2017-11-03 Thread Florian Obser
It is possible to have multiple routers sending router advertisements, so mark the default route mpath. Comments, OKs? diff --git slaacd.c slaacd.c index 5e00cdb123c..06c11b241d5 100644 --- slaacd.c +++ slaacd.c @@ -737,7 +737,7 @@ configure_gateway(struct imsg_configure_dfr *dfr, uint8_t rtm_ty

Re: yacc: malloc+copy -> strndup()

2017-11-03 Thread Michael W. Bombardieri
On Fri, Nov 03, 2017 at 09:29:16AM +0100, Otto Moerbeek wrote: > On Fri, Nov 03, 2017 at 04:22:43PM +0800, Michael W. Bombardieri wrote: > > > On Fri, Nov 03, 2017 at 04:03:44PM +0800, Michael W. Bombardieri wrote: > > > Hello, > > > > > > In yacc the dup_line() function malloc()'ed a buffer and

Re: yacc: malloc+copy -> strndup()

2017-11-03 Thread Otto Moerbeek
On Fri, Nov 03, 2017 at 04:22:43PM +0800, Michael W. Bombardieri wrote: > On Fri, Nov 03, 2017 at 04:03:44PM +0800, Michael W. Bombardieri wrote: > > Hello, > > > > In yacc the dup_line() function malloc()'ed a buffer and copied > > a line into it. The copied line includes \n. > > Allocate-and-co

Re: yacc: malloc+copy -> strndup()

2017-11-03 Thread Michael W. Bombardieri
On Fri, Nov 03, 2017 at 04:03:44PM +0800, Michael W. Bombardieri wrote: > Hello, > > In yacc the dup_line() function malloc()'ed a buffer and copied > a line into it. The copied line includes \n. > Allocate-and-copy can be done by strndup() in one hit. > I ran this on i386 with awk/awkgram.y and r

yacc: malloc+copy -> strndup()

2017-11-03 Thread Michael W. Bombardieri
Hello, In yacc the dup_line() function malloc()'ed a buffer and copied a line into it. The copied line includes \n. Allocate-and-copy can be done by strndup() in one hit. I ran this on i386 with awk/awkgram.y and rcs/date.y and didn't see any difference in y.tab.c compared to the system's yacc. -