Re: svn commit: r314464 - head/usr.sbin/yppush

2017-02-28 Thread Ngie Cooper (yaneurabeya)

> On Feb 28, 2017, at 21:53, Rodney W. Grimes 
>  wrote:
> 
> -- Start of PGP signed section.
> [ Charset UTF-8 unsupported, converting... ]
>> 
>>> On Feb 28, 2017, at 21:38, Rodney W. Grimes 
>>>  wrote:
>>> 
>>> Would it be possible to not do this as 1000 commits?
>> 
>>  Yes, but I?m trying to do this in a way that allows me to backport all 
>> of the changes as easily as possible to ^/stable/10 (on the other side of 
>> the coin, I?ve run into dependent commits of other MFCs that required 
>> sweeping changes in order to make my changes possible).
>>  I do think your point is valid though and I can probably strike some 
>> middle ground with my changes. I think grouping it up by 2nd level directory 
>> (like I did with usr.bin/svn) makes the most sense.
>> Thank you,
> 
> Yes, that is what I was thinking.  Note that I dont agree with this change,
> but I have probably missed a discussion that is allowing it to move forward.
> It makes the logfiles of make output now src tree possition dependent,
> but I am probalby the only person in the universe that has ever run a
> diff on the output of make world.

It was much the same way before, i.e. .CURDIR was a full path. My doing this 
achieves what you described, it helps dumb tools (like Jenkins) dedupe warnings 
though, and it also makes it easier to fork/build on different components in 
the source tree (I recently embarked on joining a forked copy of syslogd at 
$work, and using SRCTOP helps me achieve that, in the sense that I don’t need 
to duplicate Makefiles).

> It may also be possible to split this into some phases to reduce some of
> your issues, only do the {.CURDIR}/../../foo -> ${SRCTOP}/bar/foo in one pass 
> and
> some of the other fixes in another pass.

Yeah. That seems reasonable (I will split it up into larger chunks).

Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r314473 - head

2017-02-28 Thread Rodney W. Grimes
> Author: imp
> Date: Wed Mar  1 05:05:05 2017
> New Revision: 314473
> URL: https://svnweb.freebsd.org/changeset/base/314473
> 
> Log:
>   Create README.md file for viewing on github.
>   
>   This is a lightly edited README using github's MARKDOWN.
>   
>   Submitted by:   Johan 
>   Pull Request:   https://github.com/freebsd/freebsd/pull/56
> 
> Added:
>   head/README.md   (contents, props changed)
> 
> Added: head/README.md
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/README.mdWed Mar  1 05:05:05 2017(r314473)
> @@ -0,0 +1,86 @@
> +FreeBSD Source:
> +---
> +This is the top level of the FreeBSD source directory.  This file  
> +was last revised on:  
> +$FreeBSD$
> +
> +For copyright information, please see the file COPYRIGHT in this  
> +directory (additional copyright information also exists for some
> +sources in this tree - please see the specific source directories for  
> +more information).
> +
> +The Makefile in this directory supports a number of targets for  
> +building components (or all) of the FreeBSD source tree.  See build(7)  
> +and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html 
>  
> +for more information, including setting make(1) variables.  
> +
> +The `buildkernel` and `installkernel` targets build and install  
> +the kernel and the modules (see below).  Please see the top of  
> +the Makefile in this directory for more information on the  
> +standard build targets and compile-time flags.
> +
> +Building a kernel is a somewhat more involved process.  See build(7), 
> config(8),  
> +and 
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html  
> +for more information.
> +
> +Note: If you want to build and install the kernel with the  
> +`buildkernel` and `installkernel` targets, you might need to build  
> +world before.  More information is available in the handbook.
> +
> +The kernel configuration files reside in the `sys//conf`  
> +sub-directory.  GENERIC is the default configuration used in release builds. 
>  
> +NOTES contains entries and documentation for all possible  
> +devices, not just those commonly used.
> +
> +
> +Source Roadmap:
> +---

Is there someway this can be a pointer to the usr/src part of
hier(7) and have hier(7) updated to reflect current reality?

Also lots and lots of trailing white space...

This should be a pointer to hier(7)

> +```
> +bin  System/user commands.
> +
> +cddl Various commands and libraries under the Common 
> Development  
> + and Distribution License.
> +
> +contrib  Packages contributed by 3rd parties.
> +
> +crypto   Cryptography stuff (see crypto/README).
> +
> +etc  Template files for /etc.
> +
> +gnu  Various commands and libraries under the GNU 
> Public License.  
> + Please see gnu/COPYING* for more information.
> +
> +include  System include files.
> +
> +kerberos5Kerberos5 (Heimdal) package.
> +
> +lib  System libraries.
> +
> +libexec  System daemons.
> +
> +release  Release building Makefile & associated tools.
> +
> +rescue   Build system for statically linked /rescue 
> utilities.
> +
> +sbin System commands.
> +
> +secure   Cryptographic libraries and commands.
> +
> +shareShared resources.
> +
> +sys  Kernel sources.
> +
> +testsRegression tests which can be run by Kyua.  See 
> tests/README
> + for additional information.
> +
> +toolsUtilities for regression testing and 
> miscellaneous tasks.
> +
> +usr.bin  User commands.
> +
> +usr.sbin System administration commands.
> +```
> +
> +For information on synchronizing your source tree with one or more of  
> +the FreeBSD Project's development branches, please see:
> +
> +   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html
> ___
> svn-src-h...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
> 

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314481 - head/sys/mips/conf

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 05:53:53 2017
New Revision: 314481
URL: https://svnweb.freebsd.org/changeset/base/314481

Log:
  Add kernel support for the TP-LINK MR3040.
  
  Submitted by: Chris Christensen 
  Pull Request: https://github.com/freebsd/freebsd/pull/38

Added:
  head/sys/mips/conf/TP-MR3040   (contents, props changed)
  head/sys/mips/conf/TP-MR3040.hints   (contents, props changed)

Added: head/sys/mips/conf/TP-MR3040
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/TP-MR3040Wed Mar  1 05:53:53 2017
(r314481)
@@ -0,0 +1,70 @@
+#
+# TP Link MR3040 - an AR9331 based SoC wifi device.
+#
+# This is for the 32 RAM/4 flash part. There is little to no
+# chance that this will ever boot FreeBSD directly from the 3.5MB
+# of flash.  The kernel can fit into the space, but userland is just
+# too big even when stripped down to its limits.
+#
+# * AR9331 SoC
+# * 32MB RAM
+# * 4MB flash
+# * Integrated 1x1 2GHz wifi and 10/100 bridge
+# * USB powered
+# * USB storage
+#
+
+# $FreeBSD$
+#
+
+#NO_UNIVERSE
+
+# Include the default AR933x parameters
+include"std.AR933X"
+
+ident  TP-MR3040
+
+# Override hints with board values
+hints  "TP-MR3040.hints"
+
+# Board memory - 32MB
+optionsAR71XX_REALMEM=(32*1024*1024)
+
+# i2c GPIO bus
+device gpioiic
+device iicbb
+device iicbus
+device iic
+
+# Options required for miiproxy and mdiobus
+optionsARGE_MDIO   # Export an MDIO bus separate from arge
+device miiproxy# MDIO bus <-> MII PHY rendezvous
+
+device etherswitch
+device arswitch
+
+# Enable the uboot environment stuff rather then the
+# redboot stuff.
+optionsAR71XX_ENV_UBOOT
+
+# uzip - to boot read-only lzma natively from flash
+device geom_uzip
+optionsGEOM_UZIP
+optionsROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\"
+
+# Used for the static uboot partition map
+device geom_map
+
+# Boot off of the rootfs, as defined in the geom_map setup.
+# Probably, this should be a USB device as the memory available
+# compressed rootfs is simply too small for FreeBSD
+#options   ROOTDEVNAME=\"ufs:map/rootfs.uncompress\"
+
+# Boot off of a uboot tftp ramdisk kernel image.  Because the flash
+# on this unit is so small, this is the only way to do dev work.
+# For full deployment, you will *have* to use a usb storage device
+# as a rootfs and use the flash to hold the kernel only.
+#options   MD_ROOT # md device usable as a potential root 
device
+#options   MD_ROOT_SIZE=10240
+#makeoptions   MFS_IMAGE=/tftpboot/mfsroot-tl-mr3040.img.ulzma
+optionsROOTDEVNAME=\"ufs:da0\"

Added: head/sys/mips/conf/TP-MR3040.hints
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/TP-MR3040.hints  Wed Mar  1 05:53:53 2017
(r314481)
@@ -0,0 +1,101 @@
+#
+# This file adds to the values in AR933X_BASE.hints
+#
+# $FreeBSD$
+
+# mdiobus on arge1
+hint.argemdio.0.at="nexus0"
+hint.argemdio.0.maddr=0x1a00
+hint.argemdio.0.msize=0x1000
+hint.argemdio.0.order=0
+
+# There's no need to set the ar933x GMAC configuration bits.
+# This just creates a switch instance and correctly uses it.
+
+# Embedded Atheros Switch
+hint.arswitch.0.at="mdio0"
+
+# XXX this should really say it's an AR933x switch, as there
+# are some vlan specific differences here!
+hint.arswitch.0.is_7240=1
+hint.arswitch.0.numphys=4
+hint.arswitch.0.phy4cpu=1  # phy 4 is a "CPU" separate PHY
+hint.arswitch.0.is_rgmii=0
+hint.arswitch.0.is_gmii=1  # arge1 <-> switch PHY is GMII
+
+# arge0 - MII, autoneg, phy(4)
+hint.arge.0.phymask=0x10   # PHY4
+hint.arge.0.mdio=mdioproxy1# .. off of the switch mdiobus
+
+# arge1 - GMII, 1000/full
+hint.arge.1.phymask=0x0# No directly mapped PHYs
+hint.arge.1.media=1000
+hint.arge.1.fduplex=1
+
+# Where the ART is - last 64k in the flash
+# 0x9fff1000 ?
+hint.ath.0.eepromaddr=0x1fff
+hint.ath.0.eepromsize=16384
+
+# The board 16MiB flash layout in uboot env:
+#
+# 256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART)
+
+# However, it boots from 0x9f05, which is the front of the flsah!
+# Thus the kernel/rootfs are switched around.
+
+# 256KB
+hint.map.0.at="flash/spi0"
+hint.map.0.start=0x
+hint.map.0.end=0x0004
+hint.map.0.name="uboot"
+hint.map.0.readonly=1
+
+# 64KB
+hint.map.1.at="flash/spi0"
+hint.map.1.start=0x0004
+hint.map.1.end=0x0005
+hint.map.1.name="uboot-env"
+hint.map.1.readonly=0
+
+# 2752KB
+hint.map.2.at="flash/spi0"
+hint.map.2.start=0x0005
+hint.map.2.end="search:0x0010:0x1:.!/bin/sh"
+hint.map.2.name="kernel"
+hint.map.2.readonly=0
+
+# 896KB
+hint.map.3.at="flash/spi0"
+hint.map.3.start="search:0x0010:0x1:.!/bin/sh"
+hint.map.3.end=0x003e
+hint.

Re: svn commit: r314464 - head/usr.sbin/yppush

2017-02-28 Thread Rodney W. Grimes
-- Start of PGP signed section.
[ Charset UTF-8 unsupported, converting... ]
> 
> > On Feb 28, 2017, at 21:38, Rodney W. Grimes 
> >  wrote:
> > 
> > Would it be possible to not do this as 1000 commits?
> 
>   Yes, but I?m trying to do this in a way that allows me to backport all 
> of the changes as easily as possible to ^/stable/10 (on the other side of the 
> coin, I?ve run into dependent commits of other MFCs that required sweeping 
> changes in order to make my changes possible).
>   I do think your point is valid though and I can probably strike some 
> middle ground with my changes. I think grouping it up by 2nd level directory 
> (like I did with usr.bin/svn) makes the most sense.
> Thank you,

Yes, that is what I was thinking.  Note that I dont agree with this change,
but I have probably missed a discussion that is allowing it to move forward.
It makes the logfiles of make output now src tree possition dependent,
but I am probalby the only person in the universe that has ever run a
diff on the output of make world.

It may also be possible to split this into some phases to reduce some of
your issues, only do the {.CURDIR}/../../foo -> ${SRCTOP}/bar/foo in one pass 
and
some of the other fixes in another pass.


-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314480 - head/sys/net

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 05:38:04 2017
New Revision: 314480
URL: https://svnweb.freebsd.org/changeset/base/314480

Log:
  Back out r314471. In https://reviews.freebsd.org/D1858 it was clear
  that this shouldn't go in. I was unaware when I merged the pull
  request. I don't wish to upset the status quo, so backout per
  project practice.
  
  Pull Request: https://github.com/freebsd/freebsd/pull/92
  Noted by: hrs@

Modified:
  head/sys/net/if_epair.c

Modified: head/sys/net/if_epair.c
==
--- head/sys/net/if_epair.c Wed Mar  1 05:21:21 2017(r314479)
+++ head/sys/net/if_epair.c Wed Mar  1 05:38:04 2017(r314480)
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -725,7 +724,6 @@ epair_clone_create(struct if_clone *ifc,
ifp = scb->ifp;
/* Assign a hopefully unique, locally administered etheraddr. */
eaddr[0] = 0x02;
-   eaddr[1] = arc4random() & 0xff;
eaddr[3] = (ifp->if_index >> 8) & 0xff;
eaddr[4] = ifp->if_index & 0xff;
eaddr[5] = 0x0b;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314464 - head/usr.sbin/yppush

2017-02-28 Thread Ngie Cooper (yaneurabeya)

> On Feb 28, 2017, at 21:38, Rodney W. Grimes 
>  wrote:
> 
> Would it be possible to not do this as 1000 commits?

Yes, but I’m trying to do this in a way that allows me to backport all 
of the changes as easily as possible to ^/stable/10 (on the other side of the 
coin, I’ve run into dependent commits of other MFCs that required sweeping 
changes in order to make my changes possible).
I do think your point is valid though and I can probably strike some 
middle ground with my changes. I think grouping it up by 2nd level directory 
(like I did with usr.bin/svn) makes the most sense.
Thank you,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r314464 - head/usr.sbin/yppush

2017-02-28 Thread Rodney W. Grimes
Would it be possible to not do this as 1000 commits?

> Author: ngie
> Date: Wed Mar  1 04:24:24 2017
> New Revision: 314464
> URL: https://svnweb.freebsd.org/changeset/base/314464
> 
> Log:
>   Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
> ones
>   
>   This simplifies pathing in make/displayed output.
>   
>   MFC after:  1 week
>   Sponsored by:   Dell EMC Isilon
> 
> Modified:
>   head/usr.sbin/yppush/Makefile
> 
> Modified: head/usr.sbin/yppush/Makefile
> ==
> --- head/usr.sbin/yppush/Makefile Wed Mar  1 04:23:53 2017
> (r314463)
> +++ head/usr.sbin/yppush/Makefile Wed Mar  1 04:24:24 2017
> (r314464)
> @@ -1,8 +1,7 @@
>  # $FreeBSD$
>  
> -RPCDIR=  ${.CURDIR}/../../include/rpcsvc
> -.PATH: ${RPCDIR} ${.CURDIR}/../../usr.sbin/ypserv \
> -   ${.CURDIR}/../../libexec/ypxfr
> +RPCDIR=  ${SRCTOP}/include/rpcsvc
> +.PATH: ${RPCDIR} ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr
>  
>  PROG=yppush
>  MAN= yppush.8
> @@ -10,7 +9,7 @@ SRCS=ypxfr_getmap.c yp_dblookup.c yp_er
>   ${GENSRCS}
>  GENSRCS=yp.h yp_clnt.c yppush_svc.c
>  
> -CFLAGS+= -I. -I${.CURDIR}/../../libexec/ypxfr
> +CFLAGS+= -I. -I${SRCTOP}/libexec/ypxfr
>  
>  WARNS?=  2
>  
> ___
> svn-src-h...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
> 

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314473 - head

2017-02-28 Thread Warner Losh
On Tue, Feb 28, 2017 at 10:13 PM, Ngie Cooper (yaneurabeya)
 wrote:
>
>> On Feb 28, 2017, at 21:05, Warner Losh  wrote:
>>
>> Author: imp
>> Date: Wed Mar  1 05:05:05 2017
>> New Revision: 314473
>> URL: https://svnweb.freebsd.org/changeset/base/314473
>>
>> Log:
>>  Create README.md file for viewing on github.
>>
>>  This is a lightly edited README using github's MARKDOWN.
>>
>>  Submitted by:Johan 
>>  Pull Request:https://github.com/freebsd/freebsd/pull/56
>
> Cool! Would it make sense to refer to the other file? Also, this 
> might make it a bit interesting for projects that fork FreeBSD and hack on it 
> when doing future merges, but that’s a caveat that those projects will have 
> to deal with when the time comes to merge this in.

Don't know what's best... That's a good question. I'm inclined to
leave it alone for now...

Warner
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r314471 - head/sys/net

2017-02-28 Thread Hiroki Sato
Warner Losh  wrote
  in <201703010447.v214lm4c026...@repo.freebsd.org>:

im> Author: imp
im> Date: Wed Mar  1 04:47:22 2017
im> New Revision: 314471
im> URL: https://svnweb.freebsd.org/changeset/base/314471
im>
im> Log:
im>   Fix VNET - DAD detected duplicate IPv6 address
im>
im>   Assign a hopefully unique, locally administered etheraddr. - for
im>   epairNa & epairNb
im>
im>   Submitted by: Catalin 
im>   Pull Request: https://github.com/freebsd/freebsd/pull/92

 This was discussed in D1858.  epairNa and epairNb never have the same
 L2 addr because eaddr[5] is unique.  If the goal of this change is to
 prevent a conflict of L2 addrs with epairNs created in another vnet
 jail on the same system or on the same network, eaddr[5] of epairNa
 (around l.839) must also be randomized at least.

 While I am still for a deterministic value because changing the L2
 addr every time when rebooting a vnet jail is annoying, but if we use
 some random numbers for the vendor bits, I think eaddr[2] should be
 initialized in the same way.

-- Hiroki


pgpNekCoBbJhf.pgp
Description: PGP signature


Re: svn commit: r314471 - head/sys/net

2017-02-28 Thread Warner Losh
On Tue, Feb 28, 2017 at 10:18 PM, Hiroki Sato  wrote:
> Warner Losh  wrote
>   in <201703010447.v214lm4c026...@repo.freebsd.org>:
>
> im> Author: imp
> im> Date: Wed Mar  1 04:47:22 2017
> im> New Revision: 314471
> im> URL: https://svnweb.freebsd.org/changeset/base/314471
> im>
> im> Log:
> im>   Fix VNET - DAD detected duplicate IPv6 address
> im>
> im>   Assign a hopefully unique, locally administered etheraddr. - for
> im>   epairNa & epairNb
> im>
> im>   Submitted by: Catalin 
> im>   Pull Request: https://github.com/freebsd/freebsd/pull/92
>
>  This was discussed in D1858.  epairNa and epairNb never have the same
>  L2 addr because eaddr[5] is unique.  If the goal of this change is to
>  prevent a conflict of L2 addrs with epairNs created in another vnet
>  jail on the same system or on the same network, eaddr[5] of epairNa
>  (around l.839) must also be randomized at least.
>
>  While I am still for a deterministic value because changing the L2
>  addr every time when rebooting a vnet jail is annoying, but if we use
>  some random numbers for the vendor bits, I think eaddr[2] should be
>  initialized in the same way.

It's clear the consensus there was 'no go' and I don't wish to
override it. I didn't know about that, so I'll revert.

Warner
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314478 - in head/usr.sbin/ntp: libntp ntpdate ntpdc ntpq

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 05:19:35 2017
New Revision: 314478
URL: https://svnweb.freebsd.org/changeset/base/314478

Log:
  Simplify idioms in Makefiles further
  
  - Use SRCTOP-relative paths instead of .CURDIR-relative ones where possible
  - Use :H to manipulate .CURDIR in areas instead of ..-relative paths.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/ntp/libntp/Makefile
  head/usr.sbin/ntp/ntpdate/Makefile
  head/usr.sbin/ntp/ntpdc/Makefile
  head/usr.sbin/ntp/ntpq/Makefile

Modified: head/usr.sbin/ntp/libntp/Makefile
==
--- head/usr.sbin/ntp/libntp/Makefile   Wed Mar  1 05:18:43 2017
(r314477)
+++ head/usr.sbin/ntp/libntp/Makefile   Wed Mar  1 05:19:35 2017
(r314478)
@@ -73,14 +73,14 @@ ISC_SRCS= assertions.c \
 
 SRCS=  ${NTP_SRCS} ${ISC_SRCS} version.c
 
-CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include \
-   -I${.CURDIR}/../../../contrib/ntp/lib/isc/include \
-   -I${.CURDIR}/../../../contrib/ntp/lib/isc/unix/include \
-   -I${.CURDIR}/../../../contrib/ntp/lib/isc/pthreads/include \
-   -I${.CURDIR}/../../../contrib/ntp/sntp/libopts \
-   -I${.CURDIR}/../../../lib/libc/${MACHINE_ARCH} \
-   -I${.CURDIR}/../../../lib/libedit/edit \
-   -I${.CURDIR}/../ \
+CFLAGS+= -I${SRCTOP}/contrib/ntp/include \
+   -I${SRCTOP}/contrib/ntp/lib/isc/include \
+   -I${SRCTOP}/contrib/ntp/lib/isc/unix/include \
+   -I${SRCTOP}/contrib/ntp/lib/isc/pthreads/include \
+   -I${SRCTOP}/contrib/ntp/sntp/libopts \
+   -I${SRCTOP}/lib/libc/${MACHINE_ARCH} \
+   -I${SRCTOP}/lib/libedit/edit \
+   -I${.CURDIR:H} \
-I${.CURDIR}/
 
 CFLAGS+= -DHAVE_BSD_NICE -DHAVE_STDINT_H
@@ -88,6 +88,6 @@ CFLAGS+= -DHAVE_BSD_NICE -DHAVE_STDINT_H
 CLEANFILES+= .version version.c
 
 version.c:
-   sh -e ${.CURDIR}/../scripts/mkver ntpd
+   sh -e ${.CURDIR:H}/scripts/mkver ntpd
 
 .include 

Modified: head/usr.sbin/ntp/ntpdate/Makefile
==
--- head/usr.sbin/ntp/ntpdate/Makefile  Wed Mar  1 05:18:43 2017
(r314477)
+++ head/usr.sbin/ntp/ntpdate/Makefile  Wed Mar  1 05:19:35 2017
(r314478)
@@ -24,7 +24,7 @@ LIBADD+=  md
 
 CLEANFILES+= .version version.c
 
-version.c: 
-   sh -e ${.CURDIR}/../scripts/mkver ntpdate
+version.c:
+   sh -e ${.CURDIR:H}/scripts/mkver ntpdate
 
 .include 

Modified: head/usr.sbin/ntp/ntpdc/Makefile
==
--- head/usr.sbin/ntp/ntpdc/MakefileWed Mar  1 05:18:43 2017
(r314477)
+++ head/usr.sbin/ntp/ntpdc/MakefileWed Mar  1 05:19:35 2017
(r314478)
@@ -30,6 +30,6 @@ LIBADD+=  md
 CLEANFILES+= .version version.c
 
 version.c:
-   sh -e ${.CURDIR}/../scripts/mkver ntpdc
+   sh -e ${.CURDIR:H}/scripts/mkver ntpdc
 
 .include 

Modified: head/usr.sbin/ntp/ntpq/Makefile
==
--- head/usr.sbin/ntp/ntpq/Makefile Wed Mar  1 05:18:43 2017
(r314477)
+++ head/usr.sbin/ntp/ntpq/Makefile Wed Mar  1 05:19:35 2017
(r314478)
@@ -34,6 +34,6 @@ CFLAGS+=  -DHAVE_LIBEDIT -DHAVE_READLINE_
 CLEANFILES+= .version version.c
 
 version.c:
-   sh -e ${.CURDIR}/../scripts/mkver ntpq
+   sh -e ${.CURDIR:H}/scripts/mkver ntpq
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314479 - in head/usr.sbin/fifolog: fifolog_create fifolog_reader fifolog_writer

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 05:21:21 2017
New Revision: 314479
URL: https://svnweb.freebsd.org/changeset/base/314479

Log:
  Use :H to manipulate .CURDIR-relative paths instead of ../
  
  This simplifies make output
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/fifolog/fifolog_create/Makefile
  head/usr.sbin/fifolog/fifolog_reader/Makefile
  head/usr.sbin/fifolog/fifolog_writer/Makefile

Modified: head/usr.sbin/fifolog/fifolog_create/Makefile
==
--- head/usr.sbin/fifolog/fifolog_create/Makefile   Wed Mar  1 05:19:35 
2017(r314478)
+++ head/usr.sbin/fifolog/fifolog_create/Makefile   Wed Mar  1 05:21:21 
2017(r314479)
@@ -2,7 +2,7 @@
 
 PROG=  fifolog_create
 
-CFLAGS+= -I${.CURDIR}/../lib
+CFLAGS+= -I${.CURDIR:H}/lib
 
 LIBADD=util fifolog
 

Modified: head/usr.sbin/fifolog/fifolog_reader/Makefile
==
--- head/usr.sbin/fifolog/fifolog_reader/Makefile   Wed Mar  1 05:19:35 
2017(r314478)
+++ head/usr.sbin/fifolog/fifolog_reader/Makefile   Wed Mar  1 05:21:21 
2017(r314479)
@@ -2,7 +2,7 @@
 
 PROG=  fifolog_reader
 
-CFLAGS+= -I${.CURDIR}/../lib
+CFLAGS+= -I${.CURDIR:H}/lib
 
 MAN=
 

Modified: head/usr.sbin/fifolog/fifolog_writer/Makefile
==
--- head/usr.sbin/fifolog/fifolog_writer/Makefile   Wed Mar  1 05:19:35 
2017(r314478)
+++ head/usr.sbin/fifolog/fifolog_writer/Makefile   Wed Mar  1 05:21:21 
2017(r314479)
@@ -2,7 +2,7 @@
 
 PROG=  fifolog_writer
 
-CFLAGS+= -I${.CURDIR}/../lib
+CFLAGS+= -I${.CURDIR:H}/lib
 
 MAN=
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314477 - head/sys/dev/ichwd

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 05:18:43 2017
New Revision: 314477
URL: https://svnweb.freebsd.org/changeset/base/314477

Log:
  Fixed TCO v3 tick convert
  
  TCO v3's internal timer is stored as seconds.
  
  Submitted by: Denir Li 
  Pull Request: https://github.com/freebsd/freebsd/pull/51
  Pull Request: https://github.com/freebsd/freebsd/pull/52

Modified:
  head/sys/dev/ichwd/ichwd.c
  head/sys/dev/ichwd/ichwd.h

Modified: head/sys/dev/ichwd/ichwd.c
==
--- head/sys/dev/ichwd/ichwd.c  Wed Mar  1 05:18:22 2017(r314476)
+++ head/sys/dev/ichwd/ichwd.c  Wed Mar  1 05:18:43 2017(r314477)
@@ -512,7 +512,13 @@ ichwd_event(void *arg, unsigned int cmd,
 
/* convert from power-of-two-ns to WDT ticks */
cmd &= WD_INTERVAL;
-   timeout = ((uint64_t)1 << cmd) / ICHWD_TICK;
+   
+   if (sc->tco_version == 3) {
+   timeout = ((uint64_t)1 << cmd) / ICHWD_TCO_V3_TICK;
+   } else {
+   timeout = ((uint64_t)1 << cmd) / ICHWD_TICK;
+   }
+   
if (cmd) {
if (!sc->active)
ichwd_tmr_enable(sc);

Modified: head/sys/dev/ichwd/ichwd.h
==
--- head/sys/dev/ichwd/ichwd.h  Wed Mar  1 05:18:22 2017(r314476)
+++ head/sys/dev/ichwd/ichwd.h  Wed Mar  1 05:18:43 2017(r314477)
@@ -345,7 +345,9 @@ struct ichwd_softc {
 #define TCO_RLD1_TMR_MAX   0x003f
 #define TCO_RLD2_TMR_MAX   0x03ff
 
-/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) */
+/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) for TCO 
v1/v2 */
 #define ICHWD_TICK 6
+/* approximate length in nanoseconds of one WDT tick (about 1.0 sec) for TCO 
v3 */
+#define ICHWD_TCO_V3_TICK  10
 
 #endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314476 - head/sys/sys

2017-02-28 Thread Mateusz Guzik
Author: mjg
Date: Wed Mar  1 05:18:22 2017
New Revision: 314476
URL: https://svnweb.freebsd.org/changeset/base/314476

Log:
  locks: fix compilation with KTR wihout KTR_LOCKS
  
  While here wrap the overly long line.
  
  Reported by:  np

Modified:
  head/sys/sys/lock.h

Modified: head/sys/sys/lock.h
==
--- head/sys/sys/lock.h Wed Mar  1 05:14:45 2017(r314475)
+++ head/sys/sys/lock.h Wed Mar  1 05:18:22 2017(r314476)
@@ -125,7 +125,8 @@ struct lock_class {
  * calling conventions for this debugging code in modules so that modules can
  * work with both debug and non-debug kernels.
  */
-#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || 
defined(INVARIANT_SUPPORT) || defined(LOCK_PROFILING) || (defined(KTR) && 
(KTR_COMPILE & KTR_LOCK))
+#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || \
+defined(INVARIANT_SUPPORT) || defined(LOCK_PROFILING) || defined(KTR)
 #defineLOCK_DEBUG  1
 #else
 #defineLOCK_DEBUG  0
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314475 - in head/usr.sbin/lpr: chkprintcap filters filters.ru/koi2855 filters.ru/koi2alt lpc lpd lpq lpr lprm lptest pac

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 05:14:45 2017
New Revision: 314475
URL: https://svnweb.freebsd.org/changeset/base/314475

Log:
  Simplify idioms in usr.sbin/lpr Makefiles
  
  Use :H instead of .CURDIR-relative pathing to simplify make output, etc.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/lpr/chkprintcap/Makefile
  head/usr.sbin/lpr/filters.ru/koi2855/Makefile
  head/usr.sbin/lpr/filters.ru/koi2alt/Makefile
  head/usr.sbin/lpr/filters/Makefile
  head/usr.sbin/lpr/lpc/Makefile
  head/usr.sbin/lpr/lpd/Makefile
  head/usr.sbin/lpr/lpq/Makefile
  head/usr.sbin/lpr/lpr/Makefile
  head/usr.sbin/lpr/lprm/Makefile
  head/usr.sbin/lpr/lptest/Makefile
  head/usr.sbin/lpr/pac/Makefile

Modified: head/usr.sbin/lpr/chkprintcap/Makefile
==
--- head/usr.sbin/lpr/chkprintcap/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/chkprintcap/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -1,12 +1,12 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../common_source
+.PATH: ${.CURDIR:H}/common_source
 
 PROG=  chkprintcap
 MAN=   chkprintcap.8
 SRCS=  chkprintcap.c skimprintcap.c
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 LIBADD=lpr
 

Modified: head/usr.sbin/lpr/filters.ru/koi2855/Makefile
==
--- head/usr.sbin/lpr/filters.ru/koi2855/Makefile   Wed Mar  1 05:06:21 
2017(r314474)
+++ head/usr.sbin/lpr/filters.ru/koi2855/Makefile   Wed Mar  1 05:14:45 
2017(r314475)
@@ -3,6 +3,6 @@
 PROG=  koi2855
 MAN=
 
-CFLAGS+= -I${.CURDIR}/../../common_source
+CFLAGS+= -I${.CURDIR:H:H}/common_source
 
 .include 

Modified: head/usr.sbin/lpr/filters.ru/koi2alt/Makefile
==
--- head/usr.sbin/lpr/filters.ru/koi2alt/Makefile   Wed Mar  1 05:06:21 
2017(r314474)
+++ head/usr.sbin/lpr/filters.ru/koi2alt/Makefile   Wed Mar  1 05:14:45 
2017(r314475)
@@ -3,6 +3,6 @@
 PROG=  koi2alt
 MAN=
 
-CFLAGS+= -I${.CURDIR}/../../common_source
+CFLAGS+= -I${.CURDIR:H:H}/common_source
 
 .include 

Modified: head/usr.sbin/lpr/filters/Makefile
==
--- head/usr.sbin/lpr/filters/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/filters/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -6,6 +6,6 @@ BINDIR= ${LIBEXECDIR}/lpr
 PROG=  lpf
 MAN=
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 .include 

Modified: head/usr.sbin/lpr/lpc/Makefile
==
--- head/usr.sbin/lpr/lpc/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/lpc/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -1,7 +1,7 @@
 #  From: @(#)Makefile  8.1 (Berkeley) 6/6/93
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../common_source
+.PATH: ${.CURDIR:H}/common_source
 
 PROG=  lpc
 MAN=   lpc.8
@@ -9,7 +9,7 @@ SRCS=   lpc.c cmds.c cmdtab.c movejobs.c
 BINGRP=daemon
 BINMODE= 2555
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 WARNS?=0
 

Modified: head/usr.sbin/lpr/lpd/Makefile
==
--- head/usr.sbin/lpr/lpd/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/lpd/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -5,7 +5,7 @@ PROG=   lpd
 MAN=   lpd.8
 SRCS=  lpd.c printjob.c recvjob.c lpdchar.c modes.c
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 WARNS?=1
 

Modified: head/usr.sbin/lpr/lpq/Makefile
==
--- head/usr.sbin/lpr/lpq/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/lpq/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -8,7 +8,7 @@ BINOWN= root
 BINGRP=daemon
 BINMODE= 6555
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 LIBADD=lpr
 

Modified: head/usr.sbin/lpr/lpr/Makefile
==
--- head/usr.sbin/lpr/lpr/Makefile  Wed Mar  1 05:06:21 2017
(r314474)
+++ head/usr.sbin/lpr/lpr/Makefile  Wed Mar  1 05:14:45 2017
(r314475)
@@ -1,7 +1,7 @@
 #  From: @(#)Makefile  8.1 (Berkeley) 6/6/93
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../common_source
+.PATH: ${.CURDIR:H}/common_source
 
 BINDIR=/usr/bin
 
@@ -11,7 +11,7 @@ BINOWN=   root
 BINGRP=daemon
 BINMODE= 6555
 
-CFLAGS+= -I${.CURDIR}/../common_source
+CFLAGS+= -I${.CURDIR:H}/common_source
 
 WARNS?=2
 

Modified: head/usr.sbi

Re: svn commit: r314473 - head

2017-02-28 Thread Ngie Cooper (yaneurabeya)

> On Feb 28, 2017, at 21:05, Warner Losh  wrote:
> 
> Author: imp
> Date: Wed Mar  1 05:05:05 2017
> New Revision: 314473
> URL: https://svnweb.freebsd.org/changeset/base/314473
> 
> Log:
>  Create README.md file for viewing on github.
> 
>  This is a lightly edited README using github's MARKDOWN.
> 
>  Submitted by:Johan 
>  Pull Request:https://github.com/freebsd/freebsd/pull/56

Cool! Would it make sense to refer to the other file? Also, this might 
make it a bit interesting for projects that fork FreeBSD and hack on it when 
doing future merges, but that’s a caveat that those projects will have to deal 
with when the time comes to merge this in.
Thanks!
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r314474 - in head/sys: kern sys

2017-02-28 Thread Mateusz Guzik
Author: mjg
Date: Wed Mar  1 05:06:21 2017
New Revision: 314474
URL: https://svnweb.freebsd.org/changeset/base/314474

Log:
  locks: ensure proper barriers are used with atomic ops when necessary
  
  Unclear how, but the locking routine for mutexes was using the *release*
  barrier instead of acquire. This must have been either a copy-pasto or bad
  completion.
  
  Going through other uses of atomics shows no barriers in:
  - upgrade routines (addressed in this patch)
  - sections protected with turnstile locks - this should be fine as necessary
barriers are in the worst case provided by turnstile unlock
  
  I would like to thank Mark Millard and andreast@ for reporting the problem and
  testing previous patches before the issue got identified.
  
  ps.
.-'---`-.
  ,'  `.
  | \
  |  \
  \   _  \
  ,\  _,'-,/-)\
  ( * \ \,' ,' ,'-)
   `._,) -',-')
 \/ ''/
  )/ /
 /   ,'-'
  
  Hardware provided by: IBM LTC

Modified:
  head/sys/kern/kern_rwlock.c
  head/sys/kern/kern_sx.c
  head/sys/sys/mutex.h

Modified: head/sys/kern/kern_rwlock.c
==
--- head/sys/kern/kern_rwlock.c Wed Mar  1 05:05:05 2017(r314473)
+++ head/sys/kern/kern_rwlock.c Wed Mar  1 05:06:21 2017(r314474)
@@ -1151,7 +1151,7 @@ __rw_try_upgrade(volatile uintptr_t *c, 
if (RW_READERS(v) > 1)
break;
if (!(v & RW_LOCK_WAITERS)) {
-   success = atomic_cmpset_ptr(&rw->rw_lock, v, tid);
+   success = atomic_cmpset_acq_ptr(&rw->rw_lock, v, tid);
if (!success)
continue;
break;

Modified: head/sys/kern/kern_sx.c
==
--- head/sys/kern/kern_sx.c Wed Mar  1 05:05:05 2017(r314473)
+++ head/sys/kern/kern_sx.c Wed Mar  1 05:06:21 2017(r314474)
@@ -410,7 +410,7 @@ sx_try_upgrade_(struct sx *sx, const cha
 * we will wake up the exclusive waiters when we drop the lock.
 */
x = sx->sx_lock & SX_LOCK_EXCLUSIVE_WAITERS;
-   success = atomic_cmpset_ptr(&sx->sx_lock, SX_SHARERS_LOCK(1) | x,
+   success = atomic_cmpset_acq_ptr(&sx->sx_lock, SX_SHARERS_LOCK(1) | x,
(uintptr_t)curthread | x);
LOCK_LOG_TRY("XUPGRADE", &sx->lock_object, 0, success, file, line);
if (success) {

Modified: head/sys/sys/mutex.h
==
--- head/sys/sys/mutex.hWed Mar  1 05:05:05 2017(r314473)
+++ head/sys/sys/mutex.hWed Mar  1 05:06:21 2017(r314474)
@@ -185,7 +185,7 @@ voidthread_lock_flags_(struct thread *,
atomic_cmpset_acq_ptr(&(mp)->mtx_lock, MTX_UNOWNED, (tid))
 
 #define _mtx_obtain_lock_fetch(mp, vp, tid)\
-   atomic_fcmpset_rel_ptr(&(mp)->mtx_lock, vp, (tid))
+   atomic_fcmpset_acq_ptr(&(mp)->mtx_lock, vp, (tid))
 
 /* Try to release mtx_lock if it is unrecursed and uncontested. */
 #define _mtx_release_lock(mp, tid) \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314473 - head

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 05:05:05 2017
New Revision: 314473
URL: https://svnweb.freebsd.org/changeset/base/314473

Log:
  Create README.md file for viewing on github.
  
  This is a lightly edited README using github's MARKDOWN.
  
  Submitted by: Johan 
  Pull Request: https://github.com/freebsd/freebsd/pull/56

Added:
  head/README.md   (contents, props changed)

Added: head/README.md
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/README.md  Wed Mar  1 05:05:05 2017(r314473)
@@ -0,0 +1,86 @@
+FreeBSD Source:
+---
+This is the top level of the FreeBSD source directory.  This file  
+was last revised on:  
+$FreeBSD$
+
+For copyright information, please see the file COPYRIGHT in this  
+directory (additional copyright information also exists for some
+sources in this tree - please see the specific source directories for  
+more information).
+
+The Makefile in this directory supports a number of targets for  
+building components (or all) of the FreeBSD source tree.  See build(7)  
+and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html  
+for more information, including setting make(1) variables.  
+
+The `buildkernel` and `installkernel` targets build and install  
+the kernel and the modules (see below).  Please see the top of  
+the Makefile in this directory for more information on the  
+standard build targets and compile-time flags.
+
+Building a kernel is a somewhat more involved process.  See build(7), 
config(8),  
+and 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html  
+for more information.
+
+Note: If you want to build and install the kernel with the  
+`buildkernel` and `installkernel` targets, you might need to build  
+world before.  More information is available in the handbook.
+
+The kernel configuration files reside in the `sys//conf`  
+sub-directory.  GENERIC is the default configuration used in release builds.  
+NOTES contains entries and documentation for all possible  
+devices, not just those commonly used.
+
+
+Source Roadmap:
+---
+```
+binSystem/user commands.
+
+cddl   Various commands and libraries under the Common 
Development  
+   and Distribution License.
+
+contribPackages contributed by 3rd parties.
+
+crypto Cryptography stuff (see crypto/README).
+
+etcTemplate files for /etc.
+
+gnuVarious commands and libraries under the GNU 
Public License.  
+   Please see gnu/COPYING* for more information.
+
+includeSystem include files.
+
+kerberos5  Kerberos5 (Heimdal) package.
+
+libSystem libraries.
+
+libexecSystem daemons.
+
+releaseRelease building Makefile & associated tools.
+
+rescue Build system for statically linked /rescue utilities.
+
+sbin   System commands.
+
+secure Cryptographic libraries and commands.
+
+share  Shared resources.
+
+sysKernel sources.
+
+tests  Regression tests which can be run by Kyua.  See 
tests/README
+   for additional information.
+
+tools  Utilities for regression testing and miscellaneous 
tasks.
+
+usr.binUser commands.
+
+usr.sbin   System administration commands.
+```
+
+For information on synchronizing your source tree with one or more of  
+the FreeBSD Project's development branches, please see:
+
+   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314472 - in head/usr.sbin/ntp: doc doc/drivers doc/drivers/icons doc/drivers/scripts doc/hints doc/icons doc/pic doc/scripts libntp libntpevent libopts libparse ntp-keygen ntpd ntpdate...

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:54:06 2017
New Revision: 314472
URL: https://svnweb.freebsd.org/changeset/base/314472

Log:
  Simplify/improve idioms in usr.sbin/ntp Makefiles
  
  - Use SRCTOP-relative paths to other directories instead of
.CURDIR-relative ones. This simplifies pathing in make/displayed output.
  - Also, use :H where possible/sensical to manipulate .CURDIR-relative
paths
  - Remove superfluous bsd.own.mk .includes which are already handled via
src.opts.mk .includes
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/ntp/doc/Makefile
  head/usr.sbin/ntp/doc/drivers/Makefile
  head/usr.sbin/ntp/doc/drivers/icons/Makefile
  head/usr.sbin/ntp/doc/drivers/scripts/Makefile
  head/usr.sbin/ntp/doc/hints/Makefile
  head/usr.sbin/ntp/doc/icons/Makefile
  head/usr.sbin/ntp/doc/pic/Makefile
  head/usr.sbin/ntp/doc/scripts/Makefile
  head/usr.sbin/ntp/libntp/Makefile
  head/usr.sbin/ntp/libntpevent/Makefile
  head/usr.sbin/ntp/libopts/Makefile
  head/usr.sbin/ntp/libparse/Makefile
  head/usr.sbin/ntp/ntp-keygen/Makefile
  head/usr.sbin/ntp/ntpd/Makefile
  head/usr.sbin/ntp/ntpdate/Makefile
  head/usr.sbin/ntp/ntpdc/Makefile
  head/usr.sbin/ntp/ntpq/Makefile
  head/usr.sbin/ntp/ntptime/Makefile
  head/usr.sbin/ntp/sntp/Makefile

Modified: head/usr.sbin/ntp/doc/Makefile
==
--- head/usr.sbin/ntp/doc/Makefile  Wed Mar  1 04:47:22 2017
(r314471)
+++ head/usr.sbin/ntp/doc/Makefile  Wed Mar  1 04:54:06 2017
(r314472)
@@ -25,10 +25,9 @@ FILES=   access.html accopt.html assoc.htm
 MAN=   ntp.conf.5 ntp.keys.5
 MAN+=  ntp-keygen.8 ntpd.8 ntpdate.8 ntpdc.8 ntpq.8 ntptime.8 sntp.8
 
-.PATH: ${.CURDIR}/../../../contrib/ntp/html \
-   ${.CURDIR}/../../../contrib/ntp/util \
-   ${.CURDIR}/../../../contrib/ntp/util \
-   ${.CURDIR}/../../../contrib/ntp/ntpd \
-   ${.CURDIR}/../../../contrib/ntp/ntpsnmpd
+.PATH: ${SRCTOP}/contrib/ntp/html \
+   ${SRCTOP}/contrib/ntp/util \
+   ${SRCTOP}/contrib/ntp/ntpd \
+   ${SRCTOP}/contrib/ntp/ntpsnmpd
 
 .include 

Modified: head/usr.sbin/ntp/doc/drivers/Makefile
==
--- head/usr.sbin/ntp/doc/drivers/Makefile  Wed Mar  1 04:47:22 2017
(r314471)
+++ head/usr.sbin/ntp/doc/drivers/Makefile  Wed Mar  1 04:54:06 2017
(r314472)
@@ -16,6 +16,6 @@ FILES=driver1.html driver10.html driver
driver9.html mx4200data.html oncore-shmem.html tf582_4.html
 .endif
 
-.PATH: ${.CURDIR}/../../../../contrib/ntp/html/drivers
+.PATH: ${SRCTOP}/contrib/ntp/html/drivers
 
 .include 

Modified: head/usr.sbin/ntp/doc/drivers/icons/Makefile
==
--- head/usr.sbin/ntp/doc/drivers/icons/MakefileWed Mar  1 04:47:22 
2017(r314471)
+++ head/usr.sbin/ntp/doc/drivers/icons/MakefileWed Mar  1 04:54:06 
2017(r314472)
@@ -8,6 +8,6 @@ FILESDIR=   ${SHAREDIR}/doc/ntp/drivers/ic
 FILES= home.gif mail2.gif
 .endif
 
-.PATH: ${.CURDIR}/../../../../../contrib/ntp/html/drivers/icons
+.PATH: ${SRCTOP}/contrib/ntp/html/drivers/icons
 
 .include 

Modified: head/usr.sbin/ntp/doc/drivers/scripts/Makefile
==
--- head/usr.sbin/ntp/doc/drivers/scripts/Makefile  Wed Mar  1 04:47:22 
2017(r314471)
+++ head/usr.sbin/ntp/doc/drivers/scripts/Makefile  Wed Mar  1 04:54:06 
2017(r314472)
@@ -8,6 +8,6 @@ FILESDIR=   ${SHAREDIR}/doc/ntp/drivers/sc
 FILES= footer.txt style.css
 .endif
 
-.PATH: ${.CURDIR}/../../../../../contrib/ntp/html/drivers/scripts
+.PATH: ${SRCTOP}/contrib/ntp/html/drivers/scripts
 
 .include 

Modified: head/usr.sbin/ntp/doc/hints/Makefile
==
--- head/usr.sbin/ntp/doc/hints/MakefileWed Mar  1 04:47:22 2017
(r314471)
+++ head/usr.sbin/ntp/doc/hints/MakefileWed Mar  1 04:54:06 2017
(r314472)
@@ -12,6 +12,6 @@ FILES=a-ux aix bsdi changes decosf1 dec
sun4 svr4-dell svr4_package todo vxworks.html winnt.html
 .endif
 
-.PATH: ${.CURDIR}/../../../../contrib/ntp/html/hints
+.PATH: ${SRCTOP}/contrib/ntp/html/hints
 
 .include 

Modified: head/usr.sbin/ntp/doc/icons/Makefile
==
--- head/usr.sbin/ntp/doc/icons/MakefileWed Mar  1 04:47:22 2017
(r314471)
+++ head/usr.sbin/ntp/doc/icons/MakefileWed Mar  1 04:54:06 2017
(r314472)
@@ -8,6 +8,6 @@ FILESDIR=   ${SHAREDIR}/doc/ntp/icons
 FILES= home.gif mail2.gif sitemap.png
 .endif
 
-.PATH: ${.CURDIR}/../../../../contrib/ntp/html/icons
+.PATH: ${SRCTOP}/contrib/ntp/html/icons
 
 .include 

Modified: head/usr.sbin/ntp/doc/pic/Makefile
==

svn commit: r314471 - head/sys/net

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 04:47:22 2017
New Revision: 314471
URL: https://svnweb.freebsd.org/changeset/base/314471

Log:
  Fix VNET - DAD detected duplicate IPv6 address
  
  Assign a hopefully unique, locally administered etheraddr. - for
  epairNa & epairNb
  
  Submitted by: Catalin 
  Pull Request: https://github.com/freebsd/freebsd/pull/92

Modified:
  head/sys/net/if_epair.c

Modified: head/sys/net/if_epair.c
==
--- head/sys/net/if_epair.c Wed Mar  1 04:41:59 2017(r314470)
+++ head/sys/net/if_epair.c Wed Mar  1 04:47:22 2017(r314471)
@@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -724,6 +725,7 @@ epair_clone_create(struct if_clone *ifc,
ifp = scb->ifp;
/* Assign a hopefully unique, locally administered etheraddr. */
eaddr[0] = 0x02;
+   eaddr[1] = arc4random() & 0xff;
eaddr[3] = (ifp->if_index >> 8) & 0xff;
eaddr[4] = ifp->if_index & 0xff;
eaddr[5] = 0x0b;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314470 - in head/usr.sbin/unbound: anchor checkconf control daemon

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:41:59 2017
New Revision: 314470
URL: https://svnweb.freebsd.org/changeset/base/314470

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/unbound/anchor/Makefile
  head/usr.sbin/unbound/checkconf/Makefile
  head/usr.sbin/unbound/control/Makefile
  head/usr.sbin/unbound/daemon/Makefile

Modified: head/usr.sbin/unbound/anchor/Makefile
==
--- head/usr.sbin/unbound/anchor/Makefile   Wed Mar  1 04:40:57 2017
(r314469)
+++ head/usr.sbin/unbound/anchor/Makefile   Wed Mar  1 04:41:59 2017
(r314470)
@@ -1,9 +1,9 @@
 # $FreeBSD$
 
 # Vendor sources and generated files
-LDNSDIR= ${.CURDIR}/../../../contrib/ldns
-UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
-EXPATDIR= ${.CURDIR}/../../../contrib/expat
+LDNSDIR= ${SRCTOP}/contrib/ldns
+UNBOUNDDIR= ${SRCTOP}/contrib/unbound
+EXPATDIR= ${SRCTOP}/contrib/expat
 
 .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/doc
 

Modified: head/usr.sbin/unbound/checkconf/Makefile
==
--- head/usr.sbin/unbound/checkconf/MakefileWed Mar  1 04:40:57 2017
(r314469)
+++ head/usr.sbin/unbound/checkconf/MakefileWed Mar  1 04:41:59 2017
(r314470)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
 # Vendor sources and generated files
-LDNSDIR= ${.CURDIR}/../../../contrib/ldns
-UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
+LDNSDIR= ${SRCTOP}/contrib/ldns
+UNBOUNDDIR= ${SRCTOP}/contrib/unbound
 
 .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/util 
${UNBOUNDDIR}/doc
 

Modified: head/usr.sbin/unbound/control/Makefile
==
--- head/usr.sbin/unbound/control/Makefile  Wed Mar  1 04:40:57 2017
(r314469)
+++ head/usr.sbin/unbound/control/Makefile  Wed Mar  1 04:41:59 2017
(r314470)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
 # Vendor sources and generated files
-LDNSDIR= ${.CURDIR}/../../../contrib/ldns
-UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
+LDNSDIR= ${SRCTOP}/contrib/ldns
+UNBOUNDDIR= ${SRCTOP}/contrib/unbound
 
 .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/smallapp ${UNBOUNDDIR}/util 
${UNBOUNDDIR}/doc
 

Modified: head/usr.sbin/unbound/daemon/Makefile
==
--- head/usr.sbin/unbound/daemon/Makefile   Wed Mar  1 04:40:57 2017
(r314469)
+++ head/usr.sbin/unbound/daemon/Makefile   Wed Mar  1 04:41:59 2017
(r314470)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
 # Vendor sources and generated files
-LDNSDIR= ${.CURDIR}/../../../contrib/ldns
-UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
+LDNSDIR= ${SRCTOP}/contrib/ldns
+UNBOUNDDIR= ${SRCTOP}/contrib/unbound
 
 .PATH: ${UNBOUNDDIR} ${UNBOUNDDIR}/daemon ${UNBOUNDDIR}/util ${UNBOUNDDIR}/doc
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314469 - head/sys/dev/twa

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 04:40:57 2017
New Revision: 314469
URL: https://svnweb.freebsd.org/changeset/base/314469

Log:
  Update tw_cl_share.h to allow 255 LUNs
  
  TW_CL_MAX_NUM_LUNS should not be 16 but I presume 255. I have a 3ware
  controller with more than 16 volumes (LUN's) and otherwise all LUN's
  above the 16'th are not working.
  
  Submitted by: jcatrysse 
  Pull Request: https://github.com/freebsd/freebsd/pull/100

Modified:
  head/sys/dev/twa/tw_cl_share.h

Modified: head/sys/dev/twa/tw_cl_share.h
==
--- head/sys/dev/twa/tw_cl_share.h  Wed Mar  1 04:35:21 2017
(r314468)
+++ head/sys/dev/twa/tw_cl_share.h  Wed Mar  1 04:40:57 2017
(r314469)
@@ -68,7 +68,7 @@
 #define TW_CL_MAX_NUM_UNITS32  /* max # of units we support */
 #endif /* TW_OSL_ENCLOSURE_SUPPORT */
 
-#define TW_CL_MAX_NUM_LUNS 16  /* max # of LUN's we support */
+#define TW_CL_MAX_NUM_LUNS 255 /* max # of LUN's we support */
 #define TW_CL_MAX_IO_SIZE  0x2 /* 128K */
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314468 - in head/usr.sbin/zic: . zdump zic

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:35:21 2017
New Revision: 314468
URL: https://svnweb.freebsd.org/changeset/base/314468

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  Also, use :H where possible/sensical to manipulate .CURDIR-relative paths
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/zic/Makefile.inc
  head/usr.sbin/zic/zdump/Makefile
  head/usr.sbin/zic/zic/Makefile

Modified: head/usr.sbin/zic/Makefile.inc
==
--- head/usr.sbin/zic/Makefile.inc  Wed Mar  1 04:27:58 2017
(r314467)
+++ head/usr.sbin/zic/Makefile.inc  Wed Mar  1 04:35:21 2017
(r314468)
@@ -1,3 +1,3 @@
 # $FreeBSD$
 
-.include "${.CURDIR}/../../Makefile.inc"
+.include "${SRCTOP}/usr.sbin/Makefile.inc"

Modified: head/usr.sbin/zic/zdump/Makefile
==
--- head/usr.sbin/zic/zdump/MakefileWed Mar  1 04:27:58 2017
(r314467)
+++ head/usr.sbin/zic/zdump/MakefileWed Mar  1 04:35:21 2017
(r314468)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../contrib/tzcode/zic
+.PATH: ${SRCTOP}/contrib/tzcode/zic
 
 PROG=  zdump
 MAN=   zdump.8
@@ -8,7 +8,7 @@ SRCS=   zdump.c ialloc.c scheck.c
 
 CFLAGS+= -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DSTD_INSPIRED -DPCTS
 CFLAGS+= -DHAVE_LONG_DOUBLE -DTZDIR=\"${SHAREDIR}/zoneinfo\" -Demkdir=mkdir
-CFLAGS+= -I${.CURDIR}/.. -I${.CURDIR}/../../../contrib/tzcode/stdtime
+CFLAGS+= -I${.CURDIR:H} -I${SRCTOP}/contrib/tzcode/stdtime
 
 WARNS?=2
 

Modified: head/usr.sbin/zic/zic/Makefile
==
--- head/usr.sbin/zic/zic/Makefile  Wed Mar  1 04:27:58 2017
(r314467)
+++ head/usr.sbin/zic/zic/Makefile  Wed Mar  1 04:35:21 2017
(r314468)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../../contrib/tzcode/zic
+.PATH: ${SRCTOP}/contrib/tzcode/zic
 
 PROG=  zic
 MAN=   zic.8
@@ -9,7 +9,7 @@ SRCS=   zic.c ialloc.c scheck.c
 CFLAGS+= -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DSTD_INSPIRED -DPCTS
 CFLAGS+= -DHAVE_LONG_DOUBLE -DTZDIR=\"${SHAREDIR}/zoneinfo\" -Demkdir=mkdir
 CFLAGS+= -DHAVE_STRERROR -DHAVE_UNISTD_H
-CFLAGS+= -I${.CURDIR}/.. -I${.CURDIR}/../../../contrib/tzcode/stdtime
+CFLAGS+= -I${.CURDIR:H} -I${SRCTOP}/contrib/tzcode/stdtime
 
 WARNS?=2
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314467 - head/sys/dev/usb/input

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 04:27:58 2017
New Revision: 314467
URL: https://svnweb.freebsd.org/changeset/base/314467

Log:
  Make wsp process a single touchpad tap and interpret it as a
  left-click event.  It can be disabled setting the new
  hw.usb.wsp.enable_single_tap_clicks sysctl to 0.
  
  Submitted by: K Staring 
  Pull Request: https://github.com/freebsd/freebsd/pull/97

Modified:
  head/sys/dev/usb/input/wsp.c

Modified: head/sys/dev/usb/input/wsp.c
==
--- head/sys/dev/usb/input/wsp.cWed Mar  1 04:24:56 2017
(r314466)
+++ head/sys/dev/usb/input/wsp.cWed Mar  1 04:27:58 2017
(r314467)
@@ -87,6 +87,7 @@ static struct wsp_tuning {
int pressure_untouch_threshold;
int pressure_tap_threshold;
int scr_hor_threshold;
+   int enable_single_tap_clicks;
 }
wsp_tuning =
 {
@@ -96,6 +97,7 @@ static struct wsp_tuning {
.pressure_untouch_threshold = 10,
.pressure_tap_threshold = 120,
.scr_hor_threshold = 20,
+   .enable_single_tap_clicks = 1,
 };
 
 static void
@@ -107,6 +109,7 @@ wsp_runing_rangecheck(struct wsp_tuning 
WSP_CLAMP(ptun->pressure_untouch_threshold, 1, 255);
WSP_CLAMP(ptun->pressure_tap_threshold, 1, 255);
WSP_CLAMP(ptun->scr_hor_threshold, 1, 255);
+   WSP_CLAMP(ptun->enable_single_tap_clicks, 0, 1);
 }
 
 SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scale_factor, CTLFLAG_RWTUN,
@@ -121,6 +124,8 @@ SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressu
 &wsp_tuning.pressure_tap_threshold, 0, "tap pressure threshold");
 SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_hor_threshold, CTLFLAG_RWTUN,
 &wsp_tuning.scr_hor_threshold, 0, "horizontal scrolling threshold");
+SYSCTL_INT(_hw_usb_wsp, OID_AUTO, enable_single_tap_clicks, CTLFLAG_RWTUN,
+&wsp_tuning.enable_single_tap_clicks, 0, "enable single tap clicks");
 
 /*
  * Some tables, structures, definitions and constant values for the
@@ -966,7 +971,7 @@ wsp_intr_callback(struct usb_xfer *xfer,
 */
switch (sc->ntaps) {
case 1:
-   if (!(params->caps & 
HAS_INTEGRATED_BUTTON)) {
+   if (!(params->caps & 
HAS_INTEGRATED_BUTTON) || tun.enable_single_tap_clicks) {
wsp_add_to_queue(sc, 0, 0, 0, 
MOUSE_BUTTON1DOWN);
DPRINTFN(WSP_LLEVEL_INFO, "LEFT 
CLICK!\n");
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314465 - stable/11/sys/dev/iscsi

2017-02-28 Thread Alexander Motin
Author: mav
Date: Wed Mar  1 04:24:30 2017
New Revision: 314465
URL: https://svnweb.freebsd.org/changeset/base/314465

Log:
  MFC r313779: Fix handling of negative sbspace() return values.
  
  I found that at least with Chelsio NICs TOE sockets quite often report
  negative sbspace() values.  Using unsigned variable to store it resulted
  in attempts to aggregate too much data in one sosend() call, that caused
  errors and following connection termination.

Modified:
  stable/11/sys/dev/iscsi/icl_soft.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/iscsi/icl_soft.c
==
--- stable/11/sys/dev/iscsi/icl_soft.c  Wed Mar  1 04:24:24 2017
(r314464)
+++ stable/11/sys/dev/iscsi/icl_soft.c  Wed Mar  1 04:24:30 2017
(r314465)
@@ -892,7 +892,7 @@ icl_conn_send_pdus(struct icl_conn *ic, 
 {
struct icl_pdu *request, *request2;
struct socket *so;
-   size_t available, size, size2;
+   long available, size, size2;
int coalesced, error;
 
ICL_CONN_LOCK_ASSERT_NOT(ic);
@@ -931,7 +931,7 @@ icl_conn_send_pdus(struct icl_conn *ic, 
if (available < size) {
 #if 1
ICL_DEBUG("no space to send; "
-   "have %zd, need %zd",
+   "have %ld, need %ld",
available, size);
 #endif
so->so_snd.sb_lowat = size;
@@ -978,7 +978,7 @@ icl_conn_send_pdus(struct icl_conn *ic, 
}
 #if 0
if (coalesced > 1) {
-   ICL_DEBUG("coalesced %d PDUs into %zd bytes",
+   ICL_DEBUG("coalesced %d PDUs into %ld bytes",
coalesced, size);
}
 #endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314464 - head/usr.sbin/yppush

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:24:24 2017
New Revision: 314464
URL: https://svnweb.freebsd.org/changeset/base/314464

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/yppush/Makefile

Modified: head/usr.sbin/yppush/Makefile
==
--- head/usr.sbin/yppush/Makefile   Wed Mar  1 04:23:53 2017
(r314463)
+++ head/usr.sbin/yppush/Makefile   Wed Mar  1 04:24:24 2017
(r314464)
@@ -1,8 +1,7 @@
 # $FreeBSD$
 
-RPCDIR=${.CURDIR}/../../include/rpcsvc
-.PATH: ${RPCDIR} ${.CURDIR}/../../usr.sbin/ypserv \
-   ${.CURDIR}/../../libexec/ypxfr
+RPCDIR=${SRCTOP}/include/rpcsvc
+.PATH: ${RPCDIR} ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr
 
 PROG=  yppush
 MAN=   yppush.8
@@ -10,7 +9,7 @@ SRCS=  ypxfr_getmap.c yp_dblookup.c yp_er
${GENSRCS}
 GENSRCS=yp.h yp_clnt.c yppush_svc.c
 
-CFLAGS+= -I. -I${.CURDIR}/../../libexec/ypxfr
+CFLAGS+= -I. -I${SRCTOP}/libexec/ypxfr
 
 WARNS?=2
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314466 - head/usr.sbin/ypserv

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:24:56 2017
New Revision: 314466
URL: https://svnweb.freebsd.org/changeset/base/314466

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/ypserv/Makefile

Modified: head/usr.sbin/ypserv/Makefile
==
--- head/usr.sbin/ypserv/Makefile   Wed Mar  1 04:24:30 2017
(r314465)
+++ head/usr.sbin/ypserv/Makefile   Wed Mar  1 04:24:56 2017
(r314466)
@@ -2,9 +2,8 @@
 
 .include 
 
-RPCDIR=${.CURDIR}/../../include/rpcsvc
-.PATH: ${RPCDIR} \
-   ${.CURDIR}/common
+RPCDIR=${SRCTOP}/include/rpcsvc
+.PATH: ${RPCDIR} ${.CURDIR}/common
 
 PROG=  ypserv
 MAN=   ypserv.8 ypinit.8
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314463 - head/usr.sbin/tzsetup

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:23:53 2017
New Revision: 314463
URL: https://svnweb.freebsd.org/changeset/base/314463

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/tzsetup/Makefile

Modified: head/usr.sbin/tzsetup/Makefile
==
--- head/usr.sbin/tzsetup/Makefile  Wed Mar  1 04:22:23 2017
(r314462)
+++ head/usr.sbin/tzsetup/Makefile  Wed Mar  1 04:23:53 2017
(r314463)
@@ -9,7 +9,7 @@ CFLAGS+= -I.
 
 .if ${MK_DIALOG} != no
 WARNS?=3
-CFLAGS+=   -I${.CURDIR}/../../contrib/dialog -DHAVE_DIALOG
+CFLAGS+=   -I${SRCTOP}/contrib/dialog -DHAVE_DIALOG
 LIBADD=dialog ncursesw
 .endif
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314462 - head/usr.sbin/rpc.ypxfrd

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:22:23 2017
New Revision: 314462
URL: https://svnweb.freebsd.org/changeset/base/314462

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  The SRCTOP conversion simplifies pathing in make/displayed output.
  
  Also, while here, change a hardcoded path to ${RPCDIR}/ypxfrd.x in
  the make targets with ${.ALLSRC} .
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/rpc.ypxfrd/Makefile

Modified: head/usr.sbin/rpc.ypxfrd/Makefile
==
--- head/usr.sbin/rpc.ypxfrd/Makefile   Wed Mar  1 04:19:04 2017
(r314461)
+++ head/usr.sbin/rpc.ypxfrd/Makefile   Wed Mar  1 04:22:23 2017
(r314462)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../usr.sbin/ypserv
+.PATH: ${SRCTOP}/usr.sbin/ypserv
 
 PROG=  rpc.ypxfrd
 MAN=   rpc.ypxfrd.8
@@ -15,14 +15,14 @@ LIBADD= rpcsvc
 
 CLEANFILES= ypxfrd_svc.c ypxfrd.h
 
-RPCDIR=${.CURDIR}/../../include/rpcsvc
+RPCDIR=${SRCTOP}/include/rpcsvc
 RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C
 
 # We need to remove the 'static' keyword from _rpcsvcstate so that
 # ypxfrd_main.c can see it.
 ypxfrd_svc.c: ${RPCDIR}/ypxfrd.x
rm -f ${.TARGET}
-   ${RPCGEN} -m ${RPCDIR}/ypxfrd.x | \
+   ${RPCGEN} -m ${.ALLSRC} | \
sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}
 
 # ypxfrd_xdr.c: ${RPCDIR}/ypxfrd.x
@@ -31,6 +31,6 @@ ypxfrd_svc.c: ${RPCDIR}/ypxfrd.x
 
 ypxfrd.h: ${RPCDIR}/ypxfrd.x
rm -f ${.TARGET}
-   ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/ypxfrd.x
+   ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC}
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314461 - head/usr.sbin/zonectl

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:19:04 2017
New Revision: 314461
URL: https://svnweb.freebsd.org/changeset/base/314461

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/zonectl/Makefile

Modified: head/usr.sbin/zonectl/Makefile
==
--- head/usr.sbin/zonectl/Makefile  Wed Mar  1 04:18:28 2017
(r314460)
+++ head/usr.sbin/zonectl/Makefile  Wed Mar  1 04:19:04 2017
(r314461)
@@ -2,7 +2,7 @@
 
 PROG=  zonectl
 SRCS=  zonectl.c
-SDIR=  ${.CURDIR}/../../sys
+SDIR=  ${SRCTOP}/sys
 LIBADD= cam sbuf util
 MAN=   zonectl.8
 CFLAGS+=-g -O0
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314460 - head/usr.sbin/ypldap

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:18:28 2017
New Revision: 314460
URL: https://svnweb.freebsd.org/changeset/base/314460

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/ypldap/Makefile

Modified: head/usr.sbin/ypldap/Makefile
==
--- head/usr.sbin/ypldap/Makefile   Wed Mar  1 04:17:59 2017
(r314459)
+++ head/usr.sbin/ypldap/Makefile   Wed Mar  1 04:18:28 2017
(r314460)
@@ -12,8 +12,8 @@ MAN=  ypldap.8 ypldap.conf.5
 LIBADD=openbsd event util rpcsvc
 
 CFLAGS+=-I${.CURDIR}
-CFLAGS+=-I${.CURDIR}/../../contrib/pf/libevent
-CFLAGS+=-I${.CURDIR}/../../lib/libopenbsd
+CFLAGS+=-I${SRCTOP}/contrib/pf/libevent
+CFLAGS+=-I${SRCTOP}/lib/libopenbsd
 
 WARNS= 2
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314459 - in head/usr.sbin: traceroute traceroute6

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:17:59 2017
New Revision: 314459
URL: https://svnweb.freebsd.org/changeset/base/314459

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/traceroute/Makefile
  head/usr.sbin/traceroute6/Makefile

Modified: head/usr.sbin/traceroute/Makefile
==
--- head/usr.sbin/traceroute/Makefile   Wed Mar  1 04:17:18 2017
(r314458)
+++ head/usr.sbin/traceroute/Makefile   Wed Mar  1 04:17:59 2017
(r314459)
@@ -2,7 +2,7 @@
 
 .include 
 
-TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute
+TRACEROUTE_DISTDIR?= ${SRCTOP}/contrib/traceroute
 .PATH: ${TRACEROUTE_DISTDIR}
 
 PROG=  traceroute

Modified: head/usr.sbin/traceroute6/Makefile
==
--- head/usr.sbin/traceroute6/Makefile  Wed Mar  1 04:17:18 2017
(r314458)
+++ head/usr.sbin/traceroute6/Makefile  Wed Mar  1 04:17:59 2017
(r314459)
@@ -13,7 +13,7 @@
 # A PARTICULAR PURPOSE.
 # $FreeBSD$
 
-TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute
+TRACEROUTE_DISTDIR?= ${SRCTOP}/contrib/traceroute
 .PATH: ${TRACEROUTE_DISTDIR}
 
 PROG=  traceroute6
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314458 - in head/usr.sbin: tcpdchk tcpdmatch

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:17:18 2017
New Revision: 314458
URL: https://svnweb.freebsd.org/changeset/base/314458

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/tcpdchk/Makefile
  head/usr.sbin/tcpdmatch/Makefile

Modified: head/usr.sbin/tcpdchk/Makefile
==
--- head/usr.sbin/tcpdchk/Makefile  Wed Mar  1 04:16:40 2017
(r314457)
+++ head/usr.sbin/tcpdchk/Makefile  Wed Mar  1 04:17:18 2017
(r314458)
@@ -2,7 +2,7 @@
 
 .include 
 
-.PATH: ${.CURDIR}/../../contrib/tcp_wrappers
+.PATH: ${SRCTOP}/contrib/tcp_wrappers
 
 PROG=  tcpdchk
 MAN=   tcpdchk.8

Modified: head/usr.sbin/tcpdmatch/Makefile
==
--- head/usr.sbin/tcpdmatch/MakefileWed Mar  1 04:16:40 2017
(r314457)
+++ head/usr.sbin/tcpdmatch/MakefileWed Mar  1 04:17:18 2017
(r314458)
@@ -2,7 +2,7 @@
 
 .include 
 
-.PATH: ${.CURDIR}/../../contrib/tcp_wrappers
+.PATH: ${SRCTOP}/contrib/tcp_wrappers
 
 PROG=  tcpdmatch
 MAN=   tcpdmatch.8
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314457 - head/usr.sbin/rpc.ypupdated

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:16:40 2017
New Revision: 314457
URL: https://svnweb.freebsd.org/changeset/base/314457

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  The SRCTOP conversion simplifies pathing in make/displayed output.
  
  Also, while here, change a hardcoded path to ${RPCDIR}/ypupdate_prot.x in
  the make targets with ${.ALLSRC} .
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/rpc.ypupdated/Makefile

Modified: head/usr.sbin/rpc.ypupdated/Makefile
==
--- head/usr.sbin/rpc.ypupdated/MakefileWed Mar  1 04:14:41 2017
(r314456)
+++ head/usr.sbin/rpc.ypupdated/MakefileWed Mar  1 04:16:40 2017
(r314457)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../ypserv ${.CURDIR}/../../libexec/ypxfr
+.PATH: ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/libexec/ypxfr
 
 PROG=  rpc.ypupdated
 MAN=
@@ -9,7 +9,7 @@ SRCS=   ypupdate_prot_svc.c ypupdate_prot.
yp_dblookup.c yp_dbwrite.c yp_dbdelete.c yp_dbupdate.c
 
 #CFLAGS+= -DYP
-CFLAGS+= -I${.CURDIR}/../ypserv -I. -I${.CURDIR}/../../libexec/ypxfr
+CFLAGS+= -I${SRCTOP}/usr.sbin/ypserv -I. -I${SRCTOP}/libexec/ypxfr
 
 WARNS?=1
 
@@ -24,10 +24,10 @@ RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C
 # ypupdated_main.c can see it.
 ypupdate_prot_svc.c: ${RPCDIR}/ypupdate_prot.x
rm -f ${.TARGET}
-   ${RPCGEN} -m ${RPCDIR}/ypupdate_prot.x | \
+   ${RPCGEN} -m ${.ALLSRC} | \
sed s/"static int _rpcsvcstate"/"int _rpcsvcstate"/g > ${.TARGET}
 
 ypupdate_prot.h: ${RPCDIR}/ypupdate_prot.x
-   ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/ypupdate_prot.x
+   ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC}
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314456 - head/usr.sbin/rpc.yppasswdd

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:14:41 2017
New Revision: 314456
URL: https://svnweb.freebsd.org/changeset/base/314456

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  This simplifies pathing in make/displayed output.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/rpc.yppasswdd/Makefile

Modified: head/usr.sbin/rpc.yppasswdd/Makefile
==
--- head/usr.sbin/rpc.yppasswdd/MakefileWed Mar  1 04:13:31 2017
(r314455)
+++ head/usr.sbin/rpc.yppasswdd/MakefileWed Mar  1 04:14:41 2017
(r314456)
@@ -2,8 +2,8 @@
 
 RPCDIR=${DESTDIR}/usr/include/rpcsvc
 
-.PATH: ${.CURDIR}/../../usr.sbin/ypserv ${.CURDIR}/../../usr.bin/chpass \
-   ${.CURDIR}/../../libexec/ypxfr ${RPCDIR}
+.PATH: ${SRCTOP}/usr.sbin/ypserv ${SRCTOP}/usr.bin/chpass \
+   ${SRCTOP}/libexec/ypxfr ${RPCDIR}
 
 PROG=  rpc.yppasswdd
 SCRIPTS=yppwupdate
@@ -16,9 +16,9 @@ GENSRCS=yp.h yp_clnt.c yppasswd.h yppass
 
 WARNS?= 5
 CFLAGS+= -fno-strict-aliasing
-CFLAGS+= -I${.CURDIR}/../../usr.sbin/vipw \
--I${.CURDIR}/../../usr.sbin/ypserv \
--I${.CURDIR}/../../libexec/ypxfr \
+CFLAGS+= -I${SRCTOP}/usr.sbin/vipw \
+-I${SRCTOP}/usr.sbin/ypserv \
+-I${SRCTOP}/libexec/ypxfr \
 -I${.CURDIR} -I.
 LIBADD=rpcsvc crypt util
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314455 - head/usr.sbin/rpc.statd

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:13:31 2017
New Revision: 314455
URL: https://svnweb.freebsd.org/changeset/base/314455

Log:
  Use .ALLSRC instead of RPCSRC
  
  This is a trivial simplification in the Makefile, meant to serve as
  a good example for what to do with rules like this.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/rpc.statd/Makefile

Modified: head/usr.sbin/rpc.statd/Makefile
==
--- head/usr.sbin/rpc.statd/MakefileWed Mar  1 04:12:24 2017
(r314454)
+++ head/usr.sbin/rpc.statd/MakefileWed Mar  1 04:13:31 2017
(r314455)
@@ -15,10 +15,10 @@ RPCSRC= ${DESTDIR}/usr/include/rpcsvc/sm
 RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C
 
 sm_inter_svc.c: ${RPCSRC}
-   ${RPCGEN} -m -o ${.TARGET} ${RPCSRC}
+   ${RPCGEN} -m -o ${.TARGET} ${.ALLSRC}
 
 sm_inter.h: ${RPCSRC}
-   ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
+   ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC}
 
 test: test.c
cc -o test test.c -lrpcsvc
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314454 - head/usr.sbin/rpc.lockd

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:12:24 2017
New Revision: 314454
URL: https://svnweb.freebsd.org/changeset/base/314454

Log:
  Use .ALLSRC instead of RPCSRC
  
  This is a trivial simplification in the Makefile, meant to serve as
  a good example for what to do with rules like this.
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/rpc.lockd/Makefile

Modified: head/usr.sbin/rpc.lockd/Makefile
==
--- head/usr.sbin/rpc.lockd/MakefileWed Mar  1 04:02:36 2017
(r314453)
+++ head/usr.sbin/rpc.lockd/MakefileWed Mar  1 04:12:24 2017
(r314454)
@@ -17,10 +17,10 @@ RPCSRC= ${DESTDIR}/usr/include/rpcsvc/nl
 RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C
 
 nlm_prot_svc.c: ${RPCSRC}
-   ${RPCGEN} -m -o ${.TARGET} ${RPCSRC}
+   ${RPCGEN} -m -o ${.TARGET} ${.ALLSRC}
 
 nlm_prot.h: ${RPCSRC}
-   ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
+   ${RPCGEN} -h -o ${.TARGET} ${.ALLSRC}
 
 test: ${.CURDIR}/test.c
cc -o test ${.CURDIR}/test.c -lrpcsvc
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314453 - head/usr.sbin/yp_mkdb

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:02:36 2017
New Revision: 314453
URL: https://svnweb.freebsd.org/changeset/base/314453

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/yp_mkdb/Makefile

Modified: head/usr.sbin/yp_mkdb/Makefile
==
--- head/usr.sbin/yp_mkdb/Makefile  Wed Mar  1 04:00:17 2017
(r314452)
+++ head/usr.sbin/yp_mkdb/Makefile  Wed Mar  1 04:02:36 2017
(r314453)
@@ -1,13 +1,13 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/../../libexec/ypxfr ${.CURDIR}/../ypserv
+.PATH: ${SRCTOP}/libexec/ypxfr ${SRCTOP}/usr.sbin/ypserv
 
 PROG=  yp_mkdb
 MAN=   yp_mkdb.8
 SRCS=  yp_mkdb.c yp_dblookup.c yp_dbwrite.c
 
 CFLAGS+= -Dyp_error=warnx
-CFLAGS+= -I${.CURDIR}/../../libexec/ypxfr -I${.CURDIR}/../../usr.sbin/ypserv
+CFLAGS+= -I${SRCTOP}/libexec/ypxfr -I${SRCTOP}/usr.sbin/ypserv
 
 WARNS?=1
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314452 - head/usr.sbin/fstyp

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 04:00:17 2017
New Revision: 314452
URL: https://svnweb.freebsd.org/changeset/base/314452

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/fstyp/Makefile

Modified: head/usr.sbin/fstyp/Makefile
==
--- head/usr.sbin/fstyp/MakefileWed Mar  1 03:59:18 2017
(r314451)
+++ head/usr.sbin/fstyp/MakefileWed Mar  1 04:00:17 2017
(r314452)
@@ -26,15 +26,15 @@ CFLAGS+=-I${.CURDIR}/../../sys
 IGNORE_PRAGMA=  YES
 
 CFLAGS+= -DNEED_SOLARIS_BOOLEAN -DHAVE_ZFS
-CFLAGS+= -I${.CURDIR}/../../sys/cddl/compat/opensolaris
-CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris/include
-CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris/lib/libumem
-CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libnvpair
-CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common/sys
-CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/head
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
 .endif
 
 LIBADD=geom md
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314451 - head/usr.sbin/uathload

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 03:59:18 2017
New Revision: 314451
URL: https://svnweb.freebsd.org/changeset/base/314451

Log:
  Use SRCTOP-relative paths to other directories instead of .CURDIR-relative 
ones
  
  The SRCTOP conversion simplifies pathing in make/displayed output.
  
  Also, while here, change a hardcoded path to ar5523.bin.uu in the make target
  with ${.ALLSRC} .
  
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.sbin/uathload/Makefile

Modified: head/usr.sbin/uathload/Makefile
==
--- head/usr.sbin/uathload/Makefile Wed Mar  1 03:31:12 2017
(r314450)
+++ head/usr.sbin/uathload/Makefile Wed Mar  1 03:59:18 2017
(r314451)
@@ -10,7 +10,7 @@ FILESMODE=444
 
 CLEANFILES=ar5523.bin
 
-ar5523.bin: ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu
-   uudecode -p ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu > 
${.TARGET}
+ar5523.bin: ${SRCTOP}/sys/contrib/dev/uath/ar5523.bin.uu
+   uudecode -p ${.ALLSRC} > ${.TARGET}
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314450 - head/contrib/netbsd-tests/lib/libc/stdlib

2017-02-28 Thread Ngie Cooper
Author: ngie
Date: Wed Mar  1 03:31:12 2017
New Revision: 314450
URL: https://svnweb.freebsd.org/changeset/base/314450

Log:
  Add additional __FreeBSD_version guards around the hsearch_r testcases
  
  The reasoning for this is the same as r276046: to ease MFCing the tests
  to ^/stable/10 .
  
  This was accidentally missed in r313439
  
  MFC after:1 week
  X-MFC with:   r313439
  Sponsored by: Dell EMC Isilon

Modified:
  head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c

Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
==
--- head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c   Wed Mar  1 
02:10:40 2017(r314449)
+++ head/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c   Wed Mar  1 
03:31:12 2017(r314450)
@@ -287,6 +287,7 @@ ATF_TC_BODY(hsearch_r_basic, tc)
 }
 #endif
 
+#if defined(__FreeBSD__) && 1100027 <= __FreeBSD_version
 ATF_TC(hsearch_r_duplicate);
 ATF_TC_HEAD(hsearch_r_duplicate, tc)
 {
@@ -394,6 +395,7 @@ ATF_TC_BODY(hsearch_r_two, tc)
 
hdestroy_r(&t);
 }
+#endif
 
 ATF_TP_ADD_TCS(tp)
 {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314436 - in head: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bin/pw

2017-02-28 Thread Warner Losh
On Tue, Feb 28, 2017 at 6:48 PM, Shawn Webb  wrote:
> On Tue, Feb 28, 2017 at 11:42:48PM +, Warner Losh wrote:
>> Author: imp
>> Date: Tue Feb 28 23:42:47 2017
>> New Revision: 314436
>> URL: https://svnweb.freebsd.org/changeset/base/314436
>>
>> Log:
>>   Renumber copyright clause 4
>>
>>   Renumber cluase 4 to 3, per what everybody else did when BSD granted
>>   them permission to remove clause 3. My insistance on keeping the same
>>   numbering for legal reasons is too pedantic, so give up on that point.
>>
>>   Submitted by:   Jan Schaumann 
>>   Pull Request:   https://github.com/freebsd/freebsd/pull/96
>
> This breaks building arm64 world at a minimum.

Yea, in resolving the conflicts with git, my inexperience botched it.
I believe I've fixed it.

Warner
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314449 - in head: release/picobsd/tinyware/passwd sys/arm/include sys/mips/include usr.bin/locate/locate

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 02:10:40 2017
New Revision: 314449
URL: https://svnweb.freebsd.org/changeset/base/314449

Log:
  Revert prior commit to restore the files mangled by my "fixing" merge
  conflicts for a git rebase I tried to do.

Modified:
  head/release/picobsd/tinyware/passwd/extern.h
  head/release/picobsd/tinyware/passwd/pw_util.h
  head/sys/arm/include/_align.h
  head/sys/mips/include/cpuinfo.h
  head/usr.bin/locate/locate/pathnames.h

Modified: head/release/picobsd/tinyware/passwd/extern.h
==
--- head/release/picobsd/tinyware/passwd/extern.h   Wed Mar  1 02:07:51 
2017(r314448)
+++ head/release/picobsd/tinyware/passwd/extern.h   Wed Mar  1 02:10:40 
2017(r314449)
@@ -1,6 +1,6 @@
-/*-
- * Copyright (c) 1982, 1986, 1988, 1993
- *  The Regents of the University of California.  All rights reserved.
+/*
+ * Copyright (c) 1994
+ * The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -10,7 +10,11 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
  *may be used to endorse or promote products derived from this software
  *without specific prior written permission.
  *
@@ -26,17 +30,9 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
+ * From: @(#)extern.h  8.1 (Berkeley) 4/2/94
  * $FreeBSD$
  */
 
-#ifndef _NETINET_IP6_IPSEC_H_
-#define _NETINET_IP6_IPSEC_H_
-
-intip6_ipsec_filtertunnel(struct mbuf *);
-intip6_ipsec_fwd(struct mbuf *);
-intip6_ipsec_input(struct mbuf *, int);
-intip6_ipsec_output(struct mbuf **, struct inpcb *, int *);
-#if 0
-intip6_ipsec_mtu(struct mbuf *);
-#endif
-#endif
+intkrb_passwd(char *, char *, char *, char *);
+intlocal_passwd(char *);

Modified: head/release/picobsd/tinyware/passwd/pw_util.h
==
--- head/release/picobsd/tinyware/passwd/pw_util.h  Wed Mar  1 02:07:51 
2017(r314448)
+++ head/release/picobsd/tinyware/passwd/pw_util.h  Wed Mar  1 02:10:40 
2017(r314449)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1987, 1988, 1993
+ * Copyright (c) 1994
  * The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -10,7 +10,11 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
  *may be used to endorse or promote products derived from this software
  *without specific prior written permission.
  *
@@ -26,22 +30,15 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * @(#)disklabel.h 8.2 (Berkeley) 7/10/94
+ * @(#)pw_util.h   8.2 (Berkeley) 4/1/94
+ *
  * $FreeBSD$
  */
 
-#ifndef _SYS_DISKPC98_H_
-#define_SYS_DISKPC98_H_
-
-#include 
-#include 
-
-#defineDOSMID_386BSD   __DOSMID_386BSD
-#defineDOSSID_386BSD   __DOSSID_386BSD
-
-void pc98_partition_dec(void const *pp, struct pc98_partition *d);
-void pc98_partition_enc(void *pp, struct pc98_partition *d);
-
-#define DIOCSPC98  _IOW('M', 129, u_char[8192])
-
-#endif /* !_SYS_DISKPC98_H_ */
+void   pw_edit(int);
+void   pw_error(const char *, int, int);
+void   pw_init(void);
+intpw_lock(void);
+intpw_mkdb(const char *);
+void   pw_prompt(void);
+intpw_tmp(void);

Modified: head/sys/arm/include/_align.h
==
--- head/sys/arm/include/_align.h   Wed Mar  1 02:07:51 2017
(r314448)
+++ head/sys/arm/include/_align.h   Wed Mar  1 02:10:40 2017
(r

svn commit: r314448 - head/sys/libkern

2017-02-28 Thread Warner Losh
Author: imp
Date: Wed Mar  1 02:07:51 2017
New Revision: 314448
URL: https://svnweb.freebsd.org/changeset/base/314448

Log:
  strstr.c was inadvertently blasted with a copy of isa_nmi.c. Revert
  and remove clause 3 while I'm here.

Modified:
  head/sys/libkern/strstr.c

Modified: head/sys/libkern/strstr.c
==
--- head/sys/libkern/strstr.c   Wed Mar  1 01:45:52 2017(r314447)
+++ head/sys/libkern/strstr.c   Wed Mar  1 02:07:51 2017(r314448)
@@ -1,9 +1,9 @@
 /*-
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California.  All rights reserved.
  *
  * This code is derived from software contributed to Berkeley by
- * William Jolitz.
+ * Chris Torek.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,42 +28,32 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- *
- * from: @(#)isa.c 7.2 (Berkeley) 5/13/91
  */
 
 #include 
 __FBSDID("$FreeBSD$");
 
-#include 
-#include 
-#include 
-
-#include 
-
-#define NMI_PARITY 0x04
-#define NMI_EPARITY 0x02
+#include 
+#include 
 
 /*
- * Handle a NMI, possibly a machine check.
- * return true to panic system, false to ignore.
+ * Find the first occurrence of find in s.
  */
-int
-isa_nmi(int cd)
+char *
+strstr(const char *s, const char *find)
 {
-   int retval = 0;
-   int port = inb(0x33);
+   char c, sc;
+   size_t len;
 
-   log(LOG_CRIT, "NMI PC98 port = %x\n", port);
-   if (port & NMI_PARITY) {
-   log(LOG_CRIT, "BASE RAM parity error, likely hardware 
failure.");
-   retval = 1;
-   } else if (port & NMI_EPARITY) {
-   log(LOG_CRIT, "EXTENDED RAM parity error, likely hardware 
failure.");
-   retval = 1;
-   } else {
-   log(LOG_CRIT, "\nNMI Resume ??\n");
+   if ((c = *find++) != 0) {
+   len = strlen(find);
+   do {
+   do {
+   if ((sc = *s++) == 0)
+   return (NULL);
+   } while (sc != c);
+   } while (strncmp(s, find, len) != 0);
+   s--;
}
-
-   return(retval);
+   return (__DECONST(char *, s));
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314436 - in head: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bin/pw

2017-02-28 Thread Shawn Webb
On Tue, Feb 28, 2017 at 11:42:48PM +, Warner Losh wrote:
> Author: imp
> Date: Tue Feb 28 23:42:47 2017
> New Revision: 314436
> URL: https://svnweb.freebsd.org/changeset/base/314436
> 
> Log:
>   Renumber copyright clause 4
>   
>   Renumber cluase 4 to 3, per what everybody else did when BSD granted
>   them permission to remove clause 3. My insistance on keeping the same
>   numbering for legal reasons is too pedantic, so give up on that point.
>   
>   Submitted by:   Jan Schaumann 
>   Pull Request:   https://github.com/freebsd/freebsd/pull/96

This breaks building arm64 world at a minimum.

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


svn commit: r314447 - stable/11/contrib/tzcode/stdtime

2017-02-28 Thread Ed Maste
Author: emaste
Date: Wed Mar  1 01:45:52 2017
New Revision: 314447
URL: https://svnweb.freebsd.org/changeset/base/314447

Log:
  MFC r313774:localtime: return NULL if time_t out of range of struct tm
  
  Previously we would truncate tm.tm_year for any time_t corresponding to
  a year that does not fit in int.  This issue was discovered because it
  caused the bash-static build to fail when linking with LLD.
  
  As reported by Rafael Espíndola:
  
  Configure has
  
  AC_FUNC_MKTIME
  
  which expands to a test of mktime that fails with the freebsd
  implementation. Given that, bash compiles a mktime.o file that
  defines just mktime and uses localtime. That goes in a .a file
  that is before libc.
  
  The freebsd libc defines mktime in localtime.o, which also defines
  localtime among other functions.
  
  When lld sees an undefined reference to mktime from libc, it uses
  the bash provided one and then tries to find a definition of
  localtime. It is found on libc's localtime.o, but now we have a
  duplicated error.
  
  The reason it works with bfd is that bash doesn't use mktime
  directly and the undefined reference from libc is resolved to the
  libc implementation. It would also fail to link if bash itself
  directly used mktime.
  
  The bash-static configure test verifies that, for many values of t, either
  localtime(t) returns NULL or mktime(localtime(t)) == t.  This test failed
  when localtime returned a truncated tm_year.
  
  This was fixed in tzcode in 2004 but has persisted in our tree since
  rS2708.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/contrib/tzcode/stdtime/localtime.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/tzcode/stdtime/localtime.c
==
--- stable/11/contrib/tzcode/stdtime/localtime.cWed Mar  1 01:44:40 
2017(r314446)
+++ stable/11/contrib/tzcode/stdtime/localtime.cWed Mar  1 01:45:52 
2017(r314447)
@@ -1453,14 +1453,13 @@ localtime(const time_t *const timep)
}
_RWLOCK_RDLOCK(&lcl_rwlock);
tzset_basic(1);
-   localsub(timep, 0L, p_tm);
+   p_tm = localsub(timep, 0L, p_tm);
_RWLOCK_UNLOCK(&lcl_rwlock);
-   return(p_tm);
} else {
tzset_basic(0);
-   localsub(timep, 0L, &tm);
-   return(&tm);
+   p_tm = localsub(timep, 0L, &tm);
}
+   return(p_tm);
 }
 
 /*
@@ -1472,7 +1471,7 @@ localtime_r(const time_t *const timep, s
 {
_RWLOCK_RDLOCK(&lcl_rwlock);
tzset_basic(1);
-   localsub(timep, 0L, tmp);
+   tmp = localsub(timep, 0L, tmp);
_RWLOCK_UNLOCK(&lcl_rwlock);
return tmp;
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r314446 - stable/10/contrib/tzcode/stdtime

2017-02-28 Thread Ed Maste
Author: emaste
Date: Wed Mar  1 01:44:40 2017
New Revision: 314446
URL: https://svnweb.freebsd.org/changeset/base/314446

Log:
  MFC r313774:localtime: return NULL if time_t out of range of struct tm
  
  Previously we would truncate tm.tm_year for any time_t corresponding to
  a year that does not fit in int.  This issue was discovered because it
  caused the bash-static build to fail when linking with LLD.
  
  As reported by Rafael Espíndola:
  
  Configure has
  
  AC_FUNC_MKTIME
  
  which expands to a test of mktime that fails with the freebsd
  implementation. Given that, bash compiles a mktime.o file that
  defines just mktime and uses localtime. That goes in a .a file
  that is before libc.
  
  The freebsd libc defines mktime in localtime.o, which also defines
  localtime among other functions.
  
  When lld sees an undefined reference to mktime from libc, it uses
  the bash provided one and then tries to find a definition of
  localtime. It is found on libc's localtime.o, but now we have a
  duplicated error.
  
  The reason it works with bfd is that bash doesn't use mktime
  directly and the undefined reference from libc is resolved to the
  libc implementation. It would also fail to link if bash itself
  directly used mktime.
  
  The bash-static configure test verifies that, for many values of t, either
  localtime(t) returns NULL or mktime(localtime(t)) == t.  This test failed
  when localtime returned a truncated tm_year.
  
  This was fixed in tzcode in 2004 but has persisted in our tree since
  rS2708.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/contrib/tzcode/stdtime/localtime.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/tzcode/stdtime/localtime.c
==
--- stable/10/contrib/tzcode/stdtime/localtime.cWed Mar  1 01:19:41 
2017(r314445)
+++ stable/10/contrib/tzcode/stdtime/localtime.cWed Mar  1 01:44:40 
2017(r314446)
@@ -1460,14 +1460,13 @@ const time_t * consttimep;
}
_RWLOCK_RDLOCK(&lcl_rwlock);
tzset_basic(1);
-   localsub(timep, 0L, p_tm);
+   p_tm = localsub(timep, 0L, p_tm);
_RWLOCK_UNLOCK(&lcl_rwlock);
-   return(p_tm);
} else {
tzset_basic(0);
-   localsub(timep, 0L, &tm);
-   return(&tm);
+   p_tm = localsub(timep, 0L, &tm);
}
+   return(p_tm);
 }
 
 /*
@@ -1481,7 +1480,7 @@ struct tm *   tmp;
 {
_RWLOCK_RDLOCK(&lcl_rwlock);
tzset_basic(1);
-   localsub(timep, 0L, tmp);
+   tmp = localsub(timep, 0L, tmp);
_RWLOCK_UNLOCK(&lcl_rwlock);
return tmp;
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r314445 - stable/10/usr.bin/dc

2017-02-28 Thread Pedro F. Giffuni
Author: pfg
Date: Wed Mar  1 01:19:41 2017
New Revision: 314445
URL: https://svnweb.freebsd.org/changeset/base/314445

Log:
  MFC r314316:
  dc(1): Catch up with OpenBSD tag.
  
  OpenBSD rev 1.12 corresponds to our SVN r275162. Update the tag to make
  easier future updates. No functional change.

Modified:
  stable/10/usr.bin/dc/stack.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/dc/stack.c
==
--- stable/10/usr.bin/dc/stack.cWed Mar  1 01:17:51 2017
(r31)
+++ stable/10/usr.bin/dc/stack.cWed Mar  1 01:19:41 2017
(r314445)
@@ -1,4 +1,4 @@
-/* $OpenBSD: stack.c,v 1.11 2009/10/27 23:59:37 deraadt Exp $  */
+/* $OpenBSD: stack.c,v 1.12 2014/11/26 15:05:51 otto Exp $ */
 
 /*
  * Copyright (c) 2003, Otto Moerbeek 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314444 - stable/11/usr.bin/dc

2017-02-28 Thread Pedro F. Giffuni
Author: pfg
Date: Wed Mar  1 01:17:51 2017
New Revision: 31
URL: https://svnweb.freebsd.org/changeset/base/31

Log:
  MFC r314316:
  dc(1): Catch up with OpenBSD tag.
  
  OpenBSD rev 1.12 corresponds to our SVN r275162. Update the tag to make
  easier future updates. No functional change.

Modified:
  stable/11/usr.bin/dc/stack.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/dc/stack.c
==
--- stable/11/usr.bin/dc/stack.cWed Mar  1 00:42:38 2017
(r314443)
+++ stable/11/usr.bin/dc/stack.cWed Mar  1 01:17:51 2017
(r31)
@@ -1,4 +1,4 @@
-/* $OpenBSD: stack.c,v 1.11 2009/10/27 23:59:37 deraadt Exp $  */
+/* $OpenBSD: stack.c,v 1.12 2014/11/26 15:05:51 otto Exp $ */
 
 /*
  * Copyright (c) 2003, Otto Moerbeek 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314420 - head/sys/kern

2017-02-28 Thread Scott Long via svn-src-all
Sure, but it doesn’t match the comments in that if-else construct.

Scott

> On Feb 28, 2017, at 2:02 PM, Conrad Meyer  wrote:
> 
> On Tue, Feb 28, 2017 at 1:27 PM, Scott Long  wrote:
>> Author: scottl
>> Date: Tue Feb 28 21:27:51 2017
>> New Revision: 314420
>> URL: https://svnweb.freebsd.org/changeset/base/314420
>> 
>> Log:
>>  Provide a comment on why stdio.h needs to be included.
>> 
>> Modified:
>>  head/sys/kern/subr_prf.c
>> 
>> Modified: head/sys/kern/subr_prf.c
>> ==
>> --- head/sys/kern/subr_prf.cTue Feb 28 21:18:45 2017(r314419)
>> +++ head/sys/kern/subr_prf.cTue Feb 28 21:27:51 2017(r314420)
>> @@ -76,6 +76,13 @@ __FBSDID("$FreeBSD$");
>> #include 
>> #else
>> #include 
>> +#endif
>> +
>> +/*
>> + * This is needed for sbuf_putbuf() when compiled into userland.  Due to the
>> + * shared nature of this file, it's the only place to put it.
> 
> Couldn't it go in the #else clause above?
> 
> Best,
> Conrad
> 

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r314443 - head/sys/dev/iwn

2017-02-28 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Mar  1 00:42:38 2017
New Revision: 314443
URL: https://svnweb.freebsd.org/changeset/base/314443

Log:
  iwn: fix data rate parsing for Rx radiotap header.
  
  Tested with Intel 6205, MONITOR mode + RTL8188EU, STA mode.

Modified:
  head/sys/dev/iwn/if_iwn.c
  head/sys/dev/iwn/if_iwnreg.h

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Wed Mar  1 00:28:04 2017(r314442)
+++ head/sys/dev/iwn/if_iwn.c   Wed Mar  1 00:42:38 2017(r314443)
@@ -2667,6 +2667,26 @@ rate2plcp(int rate)
return 0;
 }
 
+static __inline uint8_t
+plcp2rate(const uint8_t rate_plcp)
+{
+   switch (rate_plcp) {
+   case 0xd:   return 12;
+   case 0xf:   return 18;
+   case 0x5:   return 24;
+   case 0x7:   return 36;
+   case 0x9:   return 48;
+   case 0xb:   return 72;
+   case 0x1:   return 96;
+   case 0x3:   return 108;
+   case 10:return 2;
+   case 20:return 4;
+   case 55:return 11;
+   case 110:   return 22;
+   default:return 0;
+   }
+}
+
 static int
 iwn_get_1stream_tx_antmask(struct iwn_softc *sc)
 {
@@ -3078,6 +3098,7 @@ iwn_rx_done(struct iwn_softc *sc, struct
 
if (ieee80211_radiotap_active(ic)) {
struct iwn_rx_radiotap_header *tap = &sc->sc_rxtap;
+   uint32_t rate = le32toh(stat->rate);
 
tap->wr_flags = 0;
if (stat->flags & htole16(IWN_STAT_FLAG_SHPREAMBLE))
@@ -3085,24 +3106,11 @@ iwn_rx_done(struct iwn_softc *sc, struct
tap->wr_dbm_antsignal = (int8_t)rssi;
tap->wr_dbm_antnoise = (int8_t)nf;
tap->wr_tsft = stat->tstamp;
-   switch (stat->rate) {
-   /* CCK rates. */
-   case  10: tap->wr_rate =   2; break;
-   case  20: tap->wr_rate =   4; break;
-   case  55: tap->wr_rate =  11; break;
-   case 110: tap->wr_rate =  22; break;
-   /* OFDM rates. */
-   case 0xd: tap->wr_rate =  12; break;
-   case 0xf: tap->wr_rate =  18; break;
-   case 0x5: tap->wr_rate =  24; break;
-   case 0x7: tap->wr_rate =  36; break;
-   case 0x9: tap->wr_rate =  48; break;
-   case 0xb: tap->wr_rate =  72; break;
-   case 0x1: tap->wr_rate =  96; break;
-   case 0x3: tap->wr_rate = 108; break;
-   /* Unknown rate: should not happen. */
-   default:  tap->wr_rate =   0;
-   }
+   if (rate & IWN_RFLAG_MCS) {
+   tap->wr_rate = rate & IWN_RFLAG_RATE_MCS;
+   tap->wr_rate |= IEEE80211_RATE_MCS;
+   } else
+   tap->wr_rate = plcp2rate(rate & IWN_RFLAG_RATE);
}
 
/*

Modified: head/sys/dev/iwn/if_iwnreg.h
==
--- head/sys/dev/iwn/if_iwnreg.hWed Mar  1 00:28:04 2017
(r314442)
+++ head/sys/dev/iwn/if_iwnreg.hWed Mar  1 00:42:38 2017
(r314443)
@@ -736,6 +736,10 @@ struct iwn4965_node_info {
uint32_treserved7;
 } __packed;
 
+#define IWN_RFLAG_RATE 0xff
+#define IWN_RFLAG_RATE_MCS 0x1f
+#define IWN_RFLAG_HT40_DUP 0x20
+
 #define IWN_RFLAG_MCS  (1 << 8)
 #define IWN_RFLAG_CCK  (1 << 9)
 #define IWN_RFLAG_GREENFIELD   (1 << 10)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314442 - head/tests/sys/netinet

2017-02-28 Thread Alan Somers
Author: asomers
Date: Wed Mar  1 00:28:04 2017
New Revision: 314442
URL: https://svnweb.freebsd.org/changeset/base/314442

Log:
  Add an ATF test for IPv6 SLAAC with multiple fibs
  
  Tests that an interface can get a SLAAC address and that it inserts its
  routes into the correct fib. Does not test anything to do with NDP.
  
  PR:   196361
  Reviewed by:  Erick Turnquist 
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D9776

Modified:
  head/tests/sys/netinet/fibs_test.sh

Modified: head/tests/sys/netinet/fibs_test.sh
==
--- head/tests/sys/netinet/fibs_test.sh Wed Mar  1 00:17:04 2017
(r314441)
+++ head/tests/sys/netinet/fibs_test.sh Wed Mar  1 00:28:04 2017
(r314442)
@@ -443,6 +443,89 @@ same_ip_multiple_ifaces_inet6_cleanup()
cleanup_ifaces
 }
 
+atf_test_case slaac_on_nondefault_fib6 cleanup
+slaac_on_nondefault_fib6_head()
+{
+   atf_set "descr" "SLAAC correctly installs routes on non-default FIBs"
+   atf_set "require.user" "root"
+   atf_set "require.config" "fibs" "allow_sysctl_side_effects"
+}
+slaac_on_nondefault_fib6_body()
+{
+   # Configure the epair interfaces to use nonrouteable RFC3849
+   # addresses and non-default FIBs
+   ADDR="2001:db8::2"
+   GATEWAY="2001:db8::1"
+   SUBNET="2001:db8:"
+   MASK="64"
+
+   atf_expect_fail "PR196361 IPv6 network routes don't respect 
net.add_addr_allfibs=0"
+
+   # Check system configuration
+   if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
+   atf_skip "This test requires net.add_addr_allfibs=0"
+   fi
+   get_fibs 2
+
+   sysctl -n "net.inet6.ip6.rfc6204w3" >> "rfc6204w3.state"
+   sysctl -n "net.inet6.ip6.forwarding" >> "forwarding.state"
+   # Enable forwarding so the kernel will send RAs
+   sysctl net.inet6.ip6.forwarding=1
+   # Enable RFC6204W3 mode so the kernel will enable default router
+   # selection while also forwarding packets
+   sysctl net.inet6.ip6.rfc6204w3=1
+
+   # Configure epair interfaces
+   get_epair
+   setup_iface "$EPAIRA" "$FIB0" inet6 ${ADDR} ${MASK}
+   echo ifconfig "$EPAIRB" up inet6 fib $FIB1 -ifdisabled accept_rtadv
+   ifconfig "$EPAIRB" inet6 -ifdisabled accept_rtadv fib $FIB1 up
+   rtadvd -p rtadvd.pid -C rtadvd.sock -c /dev/null "$EPAIRA"
+   rtsol "$EPAIRB"
+
+   # Check SLAAC address
+   atf_check -o match:"inet6 ${SUBNET}.*prefixlen ${MASK}.*autoconf" \
+   ifconfig "$EPAIRB"
+   # Check local route
+   atf_check -o match:"${SUBNET}.*\.*lo0" \
+   netstat -rnf inet6 -F $FIB1
+   # Check subnet route
+   atf_check -o match:"${SUBNET}:/${MASK}.*\.*$EPAIRB" \
+   netstat -rnf inet6 -F $FIB1
+   # Check default route
+   atf_check -o match:"default.*\.*$EPAIRB" \
+   netstat -rnf inet6 -F $FIB1
+
+   # Check that none of the above routes appeared on other routes
+   for fib in $( seq 0 $(($(sysctl -n net.fibs) - 1))); do
+   if [ "$fib" = "$FIB1" -o "$fib" = "$FIB0" ]; then
+   continue
+   fi
+   atf_check -o not-match:"${SUBNET}.*\.*lo0" \
+   netstat -rnf inet6 -F $fib
+   atf_check -o not-match:"${SUBNET}:/${MASK}.*\.*$EPAIRB" \
+   netstat -rnf inet6 -F $fib
+   atf_check -o not-match:"default.*\.*$EPAIRB" \
+   netstat -rnf inet6 -F $fib
+   done
+}
+slaac_on_nondefault_fib6_cleanup()
+{
+   cleanup_ifaces
+   if [ -f "rtadvd.pid" ]; then
+   pkill -F rtadvd.pid
+   rm rtadvd.pid
+   fi
+   if [ -f "rfc6204w3.state" ] ; then
+   sysctl "net.inet6.ip6.rfc6204w3"=`cat "rfc6204w3.state"`
+   rm "rfc6204w3.state"
+   fi
+   if [ -f "forwarding.state" ] ; then
+   sysctl "net.inet6.ip6.forwarding"=`cat "forwarding.state"`
+   rm "forwarding.state"
+   fi
+}
+
 # Regression test for kern/187550
 atf_test_case subnet_route_with_multiple_fibs_on_same_subnet cleanup
 subnet_route_with_multiple_fibs_on_same_subnet_head()
@@ -648,6 +731,7 @@ atf_init_test_cases()
atf_add_test_case same_ip_multiple_ifaces_fib0
atf_add_test_case same_ip_multiple_ifaces
atf_add_test_case same_ip_multiple_ifaces_inet6
+   atf_add_test_case slaac_on_nondefault_fib6
atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet
atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet_inet6
atf_add_test_case udp_dontroute
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314441 - stable/11/sys/dev/mpr

2017-02-28 Thread Alan Somers
Author: asomers
Date: Wed Mar  1 00:17:04 2017
New Revision: 314441
URL: https://svnweb.freebsd.org/changeset/base/314441

Log:
  MFC r312995:
  
  Initialize a stack variable in mprsas_get_sas_address_for_sata_disk
  
  Thought it's difficult to reproduce, I think this variable was responsible
  for a use-after-free panic when a SATA disk timed out responding to a SATA
  identify command during boot.
  
  Submitted by: slm
  Reviewed by:  slm
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D9364

Modified:
  stable/11/sys/dev/mpr/mpr_sas_lsi.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/mpr/mpr_sas_lsi.c
==
--- stable/11/sys/dev/mpr/mpr_sas_lsi.c Wed Mar  1 00:13:58 2017
(r314440)
+++ stable/11/sys/dev/mpr/mpr_sas_lsi.c Wed Mar  1 00:17:04 2017
(r314441)
@@ -893,6 +893,7 @@ mprsas_get_sas_address_for_sata_disk(str
u8 sas_status;
 
memset(&ata_identify, 0, sizeof(ata_identify));
+   memset(&mpi_reply, 0, sizeof(mpi_reply));
try_count = 0;
do {
rc = mprsas_get_sata_identify(sc, handle, &mpi_reply,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314440 - stable/10/sys/dev/mpr

2017-02-28 Thread Alan Somers
Author: asomers
Date: Wed Mar  1 00:13:58 2017
New Revision: 314440
URL: https://svnweb.freebsd.org/changeset/base/314440

Log:
  MFC r312995:
  
  Initialize a stack variable in mprsas_get_sas_address_for_sata_disk
  
  Thought it's difficult to reproduce, I think this variable was responsible
  for a use-after-free panic when a SATA disk timed out responding to a SATA
  identify command during boot.
  
  Submitted by: slm
  Reviewed by:  slm
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D9364

Modified:
  stable/10/sys/dev/mpr/mpr_sas_lsi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/mpr/mpr_sas_lsi.c
==
--- stable/10/sys/dev/mpr/mpr_sas_lsi.c Tue Feb 28 23:56:24 2017
(r314439)
+++ stable/10/sys/dev/mpr/mpr_sas_lsi.c Wed Mar  1 00:13:58 2017
(r314440)
@@ -893,6 +893,7 @@ mprsas_get_sas_address_for_sata_disk(str
u8 sas_status;
 
memset(&ata_identify, 0, sizeof(ata_identify));
+   memset(&mpi_reply, 0, sizeof(mpi_reply));
try_count = 0;
do {
rc = mprsas_get_sata_identify(sc, handle, &mpi_reply,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314438 - stable/10/usr.sbin/camdd

2017-02-28 Thread Alan Somers
Author: asomers
Date: Tue Feb 28 23:56:14 2017
New Revision: 314438
URL: https://svnweb.freebsd.org/changeset/base/314438

Log:
  MFC r312559:
  
  Fix misc Coverity defects in camdd(8)
  
  CID 1341620   Fix a small memory leak
  CID 1341630   Though this is technically a false positive, rearrange the
code for clarity.
  CID 1341635   Eliminate dead code
  CID 1368663   Fix a double mutex unlock in the error path
  
  Also:
  * Use sig_atomic_t for variables accessed from signal handlers
  * Don't conditionalize free(3) on its argument being non-null
  
  Reported by:  Coverity
  CID:  1341620 1341630 1341635 1368663
  Reviewed by:  ken
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D9237

Modified:
  stable/10/usr.sbin/camdd/camdd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/camdd/camdd.c
==
--- stable/10/usr.sbin/camdd/camdd.cTue Feb 28 23:55:03 2017
(r314437)
+++ stable/10/usr.sbin/camdd/camdd.cTue Feb 28 23:56:14 2017
(r314438)
@@ -420,9 +420,9 @@ struct camdd_dev {
 };
 
 static sem_t camdd_sem;
-static int need_exit = 0;
-static int error_exit = 0;
-static int need_status = 0;
+static sig_atomic_t need_exit = 0;
+static sig_atomic_t error_exit = 0;
+static sig_atomic_t need_status = 0;
 
 #ifndef min
 #definemin(a, b) (a < b) ? a : b
@@ -712,11 +712,7 @@ camdd_alloc_buf(struct camdd_dev *dev, c
return (buf);
 
 bailout_error:
-   if (data_ptr != NULL)
-   free(data_ptr);
-
-   if (buf != NULL)
-   free(buf);
+   free(data_ptr);
 
return (NULL);
 }
@@ -2261,6 +2257,7 @@ camdd_file_run(struct camdd_dev *dev)
if (file_dev->tmp_buf == NULL) {
buf->status = CAMDD_STATUS_ERROR;
error_count++;
+   pthread_mutex_lock(&dev->mutex);
goto bailout;
}
for (i = 0, cur_offset = 0; i < data->sg_count; i++) {
@@ -2983,7 +2980,6 @@ int
 camdd_rw(struct camdd_io_opts *io_opts, int num_io_opts, uint64_t max_io,
 int retry_count, int timeout)
 {
-   char *device = NULL;
struct cam_device *new_cam_dev = NULL;
struct camdd_dev *devs[2];
struct timespec start_time;
@@ -3003,12 +2999,11 @@ camdd_rw(struct camdd_io_opts *io_opts, 
for (i = 0; i < num_io_opts; i++) {
switch (io_opts[i].dev_type) {
case CAMDD_DEV_PASS: {
-   camdd_argmask new_arglist = CAMDD_ARG_NONE;
-   int bus = 0, target = 0, lun = 0;
-   char name[30];
-   int rv;
-
if (isdigit(io_opts[i].dev_name[0])) {
+   camdd_argmask new_arglist = CAMDD_ARG_NONE;
+   int bus = 0, target = 0, lun = 0;
+   int rv;
+
/* device specified as bus:target[:lun] */
rv = parse_btl(io_opts[i].dev_name, &bus,
&target, &lun, &new_arglist);
@@ -3024,23 +3019,21 @@ camdd_rw(struct camdd_io_opts *io_opts, 
lun = 0;
new_arglist |= CAMDD_ARG_LUN;
}
+   new_cam_dev = cam_open_btl(bus, target, lun,
+   O_RDWR, NULL);
} else {
+   char name[30];
+
if (cam_get_device(io_opts[i].dev_name, name,
   sizeof name, &unit) == -1) {
warnx("%s", cam_errbuf);
error = 1;
goto bailout;
}
-   device = strdup(name);
-   new_arglist |= CAMDD_ARG_DEVICE |CAMDD_ARG_UNIT;
+   new_cam_dev = cam_open_spec_device(name, unit,
+   O_RDWR, NULL);
}
 
-   if (new_arglist & (CAMDD_ARG_BUS | CAMDD_ARG_TARGET))
-   new_cam_dev = cam_open_btl(bus, target, lun,
-   O_RDWR, NULL);
-   else
-   new_cam_dev = cam_open_spec_device(device, unit,
-   O_RDWR, NULL);
if (new_cam_dev == NULL) {
warnx("%s", cam_errbuf);
error = 1;
___
svn-src-all@freebsd.org mailing list
h

svn commit: r314439 - stable/11/usr.sbin/camdd

2017-02-28 Thread Alan Somers
Author: asomers
Date: Tue Feb 28 23:56:24 2017
New Revision: 314439
URL: https://svnweb.freebsd.org/changeset/base/314439

Log:
  MFC r312559:
  
  Fix misc Coverity defects in camdd(8)
  
  CID 1341620   Fix a small memory leak
  CID 1341630   Though this is technically a false positive, rearrange the
code for clarity.
  CID 1341635   Eliminate dead code
  CID 1368663   Fix a double mutex unlock in the error path
  
  Also:
  * Use sig_atomic_t for variables accessed from signal handlers
  * Don't conditionalize free(3) on its argument being non-null
  
  Reported by:  Coverity
  CID:  1341620 1341630 1341635 1368663
  Reviewed by:  ken
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D9237

Modified:
  stable/11/usr.sbin/camdd/camdd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/camdd/camdd.c
==
--- stable/11/usr.sbin/camdd/camdd.cTue Feb 28 23:56:14 2017
(r314438)
+++ stable/11/usr.sbin/camdd/camdd.cTue Feb 28 23:56:24 2017
(r314439)
@@ -420,9 +420,9 @@ struct camdd_dev {
 };
 
 static sem_t camdd_sem;
-static int need_exit = 0;
-static int error_exit = 0;
-static int need_status = 0;
+static sig_atomic_t need_exit = 0;
+static sig_atomic_t error_exit = 0;
+static sig_atomic_t need_status = 0;
 
 #ifndef min
 #definemin(a, b) (a < b) ? a : b
@@ -712,11 +712,7 @@ camdd_alloc_buf(struct camdd_dev *dev, c
return (buf);
 
 bailout_error:
-   if (data_ptr != NULL)
-   free(data_ptr);
-
-   if (buf != NULL)
-   free(buf);
+   free(data_ptr);
 
return (NULL);
 }
@@ -2262,6 +2258,7 @@ camdd_file_run(struct camdd_dev *dev)
if (file_dev->tmp_buf == NULL) {
buf->status = CAMDD_STATUS_ERROR;
error_count++;
+   pthread_mutex_lock(&dev->mutex);
goto bailout;
}
for (i = 0, cur_offset = 0; i < data->sg_count; i++) {
@@ -2984,7 +2981,6 @@ int
 camdd_rw(struct camdd_io_opts *io_opts, int num_io_opts, uint64_t max_io,
 int retry_count, int timeout)
 {
-   char *device = NULL;
struct cam_device *new_cam_dev = NULL;
struct camdd_dev *devs[2];
struct timespec start_time;
@@ -3004,12 +3000,11 @@ camdd_rw(struct camdd_io_opts *io_opts, 
for (i = 0; i < num_io_opts; i++) {
switch (io_opts[i].dev_type) {
case CAMDD_DEV_PASS: {
-   camdd_argmask new_arglist = CAMDD_ARG_NONE;
-   int bus = 0, target = 0, lun = 0;
-   char name[30];
-   int rv;
-
if (isdigit(io_opts[i].dev_name[0])) {
+   camdd_argmask new_arglist = CAMDD_ARG_NONE;
+   int bus = 0, target = 0, lun = 0;
+   int rv;
+
/* device specified as bus:target[:lun] */
rv = parse_btl(io_opts[i].dev_name, &bus,
&target, &lun, &new_arglist);
@@ -3025,23 +3020,21 @@ camdd_rw(struct camdd_io_opts *io_opts, 
lun = 0;
new_arglist |= CAMDD_ARG_LUN;
}
+   new_cam_dev = cam_open_btl(bus, target, lun,
+   O_RDWR, NULL);
} else {
+   char name[30];
+
if (cam_get_device(io_opts[i].dev_name, name,
   sizeof name, &unit) == -1) {
warnx("%s", cam_errbuf);
error = 1;
goto bailout;
}
-   device = strdup(name);
-   new_arglist |= CAMDD_ARG_DEVICE |CAMDD_ARG_UNIT;
+   new_cam_dev = cam_open_spec_device(name, unit,
+   O_RDWR, NULL);
}
 
-   if (new_arglist & (CAMDD_ARG_BUS | CAMDD_ARG_TARGET))
-   new_cam_dev = cam_open_btl(bus, target, lun,
-   O_RDWR, NULL);
-   else
-   new_cam_dev = cam_open_spec_device(device, unit,
-   O_RDWR, NULL);
if (new_cam_dev == NULL) {
warnx("%s", cam_errbuf);
error = 1;
___
svn-src-all@freebsd.org mailing list
h

svn commit: r314437 - head/sys/dev/pci

2017-02-28 Thread Gavin Atkinson
Author: gavin
Date: Tue Feb 28 23:55:03 2017
New Revision: 314437
URL: https://svnweb.freebsd.org/changeset/base/314437

Log:
  Fix spelling mistake in comment, firmwrae -> firmware

Modified:
  head/sys/dev/pci/pci_pci.c

Modified: head/sys/dev/pci/pci_pci.c
==
--- head/sys/dev/pci/pci_pci.c  Tue Feb 28 23:42:47 2017(r314436)
+++ head/sys/dev/pci/pci_pci.c  Tue Feb 28 23:55:03 2017(r314437)
@@ -2849,7 +2849,7 @@ pcib_request_feature_allow(device_t pcib
 enum pci_feature feature)
 {
/*
-* No host firmwrae we have to negotiate with, so we allow
+* No host firmware we have to negotiate with, so we allow
 * every valid feature requested.
 */
switch (feature) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Mark Linimon
On Tue, Feb 28, 2017 at 01:30:44PM -0800, Gleb Smirnoff wrote:
> How can I check the __FreeBSD_version in a port Makefile? My understanding
> is that there is no standard way for such thing.

There are hundreds of examples in port Makefiles.  I suppose the PH will need
to be updated to include some of them.  It is hinted at under "INCLUDE" in
https://www.freebsd.org/doc/en/books/porters-handbook/dads-noinstall.html
but not made specific.

Some quick examples:

  devel/cloudabi-toolchain/Makefile:.if ${OSVERSION} >= 1100100

  devel/cvs-syncmail/Makefile:.if ${OPSYS} == FreeBSD && ${OSVERSION} > 100

  devel/trio/Makefile.orig:# NB: OSVERSION was not incremented for r308559, so 
we use the earlier
  devel/trio/Makefile.orig:# 1200014 as a surrogate for now.
  devel/trio/Makefile.orig:.if ${OSVERSION} < 1100506 || ( ${OSVERSION} >= 
120 && ${OSVERSION} < 1200014 )
  devel/trio/Makefile.orig:BROKEN_aarch64= needs fixes from r308375, 
r308487, and/or r308559
  devel/trio/Makefile.orig:.endif

  emulators/i386-wine/Makefile.inc:.if ${OPSYS} != FreeBSD || (!(${OSVERSION} < 
100) && !(${OSVERSION} >= 1003000 && ${OSVERSION} < 110) && 
!(${OSVERSION} >= 1100121 && ${OSVERSION} < 120) && !(${OSVERSION} >= 
1200019 && ${OSVERSION} < 130))

  lang/ruby22/Makefile:.if exists(/usr/sbin/dtrace) && (${OSVERSION} > 1100032) 
&& (${ARCH} == "amd64" || ${ARCH} == "i386")

  lang/tcc/Makefile:.if ${CC:T:M*clang*} || ${OSVERSION} >= 124

  sysutils/e2fsprogs/Makefile:.if !empty(PORT_OPTIONS:MNOTESTS) && (${OPSYS} == 
FreeBSD) && (${OSVERSION} >= 110 || ((${ARCH} != i386) && (${ARCH} != 
amd64)))

However, I am kind of shocked that this is not well understood --
especially after I have tried so many times to convince src committers
to update FreeBSD_version in case of src changes that affect (e.g. break)
ports.

These are the kinds of things that ports committers have to use to work
around changes in the src tree.  Skipping OSVERSION updates makes this
work more complicated.

mcl
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314436 - in head: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bin/pwd...

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 23:42:47 2017
New Revision: 314436
URL: https://svnweb.freebsd.org/changeset/base/314436

Log:
  Renumber copyright clause 4
  
  Renumber cluase 4 to 3, per what everybody else did when BSD granted
  them permission to remove clause 3. My insistance on keeping the same
  numbering for legal reasons is too pedantic, so give up on that point.
  
  Submitted by: Jan Schaumann 
  Pull Request: https://github.com/freebsd/freebsd/pull/96

Modified:
  head/bin/cat/cat.1
  head/bin/cat/cat.c
  head/bin/chflags/chflags.1
  head/bin/chflags/chflags.c
  head/bin/chmod/chmod.1
  head/bin/chmod/chmod.c
  head/bin/cp/cp.1
  head/bin/cp/cp.c
  head/bin/cp/extern.h
  head/bin/cp/utils.c
  head/bin/date/date.1
  head/bin/date/date.c
  head/bin/date/extern.h
  head/bin/date/netdate.c
  head/bin/dd/args.c
  head/bin/dd/conv.c
  head/bin/dd/conv_tab.c
  head/bin/dd/dd.1
  head/bin/dd/dd.c
  head/bin/dd/dd.h
  head/bin/dd/extern.h
  head/bin/dd/misc.c
  head/bin/dd/position.c
  head/bin/df/df.1
  head/bin/df/df.c
  head/bin/domainname/domainname.1
  head/bin/domainname/domainname.c
  head/bin/echo/echo.1
  head/bin/echo/echo.c
  head/bin/ed/cbc.c
  head/bin/hostname/hostname.1
  head/bin/hostname/hostname.c
  head/bin/kill/kill.1
  head/bin/kill/kill.c
  head/bin/ln/ln.1
  head/bin/ln/ln.c
  head/bin/ln/symlink.7
  head/bin/ls/cmp.c
  head/bin/ls/extern.h
  head/bin/ls/ls.1
  head/bin/ls/ls.c
  head/bin/ls/ls.h
  head/bin/ls/print.c
  head/bin/ls/util.c
  head/bin/mkdir/mkdir.1
  head/bin/mkdir/mkdir.c
  head/bin/mv/mv.1
  head/bin/mv/mv.c
  head/bin/pax/ar_io.c
  head/bin/pax/ar_subs.c
  head/bin/pax/buf_subs.c
  head/bin/pax/cache.c
  head/bin/pax/cache.h
  head/bin/pax/cpio.c
  head/bin/pax/cpio.h
  head/bin/pax/extern.h
  head/bin/pax/file_subs.c
  head/bin/pax/ftree.c
  head/bin/pax/ftree.h
  head/bin/pax/gen_subs.c
  head/bin/pax/options.c
  head/bin/pax/options.h
  head/bin/pax/pat_rep.c
  head/bin/pax/pat_rep.h
  head/bin/pax/pax.1
  head/bin/pax/pax.c
  head/bin/pax/pax.h
  head/bin/pax/sel_subs.c
  head/bin/pax/sel_subs.h
  head/bin/pax/tables.c
  head/bin/pax/tables.h
  head/bin/pax/tar.c
  head/bin/pax/tar.h
  head/bin/pax/tty_subs.c
  head/bin/ps/extern.h
  head/bin/ps/fmt.c
  head/bin/ps/keyword.c
  head/bin/ps/nlist.c
  head/bin/ps/print.c
  head/bin/ps/ps.1
  head/bin/ps/ps.c
  head/bin/ps/ps.h
  head/bin/pwd/pwd.1
  head/bin/pwd/pwd.c
  head/bin/rcp/extern.h
  head/bin/rcp/rcp.1
  head/bin/rcp/rcp.c
  head/bin/rcp/util.c
  head/bin/realpath/realpath.1
  head/bin/realpath/realpath.c
  head/bin/rm/rm.1
  head/bin/rm/rm.c
  head/bin/rmdir/rmdir.1
  head/bin/rmdir/rmdir.c
  head/bin/sh/alias.c
  head/bin/sh/alias.h
  head/bin/sh/arith.h
  head/bin/sh/bltin/bltin.h
  head/bin/sh/bltin/echo.c
  head/bin/sh/builtins.def
  head/bin/sh/cd.c
  head/bin/sh/cd.h
  head/bin/sh/error.c
  head/bin/sh/error.h
  head/bin/sh/eval.c
  head/bin/sh/eval.h
  head/bin/sh/exec.c
  head/bin/sh/exec.h
  head/bin/sh/expand.c
  head/bin/sh/expand.h
  head/bin/sh/funcs/cmv
  head/bin/sh/funcs/dirs
  head/bin/sh/funcs/login
  head/bin/sh/funcs/newgrp
  head/bin/sh/funcs/popd
  head/bin/sh/funcs/pushd
  head/bin/sh/funcs/suspend
  head/bin/sh/histedit.c
  head/bin/sh/input.c
  head/bin/sh/input.h
  head/bin/sh/jobs.c
  head/bin/sh/jobs.h
  head/bin/sh/mail.c
  head/bin/sh/mail.h
  head/bin/sh/main.c
  head/bin/sh/main.h
  head/bin/sh/memalloc.c
  head/bin/sh/memalloc.h
  head/bin/sh/miscbltin.c
  head/bin/sh/mkbuiltins
  head/bin/sh/mknodes.c
  head/bin/sh/mksyntax.c
  head/bin/sh/mktokens
  head/bin/sh/myhistedit.h
  head/bin/sh/mystring.c
  head/bin/sh/mystring.h
  head/bin/sh/nodes.c.pat
  head/bin/sh/nodetypes
  head/bin/sh/options.c
  head/bin/sh/options.h
  head/bin/sh/output.c
  head/bin/sh/output.h
  head/bin/sh/parser.c
  head/bin/sh/parser.h
  head/bin/sh/redir.c
  head/bin/sh/redir.h
  head/bin/sh/sh.1
  head/bin/sh/shell.h
  head/bin/sh/show.c
  head/bin/sh/show.h
  head/bin/sh/trap.c
  head/bin/sh/trap.h
  head/bin/sh/var.c
  head/bin/sh/var.h
  head/bin/sleep/sleep.1
  head/bin/sleep/sleep.c
  head/bin/stty/cchar.c
  head/bin/stty/extern.h
  head/bin/stty/gfmt.c
  head/bin/stty/key.c
  head/bin/stty/modes.c
  head/bin/stty/print.c
  head/bin/stty/stty.1
  head/bin/stty/stty.c
  head/bin/stty/stty.h
  head/bin/stty/util.c
  head/bin/sync/sync.8
  head/bin/sync/sync.c
  head/bin/test/test.1
  head/contrib/libarchive/libarchive/archive_entry.c
  head/contrib/libarchive/libarchive/archive_read_support_filter_compress.c
  head/contrib/libxo/libxo/xo_syslog.c
  head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po
  head/contrib/libxo/tests/gettext/strerror.pot
  head/contrib/ofed/libcxgb4/src/queue.h
  head/contrib/openbsm/compat/queue.h
  head/contrib/openbsm/compat/vis.h
  head/contrib/sendmail/LICENSE
  head/contrib/tzcode/stdtime/ctime.3
  head/crypto/heimdal/lib/roken/qsort.c
  head/lib/libc/amd64/SYS.h
  head/lib/libc/amd64/gen/_setjmp.S
  head/lib/libc/amd64/gen/setjmp.S
  head/lib/libc/amd6

svn commit: r314435 - in head/sys/contrib/ck: include src

2017-02-28 Thread Olivier Houchard
Author: cognet
Date: Tue Feb 28 23:30:14 2017
New Revision: 314435
URL: https://svnweb.freebsd.org/changeset/base/314435

Log:
  Merge CK as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e, to get
  a fix in ck_epoch.

Modified:
  head/sys/contrib/ck/include/ck_md.h
  head/sys/contrib/ck/src/ck_epoch.c
Directory Properties:
  head/sys/contrib/ck/   (props changed)

Modified: head/sys/contrib/ck/include/ck_md.h
==
--- head/sys/contrib/ck/include/ck_md.h Tue Feb 28 23:26:59 2017
(r314434)
+++ head/sys/contrib/ck/include/ck_md.h Tue Feb 28 23:30:14 2017
(r314435)
@@ -57,7 +57,7 @@
 #define CK_MD_RMO
 #endif /* CK_MD_RMO */
 
-#define CK_VERSION "0.5.2"
+#define CK_VERSION "0.6.0"
 #define CK_GIT_SHA ""
 
 /*

Modified: head/sys/contrib/ck/src/ck_epoch.c
==
--- head/sys/contrib/ck/src/ck_epoch.c  Tue Feb 28 23:26:59 2017
(r314434)
+++ head/sys/contrib/ck/src/ck_epoch.c  Tue Feb 28 23:30:14 2017
(r314435)
@@ -309,11 +309,12 @@ ck_epoch_scan(struct ck_epoch *global,
 {
ck_stack_entry_t *cursor;
 
-   *af = false;
if (cr == NULL) {
cursor = CK_STACK_FIRST(&global->records);
+   *af = false;
} else {
cursor = &cr->record_next;
+   *af = true;
}
 
while (cursor != NULL) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314434 - vendor-sys/ck/20170228

2017-02-28 Thread Olivier Houchard
Author: cognet
Date: Tue Feb 28 23:26:59 2017
New Revision: 314434
URL: https://svnweb.freebsd.org/changeset/base/314434

Log:
  Tag CK import as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e

Added:
  vendor-sys/ck/20170228/
 - copied from r314432, vendor-sys/ck/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314433 - stable/11/sys/cam/scsi

2017-02-28 Thread Alan Somers
Author: asomers
Date: Tue Feb 28 23:26:50 2017
New Revision: 314433
URL: https://svnweb.freebsd.org/changeset/base/314433

Log:
  MFC r312553:
  
  Fix "camcontrol timestamp -s" with LTO-7 drives
  
  The length of the scsi_set_timestamp_parameters struct was incorrect.  LTO-5
  drives don't care, but LTO-7 drives do.
  
  Reviewed by:  Sam Klopsch
  MFC after:2 weeks
  Sponsored by: Spectra Logic Corp

Modified:
  stable/11/sys/cam/scsi/scsi_all.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/scsi/scsi_all.h
==
--- stable/11/sys/cam/scsi/scsi_all.h   Tue Feb 28 23:24:08 2017
(r314432)
+++ stable/11/sys/cam/scsi/scsi_all.h   Tue Feb 28 23:26:50 2017
(r314433)
@@ -3039,7 +3039,7 @@ struct scsi_set_timestamp_parameters
 {
uint8_t reserved1[4];
uint8_t timestamp[6];
-   uint8_t reserved2[4];
+   uint8_t reserved2[2];
 };
 
 struct scsi_report_timestamp_parameter_data
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314432 - vendor-sys/ck/dist/src

2017-02-28 Thread Olivier Houchard
Author: cognet
Date: Tue Feb 28 23:24:08 2017
New Revision: 314432
URL: https://svnweb.freebsd.org/changeset/base/314432

Log:
  Import CK as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e, to get
  a fix in ck_epoch

Modified:
  vendor-sys/ck/dist/src/ck_epoch.c

Modified: vendor-sys/ck/dist/src/ck_epoch.c
==
--- vendor-sys/ck/dist/src/ck_epoch.c   Tue Feb 28 23:03:51 2017
(r314431)
+++ vendor-sys/ck/dist/src/ck_epoch.c   Tue Feb 28 23:24:08 2017
(r314432)
@@ -309,11 +309,12 @@ ck_epoch_scan(struct ck_epoch *global,
 {
ck_stack_entry_t *cursor;
 
-   *af = false;
if (cr == NULL) {
cursor = CK_STACK_FIRST(&global->records);
+   *af = false;
} else {
cursor = &cr->record_next;
+   *af = true;
}
 
while (cursor != NULL) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314429 - in head/sys: amd64/amd64 i386/i386

2017-02-28 Thread Conrad Meyer
Thanks!

On Tue, Feb 28, 2017 at 2:54 PM, Konstantin Belousov  wrote:
> Author: kib
> Date: Tue Feb 28 22:54:52 2017
> New Revision: 314429
> URL: https://svnweb.freebsd.org/changeset/base/314429
>
> Log:
>   Initialize pcb_save for thread0.
>
>   Otherwise kernel traps on NULL dereference if fpu_kern(9) is used from the
>   thread0 context.
>
>   Reported by:  cem
>   Reviewed by:  cem, jhb
>   Sponsored by: The FreeBSD Foundation
>   MFC after:1 week
>
> Modified:
>   head/sys/amd64/amd64/machdep.c
>   head/sys/i386/i386/machdep.c
>
> Modified: head/sys/amd64/amd64/machdep.c
> ==
> --- head/sys/amd64/amd64/machdep.c  Tue Feb 28 22:49:45 2017
> (r314428)
> +++ head/sys/amd64/amd64/machdep.c  Tue Feb 28 22:54:52 2017
> (r314429)
> @@ -1734,6 +1734,7 @@ hammer_time(u_int64_t modulep, u_int64_t
>  * area.
>  */
> thread0.td_pcb = get_pcb_td(&thread0);
> +   thread0.td_pcb->pcb_save = get_pcb_user_save_td(&thread0);
> bzero(get_pcb_user_save_td(&thread0), cpu_max_ext_state_size);
> if (use_xsave) {
> xhdr = (struct xstate_hdr *)(get_pcb_user_save_td(&thread0) +
>
> Modified: head/sys/i386/i386/machdep.c
> ==
> --- head/sys/i386/i386/machdep.cTue Feb 28 22:49:45 2017
> (r314428)
> +++ head/sys/i386/i386/machdep.cTue Feb 28 22:54:52 2017
> (r314429)
> @@ -2420,6 +2420,7 @@ init386(int first)
>  * area.
>  */
> thread0.td_pcb = get_pcb_td(&thread0);
> +   thread0.td_pcb->pcb_save = get_pcb_user_save_td(&thread0);
> bzero(get_pcb_user_save_td(&thread0), cpu_max_ext_state_size);
> if (use_xsave) {
> xhdr = (struct xstate_hdr *)(get_pcb_user_save_td(&thread0) +
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314431 - stable/11/cddl/usr.sbin/zfsd

2017-02-28 Thread Alan Somers
Author: asomers
Date: Tue Feb 28 23:03:51 2017
New Revision: 314431
URL: https://svnweb.freebsd.org/changeset/base/314431

Log:
  MFC r312396:
  
  Fix an unchecked return value in zfsd
  
  It's pretty unlikely to actually hit this, but good to check it anyway
  
  Reported by:  Coverity
  CID:  1362018
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp

Modified:
  stable/11/cddl/usr.sbin/zfsd/case_file.cc
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/cddl/usr.sbin/zfsd/case_file.cc
==
--- stable/11/cddl/usr.sbin/zfsd/case_file.cc   Tue Feb 28 22:58:19 2017
(r314430)
+++ stable/11/cddl/usr.sbin/zfsd/case_file.cc   Tue Feb 28 23:03:51 2017
(r314431)
@@ -656,8 +656,11 @@ CaseFile::DeSerializeFile(const char *fi
uint64_t vdevGUID;
nvlist_t *vdevConf;
 
-   sscanf(fileName, "pool_%" PRIu64 "_vdev_%" PRIu64 ".case",
-  &poolGUID, &vdevGUID);
+   if (sscanf(fileName, "pool_%" PRIu64 "_vdev_%" PRIu64 ".case",
+  &poolGUID, &vdevGUID) != 2) {
+   throw ZfsdException("CaseFile::DeSerialize: "
+   "Unintelligible CaseFile filename %s.\n", fileName);
+   }
existingCaseFile = Find(Guid(poolGUID), Guid(vdevGUID));
if (existingCaseFile != NULL) {
/*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314430 - head/sys/netinet6

2017-02-28 Thread Andrey V. Elsukov
Author: ae
Date: Tue Feb 28 22:58:19 2017
New Revision: 314430
URL: https://svnweb.freebsd.org/changeset/base/314430

Log:
  When IPv6 fragments reassembly is complete, update mbuf's csum_data
  and csum_flags using information from all fragments. This fixes
  dropping of reassembled packets due to wrong checksum when the IPv6
  checksum offloading is enabled on a network card.
  
  Obtained from:Yandex LLC
  MFC after:1 week
  Sponsored by: Yandex LLC

Modified:
  head/sys/netinet6/frag6.c

Modified: head/sys/netinet6/frag6.c
==
--- head/sys/netinet6/frag6.c   Tue Feb 28 22:54:52 2017(r314429)
+++ head/sys/netinet6/frag6.c   Tue Feb 28 22:58:19 2017(r314430)
@@ -528,6 +528,11 @@ insert:
af6 = ip6af->ip6af_down;
frag6_deq(ip6af);
while (af6 != (struct ip6asfrag *)q6) {
+   m->m_pkthdr.csum_flags &=
+   IP6_REASS_MBUF(af6)->m_pkthdr.csum_flags;
+   m->m_pkthdr.csum_data +=
+   IP6_REASS_MBUF(af6)->m_pkthdr.csum_data;
+
af6dwn = af6->ip6af_down;
frag6_deq(af6);
while (t->m_next)
@@ -538,6 +543,10 @@ insert:
af6 = af6dwn;
}
 
+   while (m->m_pkthdr.csum_data & 0x)
+   m->m_pkthdr.csum_data = (m->m_pkthdr.csum_data & 0x) +
+   (m->m_pkthdr.csum_data >> 16);
+
/* adjust offset to point where the original next header starts */
offset = ip6af->ip6af_offset - sizeof(struct ip6_frag);
free(ip6af, M_FTABLE);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314429 - in head/sys: amd64/amd64 i386/i386

2017-02-28 Thread Konstantin Belousov
Author: kib
Date: Tue Feb 28 22:54:52 2017
New Revision: 314429
URL: https://svnweb.freebsd.org/changeset/base/314429

Log:
  Initialize pcb_save for thread0.
  
  Otherwise kernel traps on NULL dereference if fpu_kern(9) is used from the
  thread0 context.
  
  Reported by:  cem
  Reviewed by:  cem, jhb
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/i386/i386/machdep.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Tue Feb 28 22:49:45 2017
(r314428)
+++ head/sys/amd64/amd64/machdep.c  Tue Feb 28 22:54:52 2017
(r314429)
@@ -1734,6 +1734,7 @@ hammer_time(u_int64_t modulep, u_int64_t
 * area.
 */
thread0.td_pcb = get_pcb_td(&thread0);
+   thread0.td_pcb->pcb_save = get_pcb_user_save_td(&thread0);
bzero(get_pcb_user_save_td(&thread0), cpu_max_ext_state_size);
if (use_xsave) {
xhdr = (struct xstate_hdr *)(get_pcb_user_save_td(&thread0) +

Modified: head/sys/i386/i386/machdep.c
==
--- head/sys/i386/i386/machdep.cTue Feb 28 22:49:45 2017
(r314428)
+++ head/sys/i386/i386/machdep.cTue Feb 28 22:54:52 2017
(r314429)
@@ -2420,6 +2420,7 @@ init386(int first)
 * area.
 */
thread0.td_pcb = get_pcb_td(&thread0);
+   thread0.td_pcb->pcb_save = get_pcb_user_save_td(&thread0);
bzero(get_pcb_user_save_td(&thread0), cpu_max_ext_state_size);
if (use_xsave) {
xhdr = (struct xstate_hdr *)(get_pcb_user_save_td(&thread0) +
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314428 - head/sys/mips/conf

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 22:49:45 2017
New Revision: 314428
URL: https://svnweb.freebsd.org/changeset/base/314428

Log:
  Add Ubiquiti Rocket M support
  
  Updated to use geom_uzip
  
  Submitted by:   Michael Vale 
  Pull Request:   https://github.com/freebsd/freebsd/pull/16

Added:
  head/sys/mips/conf/ROCKET_M2HP   (contents, props changed)
  head/sys/mips/conf/ROCKET_M2HP.hints   (contents, props changed)

Added: head/sys/mips/conf/ROCKET_M2HP
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/ROCKET_M2HP  Tue Feb 28 22:49:45 2017
(r314428)
@@ -0,0 +1,70 @@
+#
+# Specific board setup for the Rocket M2 HP board.
+#
+# This board has the following hardware:
+#
+# + AR7241 CPU SoC
+# + AR9287 Wifi
+# + Integrated switch (XXX speed?)
+# + 8MB flash
+# + 32MB RAM
+# + uboot environment
+
+# $FreeBSD$
+
+#NO_UNIVERSE
+
+include"AR724X_BASE"
+ident  "ROCKET_M2HP"
+hints  "ROCKET_M2HP.hints"
+
+optionsAR71XX_REALMEM=32*1024*1024
+
+optionsAR71XX_ENV_UBOOT
+
+# Limit inlines
+makeoptionsINLINE_LIMIT=768
+
+# We bite the performance overhead for now; the kernel won't
+# fit if the mutexes are inlined.
+optionsMUTEX_NOINLINE
+optionsRWLOCK_NOINLINE
+optionsSX_NOINLINE
+
+# There's no need to enable swapping on this platform.
+optionsNO_SWAPPING
+
+# For DOS - enable if required
+# options  MSDOSFS
+
+# uncompress - to boot read-only lzma natively from flash
+device geom_uzip
+optionsGEOM_UZIP
+optionsROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\"
+
+# Not enough space for these..
+nooptions  INVARIANTS
+nooptions  INVARIANT_SUPPORT
+nooptions  WITNESS
+nooptions  WITNESS_SKIPSPIN
+nooptions  DEBUG_REDZONE
+nooptions  DEBUG_MEMGUARD
+
+# Used for the static uboot partition map
+device  geom_map
+
+# Options needed for the EEPROM based calibration/PCI configuration data.
+optionsAR71XX_ATH_EEPROM   # Fetch EEPROM/PCI config from flash
+optionsATH_EEPROM_FIRMWARE # Use EEPROM from flash
+device firmware# Used by the above
+
+# Options required for miiproxy and mdiobus
+optionsARGE_MDIO   # Export an MDIO bus separate from arge
+device miiproxy# MDIO bus <-> MII PHY rendezvous
+
+device etherswitch
+device arswitch
+
+# Enable GPIO
+device gpio
+device gpioled

Added: head/sys/mips/conf/ROCKET_M2HP.hints
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/ROCKET_M2HP.hintsTue Feb 28 22:49:45 2017
(r314428)
@@ -0,0 +1,103 @@
+# $FreeBSD$
+
+# arge1 MDIO bus
+hint.argemdio.0.at="nexus0"
+hint.argemdio.0.maddr=0x1a00
+hint.argemdio.0.msize=0x1000
+hint.argemdio.0.order=0
+
+# Override MAC Address with the one on EEPROM
+hint.arge.0.eeprommac=0x1fff
+
+# arge0: dedicated switch port; RMII; dedicated PHY 4 on switch, connected
+# via internal switch MDIO bus.
+hint.arge.0.media=100   # Map to 100/full
+hint.arge.0.fduplex=1   #
+hint.arge.0.phymask=0x10# PHY4
+hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus
+
+# arge1: nail to 1000/full, RMII - connected to the switch
+hint.arge.1.media=1000  # Map to 1000/full
+hint.arge.1.fduplex=1   #
+hint.arge.1.phymask=0x0 # no directly mapped PHYs
+
+#
+# AR7240 switch config
+#
+hint.arswitch.0.at="mdio0"
+hint.arswitch.0.is_7240=1   # We need to be explicitly told this
+hint.arswitch.0.numphys=4   # 4 active switch PHYs (PHY 0 -> 3)
+hint.arswitch.0.phy4cpu=1   # Yes, PHY 4 == dedicated PHY
+hint.arswitch.0.is_rgmii=0  # No, not RGMII
+hint.arswitch.0.is_gmii=0   # No, not GMII
+
+# ath0 hint - pcie slot 0
+hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1fff1000
+hint.pcib.0.bus.0.0.0.ath_fixup_size=4096
+
+# ath
+hint.ath.0.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware"
+
+# GPIO pins
+# Pin 0: red led (sig1)
+# Pin 1: yellow led (sig2)
+# Pin 11: green len (sig3)
+# Pin 7: green len (sig4)
+# Pin 12: Reset switch
+hint.gpio.0.pinmask=0x1883
+
+# Signal leds
+hint.gpioled.0.at="gpiobus0"
+hint.gpioled.0.name="sig1"
+hint.gpioled.0.pins=0x0001 # pin 0
+hint.gpioled.1.at="gpiobus0"
+hint.gpioled.1.name="sig2"
+hint.gpioled.1.pins=0x0002 # pin 1
+hint.gpioled.2.at="gpiobus0"
+hint.gpioled.2.name="sig3"
+hint.gpioled.2.pins=0x0800 # pin 11
+hint.gpioled.3.at="gpiobus0"
+hint.gpioled.3.name="sig4"
+hint.gpioled.3.pins=0x0080 # pin 7
+
+# GEOM_MAP
+#
+# Rocket M2 HP
+#
+# 
mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),6528k(rootfs),256k(cfg),64k(EEPROM)
+
+hint.map.0.at="flash/spi0"
+hint.map.0.start=0x
+hint.map.0.end=0x0004 

svn commit: r314427 - in stable/11: etc/mtree sbin/devd usr.bin/cmp usr.bin/cmp/tests usr.bin/tail usr.bin/tail/tests usr.sbin/route6d

2017-02-28 Thread Alan Somers
Author: asomers
Date: Tue Feb 28 22:49:41 2017
New Revision: 314427
URL: https://svnweb.freebsd.org/changeset/base/314427

Log:
  MFC r311572, r311895, r311928, r311985, r312395, r312417
  
  r311572:
  Fix file descriptor leaks in cmp(1)
  
  Also, add a few test cases
  
  Reported by:  Coverity
  CID:  271624 275338
  Reviewed by:  ngie
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D9074
  
  r311895:
  Fix memory leaks during "tail -r" of an irregular file
  
  * Rewrite r_buf to use standard tail queues instead of a hand-rolled
circular linked list. Free dynamic allocations when done.
  * Remove an optimization for the case where the file is a multiple of 128KB
in size and there is a scarcity of memory.
  * Add ATF tests for "tail -r" and its variants.
  
  Reported by:  Valgrind
  Reviewed by:  ngie
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D9067
  
  r311928:
  Fix build of usr.bin/tail with GCC
  
  Submitted by: pluknet
  Reported by:  pluknet
  MFC after:27 days
  X-MFC-with:   311895
  Sponsored by: Spectra Logic Corp
  
  r311985:
  Fix uninitialized variable CIDs in route6d
  
  The variables in question are actually return arguments, but it's still good
  form to initialize them.
  
  Reported by:  Coverity
  CID:  979679 979680
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  
  r312395:
  Fix several Coverity CIDs in devd
  
  CID 1362055, 1362054: File descriptor leaks during shutdown
  CID 1362013: Potential null-termination fail with long network device names
  CID 1362097: Uncaught exception during memory pressure
  CID 1362017, 1362016: Unchecked errors, possibly resulting in weird behavior
if two devd instances start at the same time.
  CID 1362015:  Unchecked error that will probably never fail
  
  Reported by:  Coverity
  CID:  1362055 1362054 1362013 1362097 1362017 1362016 1362015
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  
  r312417:
  Fix build of devd with GCC 4.2
  
  Reported by:  olivier
  Pointy-hat-to:asomers
  MFC after:27 days
  X-MFC-with:   312395
  Sponsored by: Spectra Logic Corp

Added:
  stable/11/usr.bin/cmp/tests/cmp_test2.sh
 - copied unchanged from r311572, head/usr.bin/cmp/tests/cmp_test2.sh
  stable/11/usr.bin/tail/tests/
 - copied from r311895, head/usr.bin/tail/tests/
Modified:
  stable/11/etc/mtree/BSD.tests.dist
  stable/11/sbin/devd/devd.cc
  stable/11/usr.bin/cmp/special.c
  stable/11/usr.bin/cmp/tests/Makefile
  stable/11/usr.bin/tail/Makefile
  stable/11/usr.bin/tail/reverse.c
  stable/11/usr.sbin/route6d/route6d.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/mtree/BSD.tests.dist
==
--- stable/11/etc/mtree/BSD.tests.dist  Tue Feb 28 22:22:53 2017
(r314426)
+++ stable/11/etc/mtree/BSD.tests.dist  Tue Feb 28 22:49:41 2017
(r314427)
@@ -632,6 +632,8 @@
 ..
 soelim
 ..
+tail
+..
 tar
 ..
 timeout

Modified: stable/11/sbin/devd/devd.cc
==
--- stable/11/sbin/devd/devd.cc Tue Feb 28 22:22:53 2017(r314426)
+++ stable/11/sbin/devd/devd.cc Tue Feb 28 22:49:41 2017(r314427)
@@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "devd.h"  /* C compatible definitions */
@@ -372,7 +373,7 @@ media::do_match(config &c)
s = socket(PF_INET, SOCK_DGRAM, 0);
if (s >= 0) {
memset(&ifmr, 0, sizeof(ifmr));
-   strncpy(ifmr.ifm_name, value.c_str(), sizeof(ifmr.ifm_name));
+   strlcpy(ifmr.ifm_name, value.c_str(), sizeof(ifmr.ifm_name));
 
if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) >= 0 &&
ifmr.ifm_status & IFM_AVALID) {
@@ -871,8 +872,10 @@ create_socket(const char *name, int sock
if (::bind(fd, (struct sockaddr *) & sun, slen) < 0)
err(1, "bind");
listen(fd, 4);
-   chown(name, 0, 0);  /* XXX - root.wheel */
-   chmod(name, 0666);
+   if (chown(name, 0, 0))  /* XXX - root.wheel */
+   err(1, "chown");
+   if (chmod(name, 0666))
+   err(1, "chmod");
return (fd);
 }
 
@@ -1058,7 +1061,13 @@ event_loop(void)
buffer[rv] = '\0';
while (buffer[--rv] == '\n')
buffer[rv] = '\0';
-   process_event(buffer);
+   try {
+   process_event(buffer);
+   }
+   catch (std::length_error e) {
+

svn commit: r314426 - head/sys/dev/usb

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 22:22:53 2017
New Revision: 314426
URL: https://svnweb.freebsd.org/changeset/base/314426

Log:
  This should have been K3771_INIT.
  
  Pointy Hat to: imp@

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsTue Feb 28 22:18:05 2017(r314425)
+++ head/sys/dev/usb/usbdevsTue Feb 28 22:22:53 2017(r314426)
@@ -2434,7 +2434,7 @@ product HUAWEI E1752  0x1446  3G modem
 product HUAWEI K4505   0x1464  3G modem
 product HUAWEI K3765   0x1465  3G modem
 product HUAWEI E1820   0x14ac  E1820 HSPA+ USB Slider
-product HUAWEI K3771   0x14c4  K3771 Initial
+product HUAWEI K3771_INIT  0x14c4  K3771 Initial
 product HUAWEI K3770   0x14c9  3G modem
 product HUAWEI K3771   0x14ca  K3771
 product HUAWEI K3772   0x14cf  K3772
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314425 - in stable/10: etc/mtree sbin/devd usr.bin/cmp usr.bin/cmp/tests usr.bin/tail usr.bin/tail/tests usr.sbin/route6d

2017-02-28 Thread Alan Somers
Author: asomers
Date: Tue Feb 28 22:18:05 2017
New Revision: 314425
URL: https://svnweb.freebsd.org/changeset/base/314425

Log:
  MFC r311572, r311895, r311928, r311985, r312395, r312417
  
  r311572:
  Fix file descriptor leaks in cmp(1)
  
  Also, add a few test cases
  
  Reported by:  Coverity
  CID:  271624 275338
  Reviewed by:  ngie
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D9074
  
  r311895:
  Fix memory leaks during "tail -r" of an irregular file
  
  * Rewrite r_buf to use standard tail queues instead of a hand-rolled
circular linked list. Free dynamic allocations when done.
  * Remove an optimization for the case where the file is a multiple of 128KB
in size and there is a scarcity of memory.
  * Add ATF tests for "tail -r" and its variants.
  
  Reported by:  Valgrind
  Reviewed by:  ngie
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D9067
  
  r311928:
  Fix build of usr.bin/tail with GCC
  
  Submitted by: pluknet
  Reported by:  pluknet
  MFC after:27 days
  X-MFC-with:   311895
  Sponsored by: Spectra Logic Corp
  
  r311985:
  Fix uninitialized variable CIDs in route6d
  
  The variables in question are actually return arguments, but it's still good
  form to initialize them.
  
  Reported by:  Coverity
  CID:  979679 979680
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  
  r312395:
  Fix several Coverity CIDs in devd
  
  CID 1362055, 1362054: File descriptor leaks during shutdown
  CID 1362013: Potential null-termination fail with long network device names
  CID 1362097: Uncaught exception during memory pressure
  CID 1362017, 1362016: Unchecked errors, possibly resulting in weird behavior
if two devd instances start at the same time.
  CID 1362015:  Unchecked error that will probably never fail
  
  Reported by:  Coverity
  CID:  1362055 1362054 1362013 1362097 1362017 1362016 1362015
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  
  r312417:
  Fix build of devd with GCC 4.2
  
  Reported by:  olivier
  Pointy-hat-to:asomers
  MFC after:27 days
  X-MFC-with:   312395
  Sponsored by: Spectra Logic Corp

Added:
  stable/10/usr.bin/cmp/tests/cmp_test2.sh
 - copied unchanged from r311572, head/usr.bin/cmp/tests/cmp_test2.sh
  stable/10/usr.bin/tail/tests/
 - copied from r311895, head/usr.bin/tail/tests/
Modified:
  stable/10/etc/mtree/BSD.tests.dist
  stable/10/sbin/devd/devd.cc
  stable/10/usr.bin/cmp/special.c
  stable/10/usr.bin/cmp/tests/Makefile
  stable/10/usr.bin/tail/Makefile
  stable/10/usr.bin/tail/reverse.c
  stable/10/usr.sbin/route6d/route6d.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/mtree/BSD.tests.dist
==
--- stable/10/etc/mtree/BSD.tests.dist  Tue Feb 28 21:47:00 2017
(r314424)
+++ stable/10/etc/mtree/BSD.tests.dist  Tue Feb 28 22:18:05 2017
(r314425)
@@ -608,6 +608,8 @@
 regress.multitest.out
 ..
 ..
+tail
+..
 tar
 ..
 timeout

Modified: stable/10/sbin/devd/devd.cc
==
--- stable/10/sbin/devd/devd.cc Tue Feb 28 21:47:00 2017(r314424)
+++ stable/10/sbin/devd/devd.cc Tue Feb 28 22:18:05 2017(r314425)
@@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "devd.h"  /* C compatible definitions */
@@ -372,7 +373,7 @@ media::do_match(config &c)
s = socket(PF_INET, SOCK_DGRAM, 0);
if (s >= 0) {
memset(&ifmr, 0, sizeof(ifmr));
-   strncpy(ifmr.ifm_name, value.c_str(), sizeof(ifmr.ifm_name));
+   strlcpy(ifmr.ifm_name, value.c_str(), sizeof(ifmr.ifm_name));
 
if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) >= 0 &&
ifmr.ifm_status & IFM_AVALID) {
@@ -856,8 +857,10 @@ create_socket(const char *name, int sock
if (::bind(fd, (struct sockaddr *) & sun, slen) < 0)
err(1, "bind");
listen(fd, 4);
-   chown(name, 0, 0);  /* XXX - root.wheel */
-   chmod(name, 0666);
+   if (chown(name, 0, 0))  /* XXX - root.wheel */
+   err(1, "chown");
+   if (chmod(name, 0666))
+   err(1, "chmod");
return (fd);
 }
 
@@ -1043,7 +1046,13 @@ event_loop(void)
buffer[rv] = '\0';
while (buffer[--rv] == '\n')
buffer[rv] = '\0';
-   process_event(buffer);
+   try {
+   process_event(buffer);
+   }
+   catch (std::leng

Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Konstantin Belousov
On Tue, Feb 28, 2017 at 05:14:43AM +, Gleb Smirnoff wrote:
> Author: glebius
> Date: Tue Feb 28 05:14:42 2017
> New Revision: 314373
> URL: https://svnweb.freebsd.org/changeset/base/314373
> 
> Log:
>   Remove SVR4 (System V Release 4) binary compatibility support.
>   
>   UNIX System V Release 4 is operating system released in 1988. It ceased
>   to exist in early 2000-s.

It is also Solaris ABI which was emulated.  Since the stuff is removed,
the i386 LSOL26CALLS LDT selector is no longer needed.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314420 - head/sys/kern

2017-02-28 Thread Conrad Meyer
On Tue, Feb 28, 2017 at 1:27 PM, Scott Long  wrote:
> Author: scottl
> Date: Tue Feb 28 21:27:51 2017
> New Revision: 314420
> URL: https://svnweb.freebsd.org/changeset/base/314420
>
> Log:
>   Provide a comment on why stdio.h needs to be included.
>
> Modified:
>   head/sys/kern/subr_prf.c
>
> Modified: head/sys/kern/subr_prf.c
> ==
> --- head/sys/kern/subr_prf.cTue Feb 28 21:18:45 2017(r314419)
> +++ head/sys/kern/subr_prf.cTue Feb 28 21:27:51 2017(r314420)
> @@ -76,6 +76,13 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #else
>  #include 
> +#endif
> +
> +/*
> + * This is needed for sbuf_putbuf() when compiled into userland.  Due to the
> + * shared nature of this file, it's the only place to put it.

Couldn't it go in the #else clause above?

Best,
Conrad
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314424 - in head: include lib/libc/gen

2017-02-28 Thread Eric van Gyzen
Author: vangyzen
Date: Tue Feb 28 21:47:00 2017
New Revision: 314424
URL: https://svnweb.freebsd.org/changeset/base/314424

Log:
  Sort declaration of sem_clockwait_np
  
  Also mention  in sem_timedwait(3), because POSIX does,
  and because the user will need it for clockid_t, struct timespec,
  and TIMER_ABSTIME.
  
  Reported by:  bde
  MFC after:9 days
  X-MFC with:   r314179
  Sponsored by: Dell EMC

Modified:
  head/include/semaphore.h
  head/lib/libc/gen/sem_timedwait.3

Modified: head/include/semaphore.h
==
--- head/include/semaphore.hTue Feb 28 21:39:08 2017(r314423)
+++ head/include/semaphore.hTue Feb 28 21:47:00 2017(r314424)
@@ -52,6 +52,10 @@ typedef  struct _sem sem_t;
 struct timespec;
 
 __BEGIN_DECLS
+#if __BSD_VISIBLE
+int sem_clockwait_np(sem_t * __restrict, __clockid_t, int,
+   const struct timespec *, struct timespec *);
+#endif
 int sem_close(sem_t *);
 int sem_destroy(sem_t *);
 int sem_getvalue(sem_t * __restrict, int * __restrict);
@@ -59,10 +63,6 @@ int   sem_init(sem_t *, int, unsigned int
 sem_t  *sem_open(const char *, int, ...);
 int sem_post(sem_t *);
 int sem_timedwait(sem_t * __restrict, const struct timespec * __restrict);
-#if __BSD_VISIBLE
-int sem_clockwait_np(sem_t * __restrict, __clockid_t, int,
-   const struct timespec *, struct timespec *);
-#endif
 int sem_trywait(sem_t *);
 int sem_unlink(const char *);
 int sem_wait(sem_t *);

Modified: head/lib/libc/gen/sem_timedwait.3
==
--- head/lib/libc/gen/sem_timedwait.3   Tue Feb 28 21:39:08 2017
(r314423)
+++ head/lib/libc/gen/sem_timedwait.3   Tue Feb 28 21:47:00 2017
(r314424)
@@ -34,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 23, 2017
+.Dd February 28, 2017
 .Dt SEM_TIMEDWAIT 3
 .Os
 .Sh NAME
@@ -45,6 +45,7 @@
 .Lb libc
 .Sh SYNOPSIS
 .In semaphore.h
+.In time.h
 .Ft int
 .Fn sem_timedwait "sem_t * restrict sem" "const struct timespec * restrict 
abs_timeout"
 .Ft int
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314423 - head/sys/mips/conf

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 21:39:08 2017
New Revision: 314423
URL: https://svnweb.freebsd.org/changeset/base/314423

Log:
  Fix arge0 mdio bus
  
  This makes arge0 phy's attach.
  
  Submitted by: Michael Vale 
  Pull Request: https://github.com/freebsd/freebsd/pull/16

Modified:
  head/sys/mips/conf/PICOSTATION_M2HP.hints

Modified: head/sys/mips/conf/PICOSTATION_M2HP.hints
==
--- head/sys/mips/conf/PICOSTATION_M2HP.hints   Tue Feb 28 21:39:00 2017
(r314422)
+++ head/sys/mips/conf/PICOSTATION_M2HP.hints   Tue Feb 28 21:39:08 2017
(r314423)
@@ -1,8 +1,8 @@
 # $FreeBSD$
 
-# arge1 MDIO bus
+# arge0 MDIO bus
 hint.argemdio.0.at="nexus0"
-hint.argemdio.0.maddr=0x1a00
+hint.argemdio.0.maddr=0x1900
 hint.argemdio.0.msize=0x1000
 hint.argemdio.0.order=0
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314422 - head/sys/mips/conf

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 21:39:00 2017
New Revision: 314422
URL: https://svnweb.freebsd.org/changeset/base/314422

Log:
  Update PICOSTATION_M2HP
  
  Make the random number generator work so we can do WPA encryption on the AP's.
  
  Submitted by: Michael Vale 
  Pull Request: https://github.com/freebsd/freebsd/pull/16

Modified:
  head/sys/mips/conf/PICOSTATION_M2HP

Modified: head/sys/mips/conf/PICOSTATION_M2HP
==
--- head/sys/mips/conf/PICOSTATION_M2HP Tue Feb 28 21:30:26 2017
(r314421)
+++ head/sys/mips/conf/PICOSTATION_M2HP Tue Feb 28 21:39:00 2017
(r314422)
@@ -68,3 +68,6 @@ devicearswitch
 # Enable GPIO
 device gpio
 device gpioled
+
+# RNG
+devicerandom
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Benjamin Kaduk
On Tue, Feb 28, 2017 at 3:30 PM, Gleb Smirnoff  wrote:

> On Tue, Feb 28, 2017 at 01:39:12PM -0600, Benjamin Kaduk wrote:
> B> > I don't think this deserves UPDATING entry, since it doesn't require
> B> > any action from a person who updates from sources.
> B> >
> B> > I don't think this requires __FreeBSD_version bump, since the latter
> B> > is used to assist compilation of open source application that use
> B> > changed API. The change removed support to run binaries.
> B> >
> B>
> B> That is not the only use of __FreeBSD_version, which is (at least)
> exposed
> B> to the ports collection and can cause conditional changes in what are
> B> shipped by ports.
> B> Which is not to say that any current ports ship affected binaries, of
> B> course, but just to point out that the scope of the symbol is broader
> than
> B> stated.
>
> How can I check the __FreeBSD_version in a port Makefile? My understanding
> is that there is no standard way for such thing. Of course I can parse
> /usr/include/sys/param.h...
>
> My understanding is that the constant is for sources only:
>
> https://www.freebsd.org/doc/en/books/porters-handbook/
> porting-versions.html
>
>
Look for OSVERSION in /usr/ports/Mk/bsd.port.mk

-Ben
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Gleb Smirnoff
On Tue, Feb 28, 2017 at 01:39:12PM -0600, Benjamin Kaduk wrote:
B> > I don't think this deserves UPDATING entry, since it doesn't require
B> > any action from a person who updates from sources.
B> >
B> > I don't think this requires __FreeBSD_version bump, since the latter
B> > is used to assist compilation of open source application that use
B> > changed API. The change removed support to run binaries.
B> >
B> 
B> That is not the only use of __FreeBSD_version, which is (at least) exposed
B> to the ports collection and can cause conditional changes in what are
B> shipped by ports.
B> Which is not to say that any current ports ship affected binaries, of
B> course, but just to point out that the scope of the symbol is broader than
B> stated.

How can I check the __FreeBSD_version in a port Makefile? My understanding
is that there is no standard way for such thing. Of course I can parse
/usr/include/sys/param.h...

My understanding is that the constant is for sources only:

https://www.freebsd.org/doc/en/books/porters-handbook/porting-versions.html

-- 
Totus tuus, Glebius.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314420 - head/sys/kern

2017-02-28 Thread Scott Long
Author: scottl
Date: Tue Feb 28 21:27:51 2017
New Revision: 314420
URL: https://svnweb.freebsd.org/changeset/base/314420

Log:
  Provide a comment on why stdio.h needs to be included.

Modified:
  head/sys/kern/subr_prf.c

Modified: head/sys/kern/subr_prf.c
==
--- head/sys/kern/subr_prf.cTue Feb 28 21:18:45 2017(r314419)
+++ head/sys/kern/subr_prf.cTue Feb 28 21:27:51 2017(r314420)
@@ -76,6 +76,13 @@ __FBSDID("$FreeBSD$");
 #include 
 #else
 #include 
+#endif
+
+/*
+ * This is needed for sbuf_putbuf() when compiled into userland.  Due to the
+ * shared nature of this file, it's the only place to put it.
+ */
+#ifndef _KERNEL
 #include 
 #endif
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314419 - head/sys/kern

2017-02-28 Thread Jung-uk Kim
Author: jkim
Date: Tue Feb 28 21:18:45 2017
New Revision: 314419
URL: https://svnweb.freebsd.org/changeset/base/314419

Log:
  Include stdio.h to fix libsbuf build.
  
  Reviewed by:  scottl

Modified:
  head/sys/kern/subr_prf.c

Modified: head/sys/kern/subr_prf.c
==
--- head/sys/kern/subr_prf.cTue Feb 28 21:18:23 2017(r314418)
+++ head/sys/kern/subr_prf.cTue Feb 28 21:18:45 2017(r314419)
@@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #else
 #include 
+#include 
 #endif
 
 #ifdef _KERNEL
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314417 - vendor/lldb/lldb-release_40-r296509

2017-02-28 Thread Dimitry Andric
Author: dim
Date: Tue Feb 28 21:07:46 2017
New Revision: 314417
URL: https://svnweb.freebsd.org/changeset/base/314417

Log:
  Tag lldb release_40 branch r296509.

Added:
  vendor/lldb/lldb-release_40-r296509/
 - copied from r314416, vendor/lldb/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314415 - vendor/libc++/libc++-release_40-r296509

2017-02-28 Thread Dimitry Andric
Author: dim
Date: Tue Feb 28 21:07:38 2017
New Revision: 314415
URL: https://svnweb.freebsd.org/changeset/base/314415

Log:
  Tag libc++ release_40 branch r296509.

Added:
  vendor/libc++/libc++-release_40-r296509/
 - copied from r314414, vendor/libc++/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314416 - vendor/lld/lld-release_40-r296509

2017-02-28 Thread Dimitry Andric
Author: dim
Date: Tue Feb 28 21:07:41 2017
New Revision: 314416
URL: https://svnweb.freebsd.org/changeset/base/314416

Log:
  Tag lld release_40 branch r296509.

Added:
  vendor/lld/lld-release_40-r296509/
 - copied from r314415, vendor/lld/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314412 - vendor/llvm/llvm-release_40-r296509

2017-02-28 Thread Dimitry Andric
Author: dim
Date: Tue Feb 28 21:07:22 2017
New Revision: 314412
URL: https://svnweb.freebsd.org/changeset/base/314412

Log:
  Tag llvm release_40 branch r296509.

Added:
  vendor/llvm/llvm-release_40-r296509/
 - copied from r314411, vendor/llvm/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314414 - vendor/compiler-rt/compiler-rt-release_40-r296509

2017-02-28 Thread Dimitry Andric
Author: dim
Date: Tue Feb 28 21:07:32 2017
New Revision: 314414
URL: https://svnweb.freebsd.org/changeset/base/314414

Log:
  Tag compiler-rt release_40 branch r296509.

Added:
  vendor/compiler-rt/compiler-rt-release_40-r296509/
 - copied from r314413, vendor/compiler-rt/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314413 - vendor/clang/clang-release_40-r296509

2017-02-28 Thread Dimitry Andric
Author: dim
Date: Tue Feb 28 21:07:28 2017
New Revision: 314413
URL: https://svnweb.freebsd.org/changeset/base/314413

Log:
  Tag clang release_40 branch r296509.

Added:
  vendor/clang/clang-release_40-r296509/
 - copied from r314412, vendor/clang/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314411 - in vendor/llvm/dist: docs lib/CodeGen test/CodeGen/X86 test/tools/llvm-xray/X86 test/tools/llvm-xray/X86/Inputs tools/llvm-xray

2017-02-28 Thread Dimitry Andric
Author: dim
Date: Tue Feb 28 21:07:18 2017
New Revision: 314411
URL: https://svnweb.freebsd.org/changeset/base/314411

Log:
  Vendor import of llvm release_40 branch r296509:
  https://llvm.org/svn/llvm-project/llvm/branches/release_40@296509

Added:
  vendor/llvm/dist/test/CodeGen/X86/pr30284.ll
Modified:
  vendor/llvm/dist/docs/ReleaseNotes.rst
  vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp
  vendor/llvm/dist/test/tools/llvm-xray/X86/Inputs/simple-xray-instrmap.yaml
  vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-case.yaml
  vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-sorting.yaml
  vendor/llvm/dist/test/tools/llvm-xray/X86/convert-roundtrip.yaml
  vendor/llvm/dist/test/tools/llvm-xray/X86/convert-to-yaml.txt
  vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-debug-syms.txt
  vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt
  vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt
  vendor/llvm/dist/test/tools/llvm-xray/X86/extract-instrmap.ll
  vendor/llvm/dist/tools/llvm-xray/xray-converter.cc
  vendor/llvm/dist/tools/llvm-xray/xray-extract.cc

Modified: vendor/llvm/dist/docs/ReleaseNotes.rst
==
--- vendor/llvm/dist/docs/ReleaseNotes.rst  Tue Feb 28 20:51:20 2017
(r314410)
+++ vendor/llvm/dist/docs/ReleaseNotes.rst  Tue Feb 28 21:07:18 2017
(r314411)
@@ -20,6 +20,14 @@ have questions or comments, the `LLVM De
 `_ is a good place to send
 them.
 
+New Versioning Scheme
+=
+Starting with this release, LLVM is using a
+`new versioning scheme 
`_,
+increasing the major version number with each major release. Stable updates to
+this release will be versioned 4.0.x, and the next major release, six months
+from now, will be version 5.0.0.
+
 Non-comprehensive list of changes in this release
 =
 * Minimum compiler version to build has been raised to GCC 4.8 and VS 2015.
@@ -238,6 +246,34 @@ Most of the work behind the scenes has b
 assembly, and also fixing some assertions we would hit on some well-formed
 inputs.
 
+Changes to the MIPS Target
+-
+
+**During this release the MIPS target has:**
+
+* IAS is now enabled by default for Debian mips64el.
+* Added support for the two operand form for many instructions.
+* Added the following macros: unaligned load/store, seq, double word 
load/store for O32.
+* Improved the parsing of complex memory offset expressions.
+* Enabled the integrated assembler by default for Debian mips64el.
+* Added a generic scheduler based on the interAptiv CPU.
+* Added support for thread local relocations.
+* Added recip, rsqrt, evp, dvp, synci instructions in IAS.
+* Optimized the generation of constants from some cases.
+
+**The following issues have been fixed:**
+
+* Thread local debug information is correctly recorded.
+* MSA intrinsics are now range checked.
+* Fixed an issue with MSA and the no-odd-spreg abi.
+* Fixed some corner cases in handling forbidden slots for MIPSR6.
+* Fixed an issue with jumps not being converted to relative branches for 
assembly.
+* Fixed the handling of local symbols and jal instruction.
+* N32/N64 no longer have their relocation tables sorted as per their ABIs.
+* Fixed a crash when half-precision floating point conversion MSA intrinsics 
are used.
+* Fixed several crashes involving FastISel.
+* Corrected the corrected definitions for aui/daui/dahi/dati for MIPSR6.
+
 Changes to the OCaml bindings
 -
 

Modified: vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp
==
--- vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp   Tue Feb 28 20:51:20 
2017(r314410)
+++ vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp   Tue Feb 28 21:07:18 
2017(r314411)
@@ -707,9 +707,8 @@ void ExeDepsFix::visitSoftInstr(MachineI
 
   // Kill off any remaining uses that don't match available, and build a list 
of
   // incoming DomainValues that we want to merge.
-  SmallVector Regs;
-  for (SmallVectorImpl::iterator i=used.begin(), e=used.end(); i!=e; ++i) 
{
-int rx = *i;
+  SmallVector Regs;
+  for (int rx : used) {
 assert(LiveRegs && "no space allocated for live registers");
 const LiveReg &LR = LiveRegs[rx];
 // This useless DomainValue could have been missed above.
@@ -718,16 +717,11 @@ void ExeDepsFix::visitSoftInstr(MachineI
   continue;
 }
 // Sorted insertion.
-bool Inserted = false;
-for (SmallVectorImpl::iterator i = Regs.begin(), e = Regs.end();
-   i != e && !Inserted; ++i) {
-  if (LR.Def < i->Def) {
-Inserted = true;
-Regs.insert(i, LR);
-  }
-}
-if (!Inserted)
-  Regs.push_back

svn commit: r314409 - head/usr.bin/dc

2017-02-28 Thread Pedro F. Giffuni
Author: pfg
Date: Tue Feb 28 20:50:49 2017
New Revision: 314409
URL: https://svnweb.freebsd.org/changeset/base/314409

Log:
  dc(1): Introduce e command, equivalent to p, but writes to stderr
  
  Obtained from:OpenBSD
  MFC after:2 weeks

Modified:
  head/usr.bin/dc/bcode.c
  head/usr.bin/dc/dc.1

Modified: head/usr.bin/dc/bcode.c
==
--- head/usr.bin/dc/bcode.c Tue Feb 28 20:34:25 2017(r314408)
+++ head/usr.bin/dc/bcode.c Tue Feb 28 20:50:49 2017(r314409)
@@ -69,6 +69,7 @@ static __inline struct number *pop_numbe
 static __inline char   *pop_string(void);
 static __inline voidclear_stack(void);
 static __inline voidprint_tos(void);
+static void print_err(void);
 static void pop_print(void);
 static void pop_printn(void);
 static __inline voidprint_stack(void);
@@ -198,6 +199,7 @@ static const struct jump_entry jump_tabl
{ 'a',  to_ascii},
{ 'c',  clear_stack },
{ 'd',  dup },
+   { 'e',  print_err   },
{ 'f',  print_stack },
{ 'i',  set_ibase   },
{ 'k',  set_scale   },
@@ -508,6 +510,18 @@ print_tos(void)
 }
 
 static void
+print_err(void)
+{
+   struct value *value = tos();
+   if (value != NULL) {
+   print_value(stderr, value, "", bmachine.obase);
+   (void)putc('\n', stderr);
+   }
+   else
+   warnx("stack empty");
+}
+
+static void
 pop_print(void)
 {
struct value *value = pop();

Modified: head/usr.bin/dc/dc.1
==
--- head/usr.bin/dc/dc.1Tue Feb 28 20:34:25 2017(r314408)
+++ head/usr.bin/dc/dc.1Tue Feb 28 20:50:49 2017(r314409)
@@ -35,7 +35,7 @@
 .\"
 .\"@(#)dc.18.1 (Berkeley) 6/6/93
 .\"
-.Dd April 16, 2014
+.Dd February 27, 2017
 .Dt DC 1
 .Os
 .Sh NAME
@@ -196,6 +196,10 @@ operator is a non-portable extension.
 All values on the stack are popped.
 .It Ic d
 The top value on the stack is duplicated.
+.It Ic e
+Equivalent to
+.Ic p ,
+except that the output is written to the standard error stream.
 .It Ic f
 All values on the stack are printed, separated by newlines.
 .It Ic G
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314410 - head/sys/geom/part

2017-02-28 Thread Mariusz Zaborski
Author: oshogbo
Date: Tue Feb 28 20:51:20 2017
New Revision: 314410
URL: https://svnweb.freebsd.org/changeset/base/314410

Log:
  The kern.geom.part.auto_resize should be tunable.

Modified:
  head/sys/geom/part/g_part.c

Modified: head/sys/geom/part/g_part.c
==
--- head/sys/geom/part/g_part.c Tue Feb 28 20:50:49 2017(r314409)
+++ head/sys/geom/part/g_part.c Tue Feb 28 20:51:20 2017(r314410)
@@ -137,7 +137,7 @@ SYSCTL_UINT(_kern_geom_part, OID_AUTO, c
 "Enable integrity checking");
 static u_int auto_resize = 1;
 SYSCTL_UINT(_kern_geom_part, OID_AUTO, auto_resize,
-CTLFLAG_RW, &auto_resize, 1,
+CTLFLAG_RWTUN, &auto_resize, 1,
 "Enable auto resize");
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314408 - head/include/arpa

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 20:34:25 2017
New Revision: 314408
URL: https://svnweb.freebsd.org/changeset/base/314408

Log:
  Fix include/arpa/nameser_compat.h by adding T_DNAME definition.
  Fixes Apache trafficserver
  
  Submitted by: John J. Rushford 
  Pull Request: https://github.com/freebsd/freebsd/pull/104

Modified:
  head/include/arpa/nameser_compat.h

Modified: head/include/arpa/nameser_compat.h
==
--- head/include/arpa/nameser_compat.h  Tue Feb 28 20:25:45 2017
(r314407)
+++ head/include/arpa/nameser_compat.h  Tue Feb 28 20:34:25 2017
(r314408)
@@ -175,6 +175,7 @@ typedef struct {
 #define T_ATMA ns_t_atma
 #define T_NAPTRns_t_naptr
 #define T_A6   ns_t_a6
+#define T_DNAMEns_t_dname
 #define T_OPT  ns_t_opt
 #defineT_TSIG  ns_t_tsig
 #defineT_IXFR  ns_t_ixfr
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314404 - head/sys/compat/linux

2017-02-28 Thread Conrad Meyer
On Tue, Feb 28, 2017 at 11:55 AM, Dmitry Chagin  wrote:
> Author: dchagin
> Date: Tue Feb 28 19:55:16 2017
> New Revision: 314404
> URL: https://svnweb.freebsd.org/changeset/base/314404
>
> Log:
>   Linux epoll return EEXIST on case when op is EPOLL_CTL_ADD, and the supplied
>   file descriptor fd is already registered with this epoll instance.

Hi Dmitry,

Do we have an automated test suite for epoll behavior compliance?  If
you have some existing test programs you're using to determine
compatibility, it would be good to adapt those to a test framework and
commit them as well.

Thanks,
Conrad
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314407 - in head/sys/dev/usb: . serial

2017-02-28 Thread Warner Losh
Author: imp
Date: Tue Feb 28 20:25:45 2017
New Revision: 314407
URL: https://svnweb.freebsd.org/changeset/base/314407

Log:
  Add support for Vodafone/Huawei K3771.
  See also http://www.draisberghof.de/usb_modeswitch/device_reference.txt
  
  Submitted by: Dean Hamstead 
  Pull Request: https://github.com/freebsd/freebsd/pull/76

Modified:
  head/sys/dev/usb/serial/u3g.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/serial/u3g.c
==
--- head/sys/dev/usb/serial/u3g.c   Tue Feb 28 20:07:04 2017
(r314406)
+++ head/sys/dev/usb/serial/u3g.c   Tue Feb 28 20:25:45 2017
(r314407)
@@ -316,6 +316,8 @@ static const STRUCT_USB_HOST_ID u3g_devs
U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI),
U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI),
U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI),
+   U3G_DEV(HUAWEI, K3771, U3GINIT_HUAWEI),
+   U3G_DEV(HUAWEI, K3771_INIT, U3GINIT_HUAWEISCSI2),
U3G_DEV(HUAWEI, K3772, U3GINIT_HUAWEI),
U3G_DEV(HUAWEI, K3772_INIT, U3GINIT_HUAWEISCSI2),
U3G_DEV(HUAWEI, K3765, U3GINIT_HUAWEI),

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsTue Feb 28 20:07:04 2017(r314406)
+++ head/sys/dev/usb/usbdevsTue Feb 28 20:25:45 2017(r314407)
@@ -2434,7 +2434,9 @@ product HUAWEI E1752  0x1446  3G modem
 product HUAWEI K4505   0x1464  3G modem
 product HUAWEI K3765   0x1465  3G modem
 product HUAWEI E1820   0x14ac  E1820 HSPA+ USB Slider
+product HUAWEI K3771   0x14c4  K3771 Initial
 product HUAWEI K3770   0x14c9  3G modem
+product HUAWEI K3771   0x14ca  K3771
 product HUAWEI K3772   0x14cf  K3772
 product HUAWEI K3770_INIT  0x14d1  K3770 Initial
 product HUAWEI E3131_INIT  0x14fe  3G modem initial
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314399 - head/sys/sys

2017-02-28 Thread Cy Schubert
Cy Schubert writes:
> In message <201702281901.v1sj1xke089...@repo.freebsd.org>, Scott Long 
> writes:
> > Author: scottl
> > Date: Tue Feb 28 19:01:59 2017
> > New Revision: 314399
> > URL: https://svnweb.freebsd.org/changeset/base/314399
> > 
> > Log:
> >   Add prototype for sbuf_putbuf()
> >   
> >   Sponsored by: Netflix
> > 
> > Modified:
> >   head/sys/sys/sbuf.h
> > 
> > Modified: head/sys/sys/sbuf.h
> > ===
> ==
> > =
> > --- head/sys/sys/sbuf.h Tue Feb 28 18:48:12 2017(r314398)
> > +++ head/sys/sys/sbuf.h Tue Feb 28 19:01:59 2017(r314399)
> > @@ -99,6 +99,7 @@ void   sbuf_start_section(struct sbuf *,
> >  ssize_t sbuf_end_section(struct sbuf *, ssize_t, size_t, int);
> >  voidsbuf_hexdump(struct sbuf *, const void *, int, const c
> har *,
> >  int);
> > +voidsbuf_putbuf(struct sbuf *);
> >  
> >  #ifdef _KERNEL
> >  struct uio;
> > 
> > 
> 
> Hi Scott,
> 
> This causes,
> 
> /opt/src/svn-current/lib/libsbuf/../../sys/kern/subr_prf.c:1243:2: error: 
> implicitly declaring library function 'printf' with type 'int (const char 
> *, ...)' [-Werror,-Wimplicit-function-declaration]
> printf("%s", sbuf_data(sb));
> ^
> /opt/src/svn-current/lib/libsbuf/../../sys/kern/subr_prf.c:1243:2: note: 
> include the header  or explicitly provide a declaration for 
> 'printf'
> 1 error generated.
> *** [subr_prf.pico] Error code 1
> 
> make[4]: stopped in /opt/src/svn-current/lib/libsbuf
> 1 error
> 
> 
> ... and the fix...
> 
> Index: sys/kern/subr_prf.c
> ===
> --- sys/kern/subr_prf.c   (revision 314404)
> +++ sys/kern/subr_prf.c   (working copy)
> @@ -60,6 +60,8 @@
>  #include 
>  #include 
>  #include 
> +#else
> +#include 
>  #endif
>  #include 
>  #include 

I picked the wrong one in exmh. This should be for r314397 instead.



-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314399 - head/sys/sys

2017-02-28 Thread Cy Schubert
In message <201702281901.v1sj1xke089...@repo.freebsd.org>, Scott Long 
writes:
> Author: scottl
> Date: Tue Feb 28 19:01:59 2017
> New Revision: 314399
> URL: https://svnweb.freebsd.org/changeset/base/314399
> 
> Log:
>   Add prototype for sbuf_putbuf()
>   
>   Sponsored by:   Netflix
> 
> Modified:
>   head/sys/sys/sbuf.h
> 
> Modified: head/sys/sys/sbuf.h
> =
> =
> --- head/sys/sys/sbuf.h   Tue Feb 28 18:48:12 2017(r314398)
> +++ head/sys/sys/sbuf.h   Tue Feb 28 19:01:59 2017(r314399)
> @@ -99,6 +99,7 @@ void sbuf_start_section(struct sbuf *,
>  ssize_t   sbuf_end_section(struct sbuf *, ssize_t, size_t, int);
>  void  sbuf_hexdump(struct sbuf *, const void *, int, const char *,
>int);
> +void  sbuf_putbuf(struct sbuf *);
>  
>  #ifdef _KERNEL
>  struct uio;
> 
> 

Hi Scott,

This causes,

/opt/src/svn-current/lib/libsbuf/../../sys/kern/subr_prf.c:1243:2: error: 
implicitly declaring library function 'printf' with type 'int (const char 
*, ...)' [-Werror,-Wimplicit-function-declaration]
printf("%s", sbuf_data(sb));
^
/opt/src/svn-current/lib/libsbuf/../../sys/kern/subr_prf.c:1243:2: note: 
include the header  or explicitly provide a declaration for 
'printf'
1 error generated.
*** [subr_prf.pico] Error code 1

make[4]: stopped in /opt/src/svn-current/lib/libsbuf
1 error


... and the fix...

Index: sys/kern/subr_prf.c
===
--- sys/kern/subr_prf.c (revision 314404)
+++ sys/kern/subr_prf.c (working copy)
@@ -60,6 +60,8 @@
 #include 
 #include 
 #include 
+#else
+#include 
 #endif
 #include 
 #include 


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314406 - vendor-sys/acpica/20170224

2017-02-28 Thread Jung-uk Kim
Author: jkim
Date: Tue Feb 28 20:07:04 2017
New Revision: 314406
URL: https://svnweb.freebsd.org/changeset/base/314406

Log:
  Tag ACPICA 20170224.

Added:
  vendor-sys/acpica/20170224/
 - copied from r314405, vendor-sys/acpica/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314405 - in vendor-sys/acpica/dist: . generate/unix/iasl source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/com...

2017-02-28 Thread Jung-uk Kim
Author: jkim
Date: Tue Feb 28 20:06:31 2017
New Revision: 314405
URL: https://svnweb.freebsd.org/changeset/base/314405

Log:
  Import ACPICA 20170224.

Added:
  vendor-sys/acpica/dist/source/compiler/cvcompiler.c   (contents, props 
changed)
  vendor-sys/acpica/dist/source/compiler/cvdisasm.c   (contents, props changed)
  vendor-sys/acpica/dist/source/compiler/cvparser.c   (contents, props changed)
  vendor-sys/acpica/dist/source/include/acconvert.h   (contents, props changed)
Modified:
  vendor-sys/acpica/dist/changes.txt
  vendor-sys/acpica/dist/generate/unix/iasl/Makefile
  vendor-sys/acpica/dist/source/common/adisasm.c
  vendor-sys/acpica/dist/source/common/adwalk.c
  vendor-sys/acpica/dist/source/common/dmextern.c
  vendor-sys/acpica/dist/source/common/dmtables.c
  vendor-sys/acpica/dist/source/common/dmtbinfo.c
  vendor-sys/acpica/dist/source/compiler/aslcodegen.c
  vendor-sys/acpica/dist/source/compiler/aslcompile.c
  vendor-sys/acpica/dist/source/compiler/aslcompiler.h
  vendor-sys/acpica/dist/source/compiler/aslcompiler.l
  vendor-sys/acpica/dist/source/compiler/asldebug.c
  vendor-sys/acpica/dist/source/compiler/asldefine.h
  vendor-sys/acpica/dist/source/compiler/aslfiles.c
  vendor-sys/acpica/dist/source/compiler/aslglobal.h
  vendor-sys/acpica/dist/source/compiler/aslhelp.c
  vendor-sys/acpica/dist/source/compiler/asllength.c
  vendor-sys/acpica/dist/source/compiler/aslmap.c
  vendor-sys/acpica/dist/source/compiler/asloffset.c
  vendor-sys/acpica/dist/source/compiler/asloperands.c
  vendor-sys/acpica/dist/source/compiler/asloptions.c
  vendor-sys/acpica/dist/source/compiler/aslprimaries.y
  vendor-sys/acpica/dist/source/compiler/aslprintf.c
  vendor-sys/acpica/dist/source/compiler/aslresources.y
  vendor-sys/acpica/dist/source/compiler/aslrules.y
  vendor-sys/acpica/dist/source/compiler/aslstartup.c
  vendor-sys/acpica/dist/source/compiler/aslsupport.l
  vendor-sys/acpica/dist/source/compiler/asltree.c
  vendor-sys/acpica/dist/source/compiler/asltypes.h
  vendor-sys/acpica/dist/source/compiler/aslwalks.c
  vendor-sys/acpica/dist/source/compiler/dttable1.c
  vendor-sys/acpica/dist/source/compiler/dttemplate.h
  vendor-sys/acpica/dist/source/components/debugger/dbmethod.c
  vendor-sys/acpica/dist/source/components/debugger/dbxface.c
  vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c
  vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c
  vendor-sys/acpica/dist/source/components/disassembler/dmnames.c
  vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c
  vendor-sys/acpica/dist/source/components/disassembler/dmutils.c
  vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c
  vendor-sys/acpica/dist/source/components/dispatcher/dscontrol.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsmthdat.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c
  vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c
  vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c
  vendor-sys/acpica/dist/source/components/executer/exmisc.c
  vendor-sys/acpica/dist/source/components/executer/exnames.c
  vendor-sys/acpica/dist/source/components/executer/exoparg1.c
  vendor-sys/acpica/dist/source/components/executer/exoparg2.c
  vendor-sys/acpica/dist/source/components/executer/exoparg6.c
  vendor-sys/acpica/dist/source/components/executer/exresolv.c
  vendor-sys/acpica/dist/source/components/executer/exstore.c
  vendor-sys/acpica/dist/source/components/executer/exstoren.c
  vendor-sys/acpica/dist/source/components/hardware/hwvalid.c
  vendor-sys/acpica/dist/source/components/namespace/nsaccess.c
  vendor-sys/acpica/dist/source/components/namespace/nsrepair.c
  vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c
  vendor-sys/acpica/dist/source/components/namespace/nsutils.c
  vendor-sys/acpica/dist/source/components/parser/psargs.c
  vendor-sys/acpica/dist/source/components/parser/psloop.c
  vendor-sys/acpica/dist/source/components/parser/psobject.c
  vendor-sys/acpica/dist/source/components/parser/psopcode.c
  vendor-sys/acpica/dist/source/components/parser/psopinfo.c
  vendor-sys/acpica/dist/source/components/parser/psparse.c
  vendor-sys/acpica/dist/source/components/parser/pstree.c
  vendor-sys/acpica/dist/source/components/parser/psutils.c
  vendor-sys/acpica/dist/source/components/utilities/utalloc.c
  vendor-sys/acpica/dist/source/components/utilities/utcache.c
  vendor-sys/acpica/dist/source/components/utilities/utdebug.c
  vendor-sys/acpica/dist/source/components/utilities/utresrc.c
  vendor-sys/acpica/dist/source/components/utilities/utxferror.c
  vendor-sys/acpica/dist/source/include/acconfig.h
  vendor-sys/acpica/dist/source/include/acdisasm.h
  vendor-sys/acpica/dist/source/include/acglobal.h
  vendor-sys/acpica/dist/source/include/aclocal.h
  vendor-sys/acpica/dist/source/include/acm

svn commit: r314402 - head/sys/compat/linux

2017-02-28 Thread Dmitry Chagin
Author: dchagin
Date: Tue Feb 28 19:49:21 2017
New Revision: 314402
URL: https://svnweb.freebsd.org/changeset/base/314402

Log:
  FreeBSD does not have analgue for epill EPOLLPRI event type.
  So, do not set EPOLLPRI event acidently.
  Also, do not set EPOLLWRNORM and EPOLLRDNORM events as epoll
  do not set this events.
  
  MFC after:1 month

Modified:
  head/sys/compat/linux/linux_event.c

Modified: head/sys/compat/linux/linux_event.c
==
--- head/sys/compat/linux/linux_event.c Tue Feb 28 19:32:45 2017
(r314401)
+++ head/sys/compat/linux/linux_event.c Tue Feb 28 19:49:21 2017
(r314402)
@@ -357,14 +357,15 @@ kevent_to_epoll(struct kevent *kevent, s
return;
}
 
+   /* XXX EPOLLPRI, EPOLLHUP */
switch (kevent->filter) {
case EVFILT_READ:
-   l_event->events = 
LINUX_EPOLLIN|LINUX_EPOLLRDNORM|LINUX_EPOLLPRI;
+   l_event->events = LINUX_EPOLLIN;
if ((kevent->flags & EV_EOF) != 0)
l_event->events |= LINUX_EPOLLRDHUP;
break;
case EVFILT_WRITE:
-   l_event->events = LINUX_EPOLLOUT|LINUX_EPOLLWRNORM;
+   l_event->events = LINUX_EPOLLOUT;
break;
}
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314404 - head/sys/compat/linux

2017-02-28 Thread Dmitry Chagin
Author: dchagin
Date: Tue Feb 28 19:55:16 2017
New Revision: 314404
URL: https://svnweb.freebsd.org/changeset/base/314404

Log:
  Linux epoll return EEXIST on case when op is EPOLL_CTL_ADD, and the supplied
  file descriptor fd is already registered with this epoll instance.
  
  MFC after:1 month

Modified:
  head/sys/compat/linux/linux_event.c

Modified: head/sys/compat/linux/linux_event.c
==
--- head/sys/compat/linux/linux_event.c Tue Feb 28 19:54:22 2017
(r314403)
+++ head/sys/compat/linux/linux_event.c Tue Feb 28 19:55:16 2017
(r314404)
@@ -481,15 +481,34 @@ linux_epoll_ctl(struct thread *td, struc
 
ciargs.changelist = kev;
 
+   if (args->op != LINUX_EPOLL_CTL_DEL) {
+   kev_flags = EV_ADD | EV_ENABLE;
+   error = epoll_to_kevent(td, epfp, args->fd, &le,
+   &kev_flags, kev, &nchanges);
+   if (error != 0)
+   goto leave0;
+   }
+
switch (args->op) {
case LINUX_EPOLL_CTL_MOD:
error = epoll_delete_all_events(td, epfp, args->fd);
if (error != 0)
goto leave0;
-   /* FALLTHROUGH */
+   break;
 
case LINUX_EPOLL_CTL_ADD:
-   kev_flags = EV_ADD | EV_ENABLE;
+   /*
+* kqueue_register() return ENOENT if event does not exists
+* and the EV_ADD flag is not set.
+*/
+   kev[0].flags &= ~EV_ADD;
+   error = kqfd_register(args->epfd, &kev[0], td, 1);
+   if (error != ENOENT) {
+   error = EEXIST;
+   goto leave0;
+   }
+   error = 0;
+   kev[0].flags |= EV_ADD;
break;
 
case LINUX_EPOLL_CTL_DEL:
@@ -502,11 +521,6 @@ linux_epoll_ctl(struct thread *td, struc
goto leave0;
}
 
-   error = epoll_to_kevent(td, epfp, args->fd, &le, &kev_flags,
-   kev, &nchanges);
-   if (error != 0)
-   goto leave0;
-
epoll_fd_install(td, args->fd, le.data);
 
error = kern_kevent_fp(td, epfp, nchanges, 0, &k_ops, NULL);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r314403 - head/sys/compat/linux

2017-02-28 Thread Dmitry Chagin
Author: dchagin
Date: Tue Feb 28 19:54:22 2017
New Revision: 314403
URL: https://svnweb.freebsd.org/changeset/base/314403

Log:
  Linux epoll return ENOENT error in case when op is EPOLL_CTL_MOD or
  EPOLL_CTL_DEL, and fd is not registered with this epoll instance.
  
  MFC after:1 month

Modified:
  head/sys/compat/linux/linux_event.c

Modified: head/sys/compat/linux/linux_event.c
==
--- head/sys/compat/linux/linux_event.c Tue Feb 28 19:49:21 2017
(r314402)
+++ head/sys/compat/linux/linux_event.c Tue Feb 28 19:54:22 2017
(r314403)
@@ -483,11 +483,6 @@ linux_epoll_ctl(struct thread *td, struc
 
switch (args->op) {
case LINUX_EPOLL_CTL_MOD:
-   /*
-* We don't memorize which events were set for this FD
-* on this level, so just delete all we could have set:
-* EVFILT_READ and EVFILT_WRITE, ignoring any errors
-*/
error = epoll_delete_all_events(td, epfp, args->fd);
if (error != 0)
goto leave0;
@@ -644,19 +639,11 @@ epoll_delete_event(struct thread *td, st
struct kevent_copyops k_ops = { &ciargs,
NULL,
epoll_kev_copyin};
-   int error;
 
ciargs.changelist = &kev;
EV_SET(&kev, fd, filter, EV_DELETE | EV_DISABLE, 0, 0, 0);
 
-   error = kern_kevent_fp(td, epfp, 1, 0, &k_ops, NULL);
-
-   /*
-* here we ignore ENONT, because we don't keep track of events here
-*/
-   if (error == ENOENT)
-   error = 0;
-   return (error);
+   return (kern_kevent_fp(td, epfp, 1, 0, &k_ops, NULL));
 }
 
 static int
@@ -667,8 +654,8 @@ epoll_delete_all_events(struct thread *t
error1 = epoll_delete_event(td, epfp, fd, EVFILT_READ);
error2 = epoll_delete_event(td, epfp, fd, EVFILT_WRITE);
 
-   /* report any errors we got */
-   return (error1 == 0 ? error2 : error1);
+   /* return 0 if at least one result positive */
+   return (error1 == 0 ? 0 : error2);
 }
 
 static int
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r314373 - in head: . etc/defaults etc/rc.d lib/libc/regex share/man/man4/man4.i386 share/man/man5 sys/amd64/conf sys/boot/forth sys/compat/svr4 sys/conf sys/dev/streams sys/i386/conf s

2017-02-28 Thread Benjamin Kaduk
On Tue, Feb 28, 2017 at 1:36 PM, Gleb Smirnoff  wrote:

>   Ravi,
>
>   this should go into Relnotes, my failure that I didn't put the tag.
>
> I don't think this deserves UPDATING entry, since it doesn't require
> any action from a person who updates from sources.
>
> I don't think this requires __FreeBSD_version bump, since the latter
> is used to assist compilation of open source application that use
> changed API. The change removed support to run binaries.
>

That is not the only use of __FreeBSD_version, which is (at least) exposed
to the ports collection and can cause conditional changes in what are
shipped by ports.
Which is not to say that any current ports ship affected binaries, of
course, but just to point out that the scope of the symbol is broader than
stated.

-Ben
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


  1   2   >