svn commit: r301719 - in head/share/man: man4 man5 man9

2016-06-08 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Jun  9 06:55:00 2016
New Revision: 301719
URL: https://svnweb.freebsd.org/changeset/base/301719

Log:
  Fix a bunch of "xref refers to *this* page" igor(1) warnings.
  
  MFC after:1 month

Modified:
  head/share/man/man4/bcma.4
  head/share/man/man4/dcons.4
  head/share/man/man4/ip.4
  head/share/man/man4/ng_tag.4
  head/share/man/man4/pass.4
  head/share/man/man4/puc.4
  head/share/man/man4/random.4
  head/share/man/man4/witness.4
  head/share/man/man5/ar.5
  head/share/man/man5/elf.5
  head/share/man/man5/nsswitch.conf.5
  head/share/man/man5/rc.conf.5
  head/share/man/man9/BUS_NEW_PASS.9
  head/share/man/man9/pmap.9
  head/share/man/man9/stack.9

Modified: head/share/man/man4/bcma.4
==
--- head/share/man/man4/bcma.4  Thu Jun  9 06:10:20 2016(r301718)
+++ head/share/man/man4/bcma.4  Thu Jun  9 06:55:00 2016(r301719)
@@ -64,7 +64,6 @@ The IP cores used in
 devices were adapted by Broadcom for compatibility with the new
 interconnect.
 .Sh SEE ALSO
-.Xr bcma 4 ,
 .Xr bhnd 4
 .Sh HISTORY
 The

Modified: head/share/man/man4/dcons.4
==
--- head/share/man/man4/dcons.4 Thu Jun  9 06:10:20 2016(r301718)
+++ head/share/man/man4/dcons.4 Thu Jun  9 06:55:00 2016(r301719)
@@ -100,7 +100,7 @@ See
 for more details.
 .Pp
 If you want to use
-.Xr dcons 4
+.Nm
 as a
 .Xr gdb 1
 port, add the following line into

Modified: head/share/man/man4/ip.4
==
--- head/share/man/man4/ip.4Thu Jun  9 06:10:20 2016(r301718)
+++ head/share/man/man4/ip.4Thu Jun  9 06:55:00 2016(r301719)
@@ -122,7 +122,7 @@ may be used to set the Don't Fragment fl
 Currently this option is respected only on
 .Xr udp 4
 and raw
-.Xr ip 4
+.Nm
 sockets, unless the
 .Dv IP_HDRINCL
 option has been set.

Modified: head/share/man/man4/ng_tag.4
==
--- head/share/man/man4/ng_tag.4Thu Jun  9 06:10:20 2016
(r301718)
+++ head/share/man/man4/ng_tag.4Thu Jun  9 06:55:00 2016
(r301719)
@@ -230,7 +230,7 @@ node which will check for the specified 
 packets to
 .Xr ipfw 8 .
 Matching packets are passed to
-.Xr ng_tag 4
+.Nm
 node, which will set a tag and pass them back to
 .Xr ng_bpf 4
 node on a hook programmed to accept all packets and pass them back to
@@ -246,7 +246,7 @@ expressions must be altered accordingly.
 Thus, there will be expression
 .Dq Li "ether[40:2]=0x244c && ether[42:4]=0x6f636b20"
 on incoming hook and empty expression to match all packets from
-.Xr ng_tag 4 .
+.Nm .
 .Pp
 So, this is
 .Xr ngctl 8

Modified: head/share/man/man4/pass.4
==
--- head/share/man/man4/pass.4  Thu Jun  9 06:10:20 2016(r301718)
+++ head/share/man/man4/pass.4  Thu Jun  9 06:55:00 2016(r301719)
@@ -98,7 +98,7 @@ It is probably more useful to issue this
 device.
 .It CAMIOQUEUE union ccb *
 Queue a CCB to the
-.Xr pass 4
+.Nm
 driver to be executed asynchronously.
 The caller may use
 .Xr select 2 ,
@@ -167,7 +167,7 @@ ioctl.
 An error will only be returned from the
 .Dv CAMIOGET
 ioctl if the
-.Xr pass 4
+.Nm
 driver fails to copy data to the user process or if there are no completed
 CCBs available to retrieve.
 If no CCBs are available to retrieve,

Modified: head/share/man/man4/puc.4
==
--- head/share/man/man4/puc.4   Thu Jun  9 06:10:20 2016(r301718)
+++ head/share/man/man4/puc.4   Thu Jun  9 06:55:00 2016(r301719)
@@ -53,5 +53,5 @@ Support for new cards should be added th
 .Sh HISTORY
 This driver took the idea from the
 .Nx
-.Xr puc 4
+.Nm
 driver.

Modified: head/share/man/man4/random.4
==
--- head/share/man/man4/random.4Thu Jun  9 06:10:20 2016
(r301718)
+++ head/share/man/man4/random.4Thu Jun  9 06:55:00 2016
(r301719)
@@ -48,7 +48,7 @@ it is seeded for the first time.
 This may cause trouble at system boot
 when keys and the like
 are generated from
-.Xr random 4
+.Nm
 so steps should be taken to ensure a
 seeding as soon as possible.
 .Pp
@@ -63,7 +63,7 @@ this could be done by
 This sysctl will not return
 random bytes unless
 the
-.Xr random 4
+.Nm
 device is seeded.
 .Pp
 This initial seeding

Modified: head/share/man/man4/witness.4
==
--- head/share/man/man4/witness.4   Thu Jun  9 06:10:20 2016
(r301718)
+++ head/share/man/man4/witness.4   Thu Jun  9 06:55:00 2016
(r301719)
@@ -62,7 +62,7 @@ If any of these checks fail, then the ke
 The
 .Dv WITNESS_COUNT
 kernel 

svn commit: r301718 - in head/contrib/jemalloc: . doc include/jemalloc include/jemalloc/internal src

2016-06-08 Thread Jason Evans
Author: jasone
Date: Thu Jun  9 06:10:20 2016
New Revision: 301718
URL: https://svnweb.freebsd.org/changeset/base/301718

Log:
  Update jemalloc to 4.2.1.

Modified:
  head/contrib/jemalloc/ChangeLog
  head/contrib/jemalloc/FREEBSD-diffs
  head/contrib/jemalloc/VERSION
  head/contrib/jemalloc/doc/jemalloc.3
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h
  head/contrib/jemalloc/include/jemalloc/internal/prof.h
  head/contrib/jemalloc/include/jemalloc/jemalloc.h
  head/contrib/jemalloc/src/arena.c
  head/contrib/jemalloc/src/chunk.c
  head/contrib/jemalloc/src/chunk_mmap.c
  head/contrib/jemalloc/src/huge.c
  head/contrib/jemalloc/src/jemalloc.c
  head/contrib/jemalloc/src/nstime.c

Modified: head/contrib/jemalloc/ChangeLog
==
--- head/contrib/jemalloc/ChangeLog Thu Jun  9 05:48:34 2016
(r301717)
+++ head/contrib/jemalloc/ChangeLog Thu Jun  9 06:10:20 2016
(r301718)
@@ -4,6 +4,17 @@ brevity.  Much more detail can be found 
 
 https://github.com/jemalloc/jemalloc
 
+* 4.2.1 (June 8, 2016)
+
+  Bug fixes:
+  - Fix bootstrapping issues for configurations that require allocation during
+tsd initialization (e.g. --disable-tls).  (@cferris1000, @jasone)
+  - Fix gettimeofday() version of nstime_update().  (@ronawho)
+  - Fix Valgrind regressions in calloc() and chunk_alloc_wrapper().  (@ronawho)
+  - Fix potential VM map fragmentation regression.  (@jasone)
+  - Fix opt_zero-triggered in-place huge reallocation zeroing.  (@jasone)
+  - Fix heap profiling context leaks in reallocation edge cases.  (@jasone)
+
 * 4.2.0 (May 12, 2016)
 
   New features:

Modified: head/contrib/jemalloc/FREEBSD-diffs
==
--- head/contrib/jemalloc/FREEBSD-diffs Thu Jun  9 05:48:34 2016
(r301717)
+++ head/contrib/jemalloc/FREEBSD-diffs Thu Jun  9 06:10:20 2016
(r301718)
@@ -79,7 +79,7 @@ index b1de2b6..da6b6d2 100644
  
  JEMALLOC_ALWAYS_INLINE size_t
 diff --git a/include/jemalloc/internal/jemalloc_internal.h.in 
b/include/jemalloc/internal/jemalloc_internal.h.in
-index 51bf897..7de22ea 100644
+index 8f82edd..78e2df2 100644
 --- a/include/jemalloc/internal/jemalloc_internal.h.in
 +++ b/include/jemalloc/internal/jemalloc_internal.h.in
 @@ -8,6 +8,9 @@
@@ -335,7 +335,7 @@ index f943891..47d032c 100755
 +#include "jemalloc_FreeBSD.h"
  EOF
 diff --git a/src/jemalloc.c b/src/jemalloc.c
-index 40eb2ea..666c49d 100644
+index 5d1f493..46dd1d1 100644
 --- a/src/jemalloc.c
 +++ b/src/jemalloc.c
 @@ -4,6 +4,10 @@

Modified: head/contrib/jemalloc/VERSION
==
--- head/contrib/jemalloc/VERSION   Thu Jun  9 05:48:34 2016
(r301717)
+++ head/contrib/jemalloc/VERSION   Thu Jun  9 06:10:20 2016
(r301718)
@@ -1 +1 @@
-4.2.0-1-gdc7ff6306d7a15b53479e2fb8e5546404b82e6fc
+4.2.1-0-g3de035335255d553bdb344c32ffdb603816195d8

Modified: head/contrib/jemalloc/doc/jemalloc.3
==
--- head/contrib/jemalloc/doc/jemalloc.3Thu Jun  9 05:48:34 2016
(r301717)
+++ head/contrib/jemalloc/doc/jemalloc.3Thu Jun  9 06:10:20 2016
(r301718)
@@ -2,12 +2,12 @@
 .\" Title: JEMALLOC
 .\"Author: Jason Evans
 .\" Generator: DocBook XSL Stylesheets v1.76.1 
-.\"  Date: 05/12/2016
+.\"  Date: 06/08/2016
 .\"Manual: User Manual
-.\"Source: jemalloc 4.2.0-1-gdc7ff6306d7a15b53479e2fb8e5546404b82e6fc
+.\"Source: jemalloc 4.2.1-0-g3de035335255d553bdb344c32ffdb603816195d8
 .\"  Language: English
 .\"
-.TH "JEMALLOC" "3" "05/12/2016" "jemalloc 4.2.0-1-gdc7ff6306d7a" "User Manual"
+.TH "JEMALLOC" "3" "06/08/2016" "jemalloc 4.2.1-0-g3de035335255" "User Manual"
 .\" -
 .\" * Define some portability stuff
 .\" -
@@ -31,7 +31,7 @@
 jemalloc \- general purpose memory allocation functions
 .SH "LIBRARY"
 .PP
-This manual describes jemalloc 
4\&.2\&.0\-1\-gdc7ff6306d7a15b53479e2fb8e5546404b82e6fc\&. More information can 
be found at the
+This manual describes jemalloc 
4\&.2\&.1\-0\-g3de035335255d553bdb344c32ffdb603816195d8\&. More information can 
be found at the
 \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&.
 .PP
 The following configuration options are enabled in libc\*(Aqs built\-in 
jemalloc:

Modified: head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h
==
--- head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h Thu Jun 
 9 05:48:34 2016(r301717)
+++ head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h Thu Jun 
 9 06:10:20 2016(r301718)
@@ -751,7 +751,7 @@

svn commit: r301717 - in head/sys: modules/tcp/fastpath netinet netinet/tcp_stacks netinet6

2016-06-08 Thread Andrey V. Elsukov
Author: ae
Date: Thu Jun  9 05:48:34 2016
New Revision: 301717
URL: https://svnweb.freebsd.org/changeset/base/301717

Log:
  Cleanup unneded include "opt_ipfw.h".
  
  It was used for conditional build IPFIREWALL_FORWARD support.
  But IPFIREWALL_FORWARD option was removed a long time ago.

Modified:
  head/sys/modules/tcp/fastpath/Makefile
  head/sys/netinet/ip_fastfwd.c
  head/sys/netinet/ip_input.c
  head/sys/netinet/ip_output.c
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_stacks/fastpath.c
  head/sys/netinet/udp_usrreq.c
  head/sys/netinet6/ip6_forward.c
  head/sys/netinet6/ip6_input.c
  head/sys/netinet6/ip6_output.c
  head/sys/netinet6/udp6_usrreq.c

Modified: head/sys/modules/tcp/fastpath/Makefile
==
--- head/sys/modules/tcp/fastpath/Makefile  Thu Jun  9 03:54:25 2016
(r301716)
+++ head/sys/modules/tcp/fastpath/Makefile  Thu Jun  9 05:48:34 2016
(r301717)
@@ -7,7 +7,7 @@
 KMOD=  fastpath
 SRCS=  fastpath.c
 
-SRCS+= opt_ipfw.h opt_inet.h opt_inet6.h opt_ipsec.h
+SRCS+= opt_inet.h opt_inet6.h opt_ipsec.h
 SRCS+= opt_tcpdebug.h
 
 #

Modified: head/sys/netinet/ip_fastfwd.c
==
--- head/sys/netinet/ip_fastfwd.c   Thu Jun  9 03:54:25 2016
(r301716)
+++ head/sys/netinet/ip_fastfwd.c   Thu Jun  9 05:48:34 2016
(r301717)
@@ -76,7 +76,6 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include "opt_ipfw.h"
 #include "opt_ipstealth.h"
 
 #include 

Modified: head/sys/netinet/ip_input.c
==
--- head/sys/netinet/ip_input.c Thu Jun  9 03:54:25 2016(r301716)
+++ head/sys/netinet/ip_input.c Thu Jun  9 05:48:34 2016(r301717)
@@ -33,7 +33,6 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_bootp.h"
-#include "opt_ipfw.h"
 #include "opt_ipstealth.h"
 #include "opt_ipsec.h"
 #include "opt_route.h"

Modified: head/sys/netinet/ip_output.c
==
--- head/sys/netinet/ip_output.cThu Jun  9 03:54:25 2016
(r301716)
+++ head/sys/netinet/ip_output.cThu Jun  9 05:48:34 2016
(r301717)
@@ -33,7 +33,6 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_inet.h"
-#include "opt_ipfw.h"
 #include "opt_ipsec.h"
 #include "opt_mbuf_stress_test.h"
 #include "opt_mpath.h"

Modified: head/sys/netinet/tcp_input.c
==
--- head/sys/netinet/tcp_input.cThu Jun  9 03:54:25 2016
(r301716)
+++ head/sys/netinet/tcp_input.cThu Jun  9 05:48:34 2016
(r301717)
@@ -50,7 +50,6 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include "opt_ipfw.h"  /* for ipfw_fwd */
 #include "opt_inet.h"
 #include "opt_inet6.h"
 #include "opt_ipsec.h"

Modified: head/sys/netinet/tcp_stacks/fastpath.c
==
--- head/sys/netinet/tcp_stacks/fastpath.c  Thu Jun  9 03:54:25 2016
(r301716)
+++ head/sys/netinet/tcp_stacks/fastpath.c  Thu Jun  9 05:48:34 2016
(r301717)
@@ -54,7 +54,6 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include "opt_ipfw.h"  /* for ipfw_fwd */
 #include "opt_inet.h"
 #include "opt_inet6.h"
 #include "opt_ipsec.h"

Modified: head/sys/netinet/udp_usrreq.c
==
--- head/sys/netinet/udp_usrreq.c   Thu Jun  9 03:54:25 2016
(r301716)
+++ head/sys/netinet/udp_usrreq.c   Thu Jun  9 05:48:34 2016
(r301717)
@@ -39,7 +39,6 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include "opt_ipfw.h"
 #include "opt_inet.h"
 #include "opt_inet6.h"
 #include "opt_ipsec.h"

Modified: head/sys/netinet6/ip6_forward.c
==
--- head/sys/netinet6/ip6_forward.c Thu Jun  9 03:54:25 2016
(r301716)
+++ head/sys/netinet6/ip6_forward.c Thu Jun  9 05:48:34 2016
(r301717)
@@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
-#include "opt_ipfw.h"
 #include "opt_ipsec.h"
 #include "opt_ipstealth.h"
 

Modified: head/sys/netinet6/ip6_input.c
==
--- head/sys/netinet6/ip6_input.c   Thu Jun  9 03:54:25 2016
(r301716)
+++ head/sys/netinet6/ip6_input.c   Thu Jun  9 05:48:34 2016
(r301717)
@@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
-#include "opt_ipfw.h"
 #include "opt_ipsec.h"
 #include "opt_route.h"
 #include "opt_rss.h"

Modified: head/sys/netinet6/ip6_output.c
==
--- head/sys/netinet6/ip6_output.c  Thu Jun  9 03:54:25 2016
(r301716)
+++ head/sys/netinet6/ip6_o

svn commit: r301716 - head/release

2016-06-08 Thread Colin Percival
Author: cperciva
Date: Thu Jun  9 03:54:25 2016
New Revision: 301716
URL: https://svnweb.freebsd.org/changeset/base/301716

Log:
  Add 'env - PATH=$$PATH' to bsdec2-image-upload make command, in order to
  avoid environment pollution problems.  That port uses  but
  is not compatible with the latest mk bits in HEAD.
  
  Reported by:  gjb
  No rush, but make sure it's in the tree before tomorrow by:   gjb

Modified:
  head/release/Makefile.ec2

Modified: head/release/Makefile.ec2
==
--- head/release/Makefile.ec2   Thu Jun  9 02:21:07 2016(r301715)
+++ head/release/Makefile.ec2   Thu Jun  9 03:54:25 2016(r301716)
@@ -23,7 +23,7 @@ CW_EC2_PORTINSTALL=
 
 cw-ec2-portinstall:
 .if exists(${PORTSDIR}/net/bsdec2-image-upload/Makefile)
-   make -C ${PORTSDIR}/net/bsdec2-image-upload BATCH=1 all install clean
+   env - PATH=$$PATH make -C ${PORTSDIR}/net/bsdec2-image-upload BATCH=1 
all install clean
 .else
 . if !exists(/usr/local/sbin/pkg-static)
env ASSUME_ALWAYS_YES=yes pkg bootstrap -y
___
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: r301706 - head/sys/boot/efi

2016-06-08 Thread Warner Losh

> On Jun 8, 2016, at 7:23 PM, Andrew Turner  wrote:
> 
> Author: andrew
> Date: Wed Jun  8 23:23:16 2016
> New Revision: 301706
> URL: https://svnweb.freebsd.org/changeset/base/301706
> 
> Log:
>  Also set -fshort-wchar on arm64, this fixes parsing strings from UEFI,
>  e.g. on the command line.

Maybe this could be used to fix the %S issue instead of the kludge we’re now 
doing…

Warner

>  Sponsored by:ABT Systems Ltd
> 
> Modified:
>  head/sys/boot/efi/Makefile.inc
> 
> Modified: head/sys/boot/efi/Makefile.inc
> ==
> --- head/sys/boot/efi/Makefile.incWed Jun  8 23:22:59 2016
> (r301705)
> +++ head/sys/boot/efi/Makefile.incWed Jun  8 23:23:16 2016
> (r301706)
> @@ -18,4 +18,8 @@ CFLAGS+=-mno-red-zone
> CFLAGS+=  -mno-aes
> .endif
> 
> +.if ${MACHINE_CPUARCH} == "aarch64"
> +CFLAGS+= -fshort-wchar
> +.endif
> +
> .include "../Makefile.inc"
> 

___
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: r301714 - head/sys/boot/efi/libefi

2016-06-08 Thread Warner Losh

> On Jun 8, 2016, at 10:02 PM, Emmanuel Vadot  wrote:
> 
> Author: manu
> Date: Thu Jun  9 02:02:50 2016
> New Revision: 301714
> URL: https://svnweb.freebsd.org/changeset/base/301714
> 
> Log:
>  Print a message when the efi disk isn't a logical partition.

Why on earth would you do that? This will print a message, one per full disk, 
and our systems have 36 disks in them…
Please consider backing this out...

Warner


>  Approved by: andrew (mentor)
>  Differential Revision:   https://reviews.freebsd.org/D6782
> 
> Modified:
>  head/sys/boot/efi/libefi/efipart.c
> 
> Modified: head/sys/boot/efi/libefi/efipart.c
> ==
> --- head/sys/boot/efi/libefi/efipart.cThu Jun  9 01:50:43 2016
> (r301713)
> +++ head/sys/boot/efi/libefi/efipart.cThu Jun  9 02:02:50 2016
> (r301714)
> @@ -119,8 +119,11 @@ efipart_init(void) 
>   (void**)&blkio);
>   if (EFI_ERROR(status))
>   continue;
> - if (!blkio->Media->LogicalPartition)
> + if (!blkio->Media->LogicalPartition) {
> + printf("%s%d isn't a logical partition, skipping\n",
> + efipart_dev.dv_name, n);
>   continue;
> + }
> 
>   /*
>* If we come across a logical partition of subtype CDROM
> 

___
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: r301715 - head/usr.bin/truss

2016-06-08 Thread John Baldwin
Author: jhb
Date: Thu Jun  9 02:21:07 2016
New Revision: 301715
URL: https://svnweb.freebsd.org/changeset/base/301715

Log:
  Add support for truss'ing Linux/x86_64 binaries under amd64.
  
  Prodding by:  xmj

Added:
  head/usr.bin/truss/amd64-linux.c   (contents, props changed)
Modified:
  head/usr.bin/truss/Makefile

Modified: head/usr.bin/truss/Makefile
==
--- head/usr.bin/truss/Makefile Thu Jun  9 02:02:50 2016(r301714)
+++ head/usr.bin/truss/Makefile Thu Jun  9 02:21:07 2016(r301715)
@@ -18,6 +18,7 @@ ABIS+=cloudabi64
 ABIS+= i386-linux
 .endif
 .if ${MACHINE_CPUARCH} == "amd64"
+ABIS+= amd64-linux
 ABIS+= amd64-linux32
 ABIS+= freebsd32
 ABIS+= cloudabi64

Added: head/usr.bin/truss/amd64-linux.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/truss/amd64-linux.cThu Jun  9 02:21:07 2016
(r301715)
@@ -0,0 +1,104 @@
+/*
+ * Copyright 1997 Sean Eric Fagan
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 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. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ * This product includes software developed by Sean Eric Fagan
+ * 4. Neither the name of the author may be used to endorse or promote
+ *products derived from this software without specific prior written
+ *permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * 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.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+/* Linux/x86_64-specific system call handling. */
+
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include "truss.h"
+
+static int
+amd64_linux_fetch_args(struct trussinfo *trussinfo, u_int narg)
+{
+   struct reg regs;
+   struct current_syscall *cs;
+   lwpid_t tid;
+
+   tid = trussinfo->curthread->tid;
+   cs = &trussinfo->curthread->cs;
+   if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) {
+   fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n");
+   return (-1);
+   }
+
+   switch (narg) {
+   default:
+   cs->args[5] = regs.r_r9;
+   case 5:
+   cs->args[4] = regs.r_r8;
+   case 4:
+   cs->args[3] = regs.r_rcx;
+   case 3:
+   cs->args[2] = regs.r_rdx;
+   case 2:
+   cs->args[1] = regs.r_rsi;
+   case 1:
+   cs->args[0] = regs.r_rdi;
+   }
+
+   return (0);
+}
+
+static int
+amd64_linux_fetch_retval(struct trussinfo *trussinfo, long *retval, int 
*errorp)
+{
+   struct reg regs;
+   lwpid_t tid;
+
+   tid = trussinfo->curthread->tid;
+   if (ptrace(PT_GETREGS, tid, (caddr_t)®s, 0) < 0) {
+   fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n");
+   return (-1);
+   }
+
+   retval[0] = regs.r_rax;
+   retval[1] = regs.r_rdx;
+   *errorp = !!(regs.r_rflags & PSL_C);
+   return (0);
+}
+
+static struct procabi amd64_linux = {
+   "Linux ELF64",
+   SYSDECODE_ABI_LINUX,
+   amd64_linux_fetch_args,
+   amd64_linux_fetch_retval
+};
+
+PROCABI(amd64_linux);
___
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: r301562 - head/sys/dev/acpica

2016-06-08 Thread John Baldwin
On 6/7/16 3:08 PM, Conrad E. Meyer wrote:
> Author: cem
> Date: Tue Jun  7 19:08:13 2016
> New Revision: 301562
> URL: https://svnweb.freebsd.org/changeset/base/301562
> 
> Log:
>   Fix a minor leak in ACPI thermal
>   
>   Introduced in r301518.
>   
>   Reported by:Coverity
>   CID:1356266
>   Sponsored by:   EMC / Isilon Storage Division
> 
> Modified:
>   head/sys/dev/acpica/acpi_thermal.c
> 
> Modified: head/sys/dev/acpica/acpi_thermal.c
> ==
> --- head/sys/dev/acpica/acpi_thermal.cTue Jun  7 18:50:36 2016
> (r301561)
> +++ head/sys/dev/acpica/acpi_thermal.cTue Jun  7 19:08:13 2016
> (r301562)
> @@ -335,8 +335,10 @@ acpi_tz_startup(void *arg __unused)
>  int devcount, error, i;
>  
>  devclass_get_devices(acpi_tz_devclass, &devs, &devcount);
> -if (devcount == 0)
> +if (devcount == 0) {
> + free(devs, M_TEMP);
>   return;
> +}

Ugh, I assumed we didn't return anything for a count of zero.  I kind of think
it's a bug that we return malloc(0) instead of NULL in that case.  Looks like if
malloc fails devclass_get_devices() doesn't set 'dev' or 'devcount' at all.  We
need to fail if it returns non-zero.

-- 
John Baldwin
___
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: r301714 - head/sys/boot/efi/libefi

2016-06-08 Thread Emmanuel Vadot
Author: manu
Date: Thu Jun  9 02:02:50 2016
New Revision: 301714
URL: https://svnweb.freebsd.org/changeset/base/301714

Log:
  Print a message when the efi disk isn't a logical partition.
  
  Approved by:  andrew (mentor)
  Differential Revision:https://reviews.freebsd.org/D6782

Modified:
  head/sys/boot/efi/libefi/efipart.c

Modified: head/sys/boot/efi/libefi/efipart.c
==
--- head/sys/boot/efi/libefi/efipart.c  Thu Jun  9 01:50:43 2016
(r301713)
+++ head/sys/boot/efi/libefi/efipart.c  Thu Jun  9 02:02:50 2016
(r301714)
@@ -119,8 +119,11 @@ efipart_init(void) 
(void**)&blkio);
if (EFI_ERROR(status))
continue;
-   if (!blkio->Media->LogicalPartition)
+   if (!blkio->Media->LogicalPartition) {
+   printf("%s%d isn't a logical partition, skipping\n",
+   efipart_dev.dv_name, n);
continue;
+   }
 
/*
 * If we come across a logical partition of subtype CDROM
___
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: r301713 - head/sys/dev/random

2016-06-08 Thread Simon J. Gerraty
Author: sjg
Date: Thu Jun  9 01:50:43 2016
New Revision: 301713
URL: https://svnweb.freebsd.org/changeset/base/301713

Log:
  Add a prototype for random_harvest_queue to dev/random/random_harvestq.h
  This fixes a warning that occurs in a number of files that use the
  random_harvest_queue function.
  
  Differential Revision:https://reviews.freebsd.org/D4229
  Submitted by: ste...@juniper.net
  Reviewed by:  markm
  Approved by:  so

Modified:
  head/sys/dev/random/random_harvestq.h

Modified: head/sys/dev/random/random_harvestq.h
==
--- head/sys/dev/random/random_harvestq.h   Thu Jun  9 01:31:09 2016
(r301712)
+++ head/sys/dev/random/random_harvestq.h   Thu Jun  9 01:50:43 2016
(r301713)
@@ -43,7 +43,9 @@ struct harvest_event {
uint8_t he_source;  /* origin of the entropy */
 } __packed;
 
-void read_rate_increment(u_int);
+void   random_harvest_queue(const void *, u_int, u_int,
+   enum random_entropy_source);
+void   read_rate_increment(u_int);
 
 #defineRANDOM_HARVESTQ_BOOT_ENTROPY_FILE   "/boot/entropy"
 
___
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: r301712 - head/sys/dev/ioat

2016-06-08 Thread Conrad E. Meyer
Author: cem
Date: Thu Jun  9 01:31:09 2016
New Revision: 301712
URL: https://svnweb.freebsd.org/changeset/base/301712

Log:
  ioat(4): Add ddb "show ioat " debugger command
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ioat/ioat.c

Modified: head/sys/dev/ioat/ioat.c
==
--- head/sys/dev/ioat/ioat.cThu Jun  9 01:28:44 2016(r301711)
+++ head/sys/dev/ioat/ioat.cThu Jun  9 01:31:09 2016(r301712)
@@ -27,6 +27,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_ddb.h"
+
 #include 
 #include 
 #include 
@@ -48,6 +50,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#ifdef DDB
+#include 
+#endif
+
 #include "ioat.h"
 #include "ioat_hw.h"
 #include "ioat_internal.h"
@@ -2090,3 +2096,96 @@ ioat_drain_locked(struct ioat_softc *ioa
while (ioat->refcnt > 0)
msleep(IOAT_REFLK, IOAT_REFLK, 0, "ioat_drain", 0);
 }
+
+#ifdef DDB
+#define_db_show_lock(lo)   LOCK_CLASS(lo)->lc_ddb_show(lo)
+#definedb_show_lock(lk)_db_show_lock(&(lk)->lock_object)
+DB_SHOW_COMMAND(ioat, db_show_ioat)
+{
+   struct ioat_softc *sc;
+   unsigned idx;
+
+   if (!have_addr)
+   goto usage;
+   idx = (unsigned)addr;
+   if (addr >= ioat_channel_index)
+   goto usage;
+
+   sc = ioat_channel[idx];
+   db_printf("ioat softc at %p\n", sc);
+   if (sc == NULL)
+   return;
+
+   db_printf(" version: %d\n", sc->version);
+   db_printf(" chan_idx: %u\n", sc->chan_idx);
+   db_printf(" submit_lock: ");
+   db_show_lock(&sc->submit_lock);
+
+   db_printf(" capabilities: %b\n", (int)sc->capabilities,
+   IOAT_DMACAP_STR);
+   db_printf(" cached_intrdelay: %u\n", sc->cached_intrdelay);
+   db_printf(" *comp_update: 0x%jx\n", (uintmax_t)*sc->comp_update);
+
+   db_printf(" timer:\n");
+   db_printf("  c_time: %ju\n", (uintmax_t)sc->timer.c_time);
+   db_printf("  c_arg: %p\n", sc->timer.c_arg);
+   db_printf("  c_func: %p\n", sc->timer.c_func);
+   db_printf("  c_lock: %p\n", sc->timer.c_lock);
+   db_printf("  c_flags: 0x%x\n", (unsigned)sc->timer.c_flags);
+
+   db_printf(" quiescing: %d\n", (int)sc->quiescing);
+   db_printf(" destroying: %d\n", (int)sc->destroying);
+   db_printf(" is_resize_pending: %d\n", (int)sc->is_resize_pending);
+   db_printf(" is_completion_pending: %d\n", 
(int)sc->is_completion_pending);
+   db_printf(" is_reset_pending: %d\n", (int)sc->is_reset_pending);
+   db_printf(" is_channel_running: %d\n", (int)sc->is_channel_running);
+   db_printf(" intrdelay_supported: %d\n", (int)sc->intrdelay_supported);
+
+   db_printf(" head: %u\n", sc->head);
+   db_printf(" tail: %u\n", sc->tail);
+   db_printf(" hw_head: %u\n", sc->hw_head);
+   db_printf(" ring_size_order: %u\n", sc->ring_size_order);
+   db_printf(" last_seen: 0x%lx\n", sc->last_seen);
+   db_printf(" ring: %p\n", sc->ring);
+
+   db_printf(" cleanup_lock: ");
+   db_show_lock(&sc->cleanup_lock);
+
+   db_printf(" refcnt: %u\n", sc->refcnt);
+#ifdef INVARIANTS
+   CTASSERT(IOAT_NUM_REF_KINDS == 2);
+   db_printf(" refkinds: [ENG=%u, DESCR=%u]\n", sc->refkinds[0],
+   sc->refkinds[1]);
+#endif
+   db_printf(" stats:\n");
+   db_printf("  interrupts: %lu\n", sc->stats.interrupts);
+   db_printf("  descriptors_processed: %lu\n", 
sc->stats.descriptors_processed);
+   db_printf("  descriptors_error: %lu\n", sc->stats.descriptors_error);
+   db_printf("  descriptors_submitted: %lu\n", 
sc->stats.descriptors_submitted);
+
+   db_printf("  channel_halts: %u\n", sc->stats.channel_halts);
+   db_printf("  last_halt_chanerr: %u\n", sc->stats.last_halt_chanerr);
+
+   if (db_pager_quit)
+   return;
+
+   db_printf(" hw status:\n");
+   db_printf("  status: 0x%lx\n", ioat_get_chansts(sc));
+   db_printf("  chanctrl: 0x%x\n",
+   (unsigned)ioat_read_2(sc, IOAT_CHANCTRL_OFFSET));
+   db_printf("  chancmd: 0x%x\n",
+   (unsigned)ioat_read_1(sc, IOAT_CHANCMD_OFFSET));
+   db_printf("  dmacount: 0x%x\n",
+   (unsigned)ioat_read_2(sc, IOAT_DMACOUNT_OFFSET));
+   db_printf("  chainaddr: 0x%lx\n",
+   ioat_read_double_4(sc, IOAT_CHAINADDR_OFFSET_LOW));
+   db_printf("  chancmp: 0x%lx\n",
+   ioat_read_double_4(sc, IOAT_CHANCMP_OFFSET_LOW));
+   db_printf("  chanerr: %b\n",
+   (int)ioat_read_4(sc, IOAT_CHANERR_OFFSET), IOAT_CHANERR_STR);
+   return;
+usage:
+   db_printf("usage: show ioat <0-%u>\n", ioat_channel_index);
+   return;
+}
+#endif /* DDB */
___
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: r301711 - in head: etc include lib/libc/gen share/man/man5

2016-06-08 Thread Mark Johnston
Author: markj
Date: Thu Jun  9 01:28:44 2016
New Revision: 301711
URL: https://svnweb.freebsd.org/changeset/base/301711

Log:
  Implement an NSS backend for netgroups and add getnetgrent_r(3).
  
  This support appears to have been documented in nsswitch.conf(5) for some
  time. The implementation adds two NSS netgroup providers to libc. The
  default, compat, provides the behaviour documented in netgroup(5), so this
  change does not make any user-visible behaviour changes. A files provider
  is also implemented.
  
  innetgr(3) is implemented as an optional NSS method so that providers such
  as NIS which are able to implement efficient reverse lookup can do so.
  A fallback implementation is used otherwise. getnetgrent_r(3) is added for
  convenience and to provide compatibility with glibc and Solaris.
  
  With a small patch to net/nss_ldap, it's possible to specify an ldap
  netgroup provider, allowing one to query nisNetgroupTriple entries.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/etc/nsswitch.conf
  head/include/netdb.h
  head/lib/libc/gen/Symbol.map
  head/lib/libc/gen/getnetgrent.3
  head/lib/libc/gen/getnetgrent.c
  head/share/man/man5/nsswitch.conf.5

Modified: head/etc/nsswitch.conf
==
--- head/etc/nsswitch.conf  Thu Jun  9 01:11:48 2016(r301710)
+++ head/etc/nsswitch.conf  Thu Jun  9 01:28:44 2016(r301711)
@@ -5,6 +5,7 @@
 group: compat
 group_compat: nis
 hosts: files dns
+netgroup: compat
 networks: files
 passwd: compat
 passwd_compat: nis

Modified: head/include/netdb.h
==
--- head/include/netdb.hThu Jun  9 01:11:48 2016(r301710)
+++ head/include/netdb.hThu Jun  9 01:28:44 2016(r301711)
@@ -275,6 +275,7 @@ int getnetbyname_r(const char *, struct
 intgetnetent_r(struct netent *, char *, size_t, struct netent **,
 int *);
 intgetnetgrent(char **, char **, char **);
+intgetnetgrent_r(char **, char **, char **, char *, size_t);
 intgetprotobyname_r(const char *, struct protoent *, char *,
 size_t, struct protoent **);
 intgetprotobynumber_r(int, struct protoent *, char *, size_t,

Modified: head/lib/libc/gen/Symbol.map
==
--- head/lib/libc/gen/Symbol.mapThu Jun  9 01:11:48 2016
(r301710)
+++ head/lib/libc/gen/Symbol.mapThu Jun  9 01:28:44 2016
(r301711)
@@ -410,6 +410,7 @@ FBSD_1.3 {
 };
 
 FBSD_1.4 {
+   getnetgrent_r;
pthread_mutex_consistent;
pthread_mutexattr_getrobust;
pthread_mutexattr_setrobust;

Modified: head/lib/libc/gen/getnetgrent.3
==
--- head/lib/libc/gen/getnetgrent.3 Thu Jun  9 01:11:48 2016
(r301710)
+++ head/lib/libc/gen/getnetgrent.3 Thu Jun  9 01:28:44 2016
(r301711)
@@ -28,7 +28,7 @@
 .\" @(#)getnetgrent.3  8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd June 4, 1993
+.Dd June 5, 2016
 .Dt GETNETGRENT 3
 .Os
 .Sh NAME
@@ -44,6 +44,8 @@
 .Ft int
 .Fn getnetgrent "char **host" "char **user" "char **domain"
 .Ft int
+.Fn getnetgrent_r "char **host" "char **user" "char **domain" "char *buf" 
"size_t bufsize"
+.Ft int
 .Fn innetgr "const char *netgroup" "const char *host" "const char *user" 
"const char *domain"
 .Ft void
 .Fn setnetgrent "const char *netgroup"

Modified: head/lib/libc/gen/getnetgrent.c
==
--- head/lib/libc/gen/getnetgrent.c Thu Jun  9 01:11:48 2016
(r301710)
+++ head/lib/libc/gen/getnetgrent.c Thu Jun  9 01:28:44 2016
(r301711)
@@ -36,12 +36,21 @@ static char sccsid[] = "@(#)getnetgrent.
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "namespace.h"
+
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 
+#include "nss_tls.h"
+
 #ifdef YP
 /*
  * Notes:
@@ -98,6 +107,16 @@ static int _yp_innetgr;
 #define _PATH_NETGROUP "/etc/netgroup"
 #endif
 
+enum constants {
+   NGRP_STORAGE_INITIAL= 1 << 10, /* 1 KByte */
+   NGRP_STORAGE_MAX= 1 << 20, /* 1 MByte */
+};
+
+static const ns_src defaultsrc[] = {
+   { NSSRC_COMPAT, NS_SUCCESS },
+   { NULL, 0 },
+};
+
 /*
  * Static Variables and functions used by setnetgrent(), getnetgrent() and
  * endnetgrent().
@@ -117,51 +136,212 @@ struct netgrp {
struct netgrp   *ng_next;   /* Chain ptr */
char*ng_str[3]; /* Field pointers, see below */
 };
+
+struct netgr_state {
+   FILE*st_netf;
+   struct linelist *st_linehead;
+   struct netgrp   *st_nextgrp;
+   struct netgrp   *st_gr;
+   char*st_grname;
+};
+
 #define NG_HOS

svn commit: r301710 - head/lib/libc/gen

2016-06-08 Thread Mark Johnston
Author: markj
Date: Thu Jun  9 01:11:48 2016
New Revision: 301710
URL: https://svnweb.freebsd.org/changeset/base/301710

Log:
  Fix an infinite loop in setnetgrent(3) with NIS netgroups.
  
  Handle an empty result from yp_match() by returning NULL, which is
  consistent with the handling of an empty netgroup in /etc/netgroup.
  setnetgrent(3) has no return value, so there is no particular need to
  distinguish this case from an error.
  
  PR:   26486
  MFC after:2 weeks

Modified:
  head/lib/libc/gen/getnetgrent.c

Modified: head/lib/libc/gen/getnetgrent.c
==
--- head/lib/libc/gen/getnetgrent.c Thu Jun  9 01:05:23 2016
(r301709)
+++ head/lib/libc/gen/getnetgrent.c Thu Jun  9 01:11:48 2016
(r301710)
@@ -558,6 +558,10 @@ read_for_group(const char *group)
continue;
}
}
+   if (strlen(result) == 0) {
+   free(result);
+   return (NULL);
+   }
snprintf(line, LINSIZ, "%s %s", group, result);
free(result);
}
___
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: r301709 - head/lib/libc/gen

2016-06-08 Thread Mark Johnston
Author: markj
Date: Thu Jun  9 01:05:23 2016
New Revision: 301709
URL: https://svnweb.freebsd.org/changeset/base/301709

Log:
  Use a more common spelling for "(char *)0" in the getnetgrent man page.
  
  MFC after:3 days

Modified:
  head/lib/libc/gen/getnetgrent.3

Modified: head/lib/libc/gen/getnetgrent.3
==
--- head/lib/libc/gen/getnetgrent.3 Wed Jun  8 23:30:13 2016
(r301708)
+++ head/lib/libc/gen/getnetgrent.3 Thu Jun  9 01:05:23 2016
(r301709)
@@ -68,7 +68,7 @@ The function
 sets the three pointer arguments to the strings of the next member of the
 current netgroup.
 If any of the string pointers are
-.Sy (char *)0
+.Dv NULL
 that field is considered a wildcard.
 .Pp
 The functions
@@ -95,7 +95,7 @@ If any of the
 or
 .Sy domain
 arguments are
-.Sy (char *)0
+.Dv NULL
 those fields will match any string value in the netgroup member.
 .Sh RETURN VALUES
 The function
___
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: r301708 - head/lib/libc/net

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 23:30:13 2016
New Revision: 301708
URL: https://svnweb.freebsd.org/changeset/base/301708

Log:
  Revert r301707
  
  getnetent_p doesn't return NULL like getnetent does. coccinelle got confused 
and
  I didn't verify that it worked before committing the change
  
  MFC after: 1 week
  X-MFC with: r301707
  Pointyhat to: ngie

Modified:
  head/lib/libc/net/getnetbyht.c

Modified: head/lib/libc/net/getnetbyht.c
==
--- head/lib/libc/net/getnetbyht.c  Wed Jun  8 23:23:19 2016
(r301707)
+++ head/lib/libc/net/getnetbyht.c  Wed Jun  8 23:30:13 2016
(r301708)
@@ -215,10 +215,10 @@ _ht_getnetbyname(void *rval, void *cb_da
}
 
_setnethtent(ned->stayopen, ned);
-   while ((error = getnetent_p(&ne, ned)) == NULL) {
+   while ((error = getnetent_p(&ne, ned)) == 0) {
if (strcasecmp(ne.n_name, name) == 0)
break;
-   for (cp = ne.n_aliases; *cp != NULL; cp++)
+   for (cp = ne.n_aliases; *cp != 0; cp++)
if (strcasecmp(*cp, name) == 0)
goto found;
}
___
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: r301706 - head/sys/boot/efi

2016-06-08 Thread Andrew Turner
Author: andrew
Date: Wed Jun  8 23:23:16 2016
New Revision: 301706
URL: https://svnweb.freebsd.org/changeset/base/301706

Log:
  Also set -fshort-wchar on arm64, this fixes parsing strings from UEFI,
  e.g. on the command line.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/boot/efi/Makefile.inc

Modified: head/sys/boot/efi/Makefile.inc
==
--- head/sys/boot/efi/Makefile.inc  Wed Jun  8 23:22:59 2016
(r301705)
+++ head/sys/boot/efi/Makefile.inc  Wed Jun  8 23:23:16 2016
(r301706)
@@ -18,4 +18,8 @@ CFLAGS+=  -mno-red-zone
 CFLAGS+=   -mno-aes
 .endif
 
+.if ${MACHINE_CPUARCH} == "aarch64"
+CFLAGS+=   -fshort-wchar
+.endif
+
 .include "../Makefile.inc"
___
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: r301707 - head/lib/libc/net

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 23:23:19 2016
New Revision: 301707
URL: https://svnweb.freebsd.org/changeset/base/301707

Log:
  Use NULL instead of `0` in _ht_getnetbyname(..)
  
  - getnetent returns NULL on completion/error.
  - .h_aliases is NULL terminated.
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/net/getnetbyht.c

Modified: head/lib/libc/net/getnetbyht.c
==
--- head/lib/libc/net/getnetbyht.c  Wed Jun  8 23:23:16 2016
(r301706)
+++ head/lib/libc/net/getnetbyht.c  Wed Jun  8 23:23:19 2016
(r301707)
@@ -215,10 +215,10 @@ _ht_getnetbyname(void *rval, void *cb_da
}
 
_setnethtent(ned->stayopen, ned);
-   while ((error = getnetent_p(&ne, ned)) == 0) {
+   while ((error = getnetent_p(&ne, ned)) == NULL) {
if (strcasecmp(ne.n_name, name) == 0)
break;
-   for (cp = ne.n_aliases; *cp != 0; cp++)
+   for (cp = ne.n_aliases; *cp != NULL; cp++)
if (strcasecmp(*cp, name) == 0)
goto found;
}
___
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: r301705 - head/contrib/tcpdump

2016-06-08 Thread Mariusz Zaborski
Author: oshogbo
Date: Wed Jun  8 23:22:59 2016
New Revision: 301705
URL: https://svnweb.freebsd.org/changeset/base/301705

Log:
  The code responsible for opening and rotating pcap files is independent
  of Capser and should use openat(2) unconditionally on FreeBSD.
  openat(2) is mandatory when sandboxed with Capsicum, but still works
  in the absence of Capsicum.
  
  Reviewed by:  AllanJude

Modified:
  head/contrib/tcpdump/tcpdump.c

Modified: head/contrib/tcpdump/tcpdump.c
==
--- head/contrib/tcpdump/tcpdump.c  Wed Jun  8 23:17:30 2016
(r301704)
+++ head/contrib/tcpdump/tcpdump.c  Wed Jun  8 23:22:59 2016
(r301705)
@@ -86,6 +86,7 @@ extern int SIZE_BUF;
 #ifdef __FreeBSD__
 #include 
 #include 
+#include 
 #endif /* __FreeBSD__ */
 #ifdef HAVE_CASPER
 #include 
@@ -95,7 +96,6 @@ extern int SIZE_BUF;
 #include 
 #include 
 #include 
-#include 
 #endif /* HAVE_CASPER */
 #include 
 #include 
@@ -484,7 +484,7 @@ struct dump_info {
char*CurrentFileName;
pcap_t  *pd;
pcap_dumper_t *p;
-#ifdef HAVE_CASPER
+#ifdef __FreeBSD__
int dirfd;
 #endif
 };
@@ -967,7 +967,7 @@ tstamp_precision_to_string(int precision
 }
 #endif
 
-#ifdef HAVE_CASPER
+#ifdef __FreeBSD__
 /*
  * Ensure that, on a dump file's descriptor, we have all the rights
  * necessary to make the standard I/O library work with an fdopen()ed
@@ -1067,9 +1067,9 @@ main(int argc, char **argv)
 #endif
int status;
FILE *VFile;
-#ifdef HAVE_CASPER
+#ifdef __FreeBSD__
cap_rights_t rights;
-#endif /* HAVE_CASPER */
+#endif /* !__FreeBSD__ */
int cansandbox;
 
 #ifdef WIN32
@@ -1968,11 +1968,11 @@ main(int argc, char **argv)
 #endif /* HAVE_LIBCAP_NG */
if (p == NULL)
error("%s", pcap_geterr(pd));
-#ifdef HAVE_CASPER
+#ifdef __FreeBSD__
set_dumper_capsicum_rights(p);
 #endif
if (Cflag != 0 || Gflag != 0) {
-#ifdef HAVE_CASPER
+#ifdef __FreeBSD__
dumpinfo.WFileName = strdup(basename(WFileName));
dumpinfo.dirfd = open(dirname(WFileName),
O_DIRECTORY | O_RDONLY);
@@ -1990,7 +1990,7 @@ main(int argc, char **argv)
errno != ENOSYS) {
error("unable to limit dump descriptor fcntls");
}
-#else  /* !HAVE_CASPER */
+#else  /* !__FreeBSD__ */
dumpinfo.WFileName = WFileName;
 #endif
callback = dump_packet_and_trunc;
@@ -2325,7 +2325,7 @@ dump_packet_and_trunc(u_char *user, cons
 
/* If the time is greater than the specified window, rotate */
if (t - Gflag_time >= Gflag) {
-#ifdef HAVE_CASPER
+#ifdef __FreeBSD__
FILE *fp;
int fd;
 #endif
@@ -2383,7 +2383,7 @@ dump_packet_and_trunc(u_char *user, cons
capng_update(CAPNG_ADD, CAPNG_EFFECTIVE, 
CAP_DAC_OVERRIDE);
capng_apply(CAPNG_SELECT_BOTH);
 #endif /* HAVE_LIBCAP_NG */
-#ifdef HAVE_CASPER
+#ifdef __FreeBSD__
fd = openat(dump_info->dirfd,
dump_info->CurrentFileName,
O_CREAT | O_WRONLY | O_TRUNC, 0644);
@@ -2397,7 +2397,7 @@ dump_packet_and_trunc(u_char *user, cons
dump_info->CurrentFileName);
}
dump_info->p = pcap_dump_fopen(dump_info->pd, fp);
-#else  /* !HAVE_CASPER */
+#else  /* !__FreeBSD__ */
dump_info->p = pcap_dump_open(dump_info->pd, 
dump_info->CurrentFileName);
 #endif
 #ifdef HAVE_LIBCAP_NG
@@ -2406,7 +2406,7 @@ dump_packet_and_trunc(u_char *user, cons
 #endif /* HAVE_LIBCAP_NG */
if (dump_info->p == NULL)
error("%s", pcap_geterr(pd));
-#ifdef HAVE_CASPER
+#ifdef __FreeBSD__
set_dumper_capsicum_rights(dump_info->p);
 #endif
}
@@ -2423,7 +2423,7 @@ dump_packet_and_trunc(u_char *user, cons
if (size == -1)
error("ftell fails on output file");
if (size > Cflag) {
-#ifdef HAVE_CASPER
+#ifdef __FreeBSD__
FILE *fp;
int fd;
 #endif
@@ -2455,7 +2455,7 @@ dump_packet_and_trunc(u_char *user, cons
capng_update(CAPNG_ADD, CAPNG_EFFECTIVE, 
CAP_DAC_OVERRIDE);
capng_apply(CAPNG_SELECT_BOTH);
 #endif /* HAVE_LIBCAP_NG */
-#ifdef HAVE_CASPER
+#ifdef __FreeBSD__
fd = openat(dump_info->dirfd, 
dump_info->CurrentFileName,
O_CREAT | O_WRONLY | O_TRUNC, 0644);
if (fd < 0) {
@@ -2468,7 +2468,7 @@ dump_packet_and_trunc(u_char *user, cons
 

svn commit: r301704 - head/lib/libc/rpc

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 23:17:30 2016
New Revision: 301704
URL: https://svnweb.freebsd.org/changeset/base/301704

Log:
  Test for strchr(3) returning NULL, not 0
  
  MFC after: 3 days
  Reported by: coccinelle
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/rpc/getnetpath.c

Modified: head/lib/libc/rpc/getnetpath.c
==
--- head/lib/libc/rpc/getnetpath.c  Wed Jun  8 23:13:20 2016
(r301703)
+++ head/lib/libc/rpc/getnetpath.c  Wed Jun  8 23:17:30 2016
(r301704)
@@ -262,7 +262,7 @@ _get_next_token(char *npp, int token)
 *cp++ = '\0';  /* null-terminate token */
 /* get rid of any backslash escapes */
 ep = npp;
-while ((np = strchr(ep, '\\')) != 0) {
+while ((np = strchr(ep, '\\')) != NULL) {
if (np[1] == '\\')
np++;
strcpy(np, (ep = &np[1]));  /* XXX: overlapping string copy */
___
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: r301703 - head/sys/boot/efi/libefi

2016-06-08 Thread Andrew Turner
Author: andrew
Date: Wed Jun  8 23:13:20 2016
New Revision: 301703
URL: https://svnweb.freebsd.org/changeset/base/301703

Log:
  Print the newline character along with the carriage return when TERM_EMU is
  disabled. Without this we print all lines over top of each other.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/boot/efi/libefi/efi_console.c

Modified: head/sys/boot/efi/libefi/efi_console.c
==
--- head/sys/boot/efi/libefi/efi_console.c  Wed Jun  8 22:36:55 2016
(r301702)
+++ head/sys/boot/efi/libefi/efi_console.c  Wed Jun  8 23:13:20 2016
(r301703)
@@ -139,8 +139,7 @@ efi_cons_rawputchar(int c)
 #ifndefTERM_EMU
if (c == '\n')
efi_cons_efiputchar('\r');
-   else
-   efi_cons_efiputchar(c);
+   efi_cons_efiputchar(c);
 #else
switch (c) {
case '\r':
___
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: r301702 - head/sys/boot/efi/libefi

2016-06-08 Thread Andrew Turner
Author: andrew
Date: Wed Jun  8 22:36:55 2016
New Revision: 301702
URL: https://svnweb.freebsd.org/changeset/base/301702

Log:
  Allow libefi to be built with TERM_EMU undefined. There were a few places
  where we assumed TERM_EMU was defined but didn't check. Fix these by also
  including them under the ifdefs.
  
  As HO is called from loader we need a null implementation so loader.efi
  doesn't need to know which version of libefi it is building against.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/boot/efi/libefi/efi_console.c

Modified: head/sys/boot/efi/libefi/efi_console.c
==
--- head/sys/boot/efi/libefi/efi_console.c  Wed Jun  8 22:30:21 2016
(r301701)
+++ head/sys/boot/efi/libefi/efi_console.c  Wed Jun  8 22:36:55 2016
(r301702)
@@ -111,9 +111,9 @@ efi_cons_probe(struct console *cp)
 static int
 efi_cons_init(int arg)
 {
+#ifdef TERM_EMU
conout->SetAttribute(conout, EFI_TEXT_ATTR(DEFAULT_FGCOLOR,
DEFAULT_BGCOLOR));
-#ifdef TERM_EMU
end_term();
get_pos(&curx, &cury);
curs_move(&curx, &cury, curx, cury);
@@ -178,6 +178,7 @@ efi_cons_rawputchar(int c)
}
 }
 
+#ifdef TERM_EMU
 /* Gracefully exit ESC-sequence processing in case of misunderstanding. */
 static void
 bail_out(int c)
@@ -412,6 +413,12 @@ efi_term_emu(int c)
break;
}
 }
+#else
+void
+HO(void)
+{
+}
+#endif
 
 void
 efi_cons_putchar(int c)
___
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: r301701 - in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump

2016-06-08 Thread Mariusz Zaborski
Author: oshogbo
Date: Wed Jun  8 22:30:21 2016
New Revision: 301701
URL: https://svnweb.freebsd.org/changeset/base/301701

Log:
  Fix spelling of the casper introduced in the r296047.
  
  PR:   210031
  Reported by:  AllanJude, jmallett

Modified:
  head/contrib/tcpdump/addrtoname.c
  head/contrib/tcpdump/config.h.in
  head/contrib/tcpdump/configure
  head/contrib/tcpdump/tcpdump.c
  head/usr.sbin/tcpdump/tcpdump/config.h

Modified: head/contrib/tcpdump/addrtoname.c
==
--- head/contrib/tcpdump/addrtoname.c   Wed Jun  8 22:29:30 2016
(r301700)
+++ head/contrib/tcpdump/addrtoname.c   Wed Jun  8 22:30:21 2016
(r301701)
@@ -29,10 +29,10 @@
 #include "config.h"
 #endif
 
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
 #include 
 #include 
-#endif /* HAVE_CAPSPER */
+#endif /* HAVE_CASPER */
 #include 
 
 #ifdef USE_ETHER_NTOHOST
@@ -204,7 +204,7 @@ intoa(uint32_t addr)
 
 static uint32_t f_netmask;
 static uint32_t f_localnet;
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
 extern cap_channel_t *capdns;
 #endif
 
@@ -252,7 +252,7 @@ getname(netdissect_options *ndo, const u
 */
if (!ndo->ndo_nflag &&
(addr & f_netmask) == f_localnet) {
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
if (capdns != NULL) {
hp = cap_gethostbyaddr(capdns, (char *)&addr, 4,
AF_INET);
@@ -309,7 +309,7 @@ getname6(netdissect_options *ndo, const 
 * Do not print names if -n was given.
 */
if (!ndo->ndo_nflag) {
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
if (capdns != NULL) {
hp = cap_gethostbyaddr(capdns, (char *)&addr,
sizeof(addr), AF_INET6);

Modified: head/contrib/tcpdump/config.h.in
==
--- head/contrib/tcpdump/config.h.inWed Jun  8 22:29:30 2016
(r301700)
+++ head/contrib/tcpdump/config.h.inWed Jun  8 22:30:21 2016
(r301701)
@@ -10,7 +10,7 @@
 #undef HAVE_BPF_DUMP
 
 /* capsicum support available */
-#undef HAVE_CAPSPER
+#undef HAVE_CASPER
 
 /* Define to 1 if you have the `cap_enter' function. */
 #undef HAVE_CAP_ENTER

Modified: head/contrib/tcpdump/configure
==
--- head/contrib/tcpdump/configure  Wed Jun  8 22:29:30 2016
(r301700)
+++ head/contrib/tcpdump/configure  Wed Jun  8 22:30:21 2016
(r301701)
@@ -4566,7 +4566,7 @@ fi
 $as_echo_n "checking whether to sandbox using capsicum... " >&6; }
 if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a 
"x$ac_lbl_capsicum_function_not_seen" != "xyes"; then
 
-$as_echo "#define HAVE_CAPSPER 1" >>confdefs.h
+$as_echo "#define HAVE_CASPER 1" >>confdefs.h
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }

Modified: head/contrib/tcpdump/tcpdump.c
==
--- head/contrib/tcpdump/tcpdump.c  Wed Jun  8 22:29:30 2016
(r301700)
+++ head/contrib/tcpdump/tcpdump.c  Wed Jun  8 22:30:21 2016
(r301701)
@@ -87,7 +87,7 @@ extern int SIZE_BUF;
 #include 
 #include 
 #endif /* __FreeBSD__ */
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
 #include 
 #include 
 #include 
@@ -96,7 +96,7 @@ extern int SIZE_BUF;
 #include 
 #include 
 #include 
-#endif /* HAVE_CAPSPER */
+#endif /* HAVE_CASPER */
 #include 
 #include 
 #include 
@@ -160,7 +160,7 @@ static int infoprint;
 
 char *program_name;
 
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
 cap_channel_t *capdns;
 #endif
 
@@ -484,7 +484,7 @@ struct dump_info {
char*CurrentFileName;
pcap_t  *pd;
pcap_dumper_t *p;
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
int dirfd;
 #endif
 };
@@ -908,7 +908,7 @@ get_next_file(FILE *VFile, char *ptr)
return ret;
 }
 
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
 static cap_channel_t *
 capdns_setup(void)
 {
@@ -935,7 +935,7 @@ capdns_setup(void)
 
return (capdnsloc);
 }
-#endif /* HAVE_CAPSPER */
+#endif /* HAVE_CASPER */
 
 #ifdef HAVE_PCAP_SET_TSTAMP_PRECISION
 static int
@@ -967,7 +967,7 @@ tstamp_precision_to_string(int precision
 }
 #endif
 
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
 /*
  * Ensure that, on a dump file's descriptor, we have all the rights
  * necessary to make the standard I/O library work with an fdopen()ed
@@ -1067,9 +1067,9 @@ main(int argc, char **argv)
 #endif
int status;
FILE *VFile;
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
cap_rights_t rights;
-#endif /* HAVE_CAPSPER */
+#endif /* HAVE_CASPER */
int cansandbox;
 
 #ifdef WIN32
@@ -1610,7 +1610,7 @@ main(int argc, char **argv)
 
if (pd == NULL)
error("%s", ebuf);
-#ifdef HAVE_CAPSPER
+#ifdef HAVE_CASPER
cap_rights_init(&rights, CA

svn commit: r301700 - in head/sys/arm: arm include

2016-06-08 Thread Andrew Turner
Author: andrew
Date: Wed Jun  8 22:29:30 2016
New Revision: 301700
URL: https://svnweb.freebsd.org/changeset/base/301700

Log:
  Remove the ARMv4/ARMv5 userland atomic support from struct proc on armv6.
  Nothing should use this on armv6 as we use the atomic instructions added in
  ARMv6k.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm/arm/genassym.c
  head/sys/arm/include/proc.h

Modified: head/sys/arm/arm/genassym.c
==
--- head/sys/arm/arm/genassym.c Wed Jun  8 22:28:57 2016(r301699)
+++ head/sys/arm/arm/genassym.c Wed Jun  8 22:29:30 2016(r301700)
@@ -101,8 +101,10 @@ ASSYM(TD_PROC, offsetof(struct thread, t
 ASSYM(TD_MD, offsetof(struct thread, td_md));
 ASSYM(TD_LOCK, offsetof(struct thread, td_lock));
 ASSYM(MD_TP, offsetof(struct mdthread, md_tp));
+#if __ARM_ARCH < 6
 ASSYM(MD_RAS_START, offsetof(struct mdthread, md_ras_start));
 ASSYM(MD_RAS_END, offsetof(struct mdthread, md_ras_end));
+#endif
 
 ASSYM(TF_SPSR, offsetof(struct trapframe, tf_spsr));
 ASSYM(TF_R0, offsetof(struct trapframe, tf_r0));

Modified: head/sys/arm/include/proc.h
==
--- head/sys/arm/include/proc.h Wed Jun  8 22:28:57 2016(r301699)
+++ head/sys/arm/include/proc.h Wed Jun  8 22:29:30 2016(r301700)
@@ -54,8 +54,10 @@ struct mdthread {
int md_ptrace_instr_alt;
int md_ptrace_addr_alt;
register_t md_tp;
+#if __ARM_ARCH < 6
void *md_ras_start;
void *md_ras_end;
+#endif
 };
 
 struct mdproc {
___
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: r301699 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 22:28:57 2016
New Revision: 301699
URL: https://svnweb.freebsd.org/changeset/base/301699

Log:
  MFstable/10 r301695:
  
  MFC r300870,r300884:
  
  r300870:
  
  Unbreak the zfs(4) build
  
  vm/vm_pageout.h grew a dependency on the bool typedef in r300865
  
  arc.c didn't include sys/types.h, which included the definition for the 
typedef
  
  Other items (ofed, drm2) might need to be chased for this commit.
  
  Pointyhat to: alc
  
  r300884:
  
  Fix up r300870
  
  The sys/types.h fix I proposed was only tested with zfs(4), not with
  libzpool, which is where the build failure actually existed
  
  Remove vm/vm_pageout.h from arc.c and zfs_vnops.c because they're both
  unneeded
  
  In collaboration with: kib

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Wed Jun 
 8 21:38:51 2016(r301698)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Wed Jun 
 8 22:28:57 2016(r301699)
@@ -137,7 +137,6 @@
 #include 
 #include 
 
-#include 
 
 #ifdef illumos
 #ifndef _KERNEL

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jun 
 8 21:38:51 2016(r301698)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Jun 
 8 22:28:57 2016(r301699)
@@ -72,7 +72,6 @@
 #include 
 #include 
 #include 
-#include 
 
 /*
  * Programming rules.
___
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: r301698 - in head/sys: dev/bhnd dev/bhnd/bcma dev/bhnd/siba mips/broadcom

2016-06-08 Thread Landon J. Fuller
Author: landonf
Date: Wed Jun  8 21:38:51 2016
New Revision: 301698
URL: https://svnweb.freebsd.org/changeset/base/301698

Log:
  bhnd(4): Fix mips/broadcom core matching and bus pass order.
  
  Changes:
  
  - Fixed incorrect MIPS74k vendor ID in the bhnd core descriptor tables
  - Fixed MIPS core driver's matching against MIPS/MIPS33 cores.
  - Improved MIPS3302 core description.
  - Enabled BUS_PASS_BUS on the bhnd nexus drivers to allow early probing
of the MIPS core.
  - Enabled BUS_PASS_CPU on the MIPS core driver to ensure correct attach
order.
  - Disabled matching of the MIPS core driver on non-SoC devices.
  
  Reviewed by:  Michael Zhilin 
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D6735

Modified:
  head/sys/dev/bhnd/bcma/bcma_nexus.c
  head/sys/dev/bhnd/bhnd_subr.c
  head/sys/dev/bhnd/siba/siba_nexus.c
  head/sys/mips/broadcom/bcm_mipscore.c

Modified: head/sys/dev/bhnd/bcma/bcma_nexus.c
==
--- head/sys/dev/bhnd/bcma/bcma_nexus.c Wed Jun  8 21:31:33 2016
(r301697)
+++ head/sys/dev/bhnd/bcma/bcma_nexus.c Wed Jun  8 21:38:51 2016
(r301698)
@@ -135,4 +135,5 @@ static device_method_t bcma_nexus_method
 DEFINE_CLASS_2(bhnd, bcma_nexus_driver, bcma_nexus_methods,
 sizeof(struct bcma_nexus_softc), bhnd_nexus_driver, bcma_driver);
 
-DRIVER_MODULE(bcma_nexus, nexus, bcma_nexus_driver, bhnd_devclass, 0, 0);
+EARLY_DRIVER_MODULE(bcma_nexus, nexus, bcma_nexus_driver, bhnd_devclass, 0, 0,
+BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);

Modified: head/sys/dev/bhnd/bhnd_subr.c
==
--- head/sys/dev/bhnd/bhnd_subr.c   Wed Jun  8 21:31:33 2016
(r301697)
+++ head/sys/dev/bhnd/bhnd_subr.c   Wed Jun  8 21:38:51 2016
(r301698)
@@ -86,7 +86,7 @@ static const struct bhnd_core_desc {
BHND_CDESC(BCM, APHY,   WLAN_PHY,   "802.11a PHY"),
BHND_CDESC(BCM, BPHY,   WLAN_PHY,   "802.11b PHY"),
BHND_CDESC(BCM, GPHY,   WLAN_PHY,   "802.11g PHY"),
-   BHND_CDESC(BCM, MIPS33, CPU,"MIPS 3302 Core"),
+   BHND_CDESC(BCM, MIPS33, CPU,"MIPS3302 Core"),
BHND_CDESC(BCM, USB11H, OTHER,  "USB 1.1 Host 
Controller"),
BHND_CDESC(BCM, USB11D, OTHER,  "USB 1.1 Device Core"),
BHND_CDESC(BCM, USB20H, OTHER,  "USB 2.0 Host 
Controller"),
@@ -108,7 +108,7 @@ static const struct bhnd_core_desc {
BHND_CDESC(BCM, SDIOD,  OTHER,  "SDIO Device Core"),
BHND_CDESC(BCM, ARMCM3, CPU,"ARM Cortex-M3 CPU"),
BHND_CDESC(BCM, HTPHY,  WLAN_PHY,   "802.11n 4x4 PHY"),
-   BHND_CDESC(BCM, MIPS74K,CPU,"MIPS74k CPU"),
+   BHND_CDESC(MIPS,MIPS74K,CPU,"MIPS74k CPU"),
BHND_CDESC(BCM, GMAC,   ENET_MAC,   "Gigabit MAC core"),
BHND_CDESC(BCM, DMEMC,  MEMC,   "DDR1/DDR2 Memory 
Controller"),
BHND_CDESC(BCM, PCIERC, OTHER,  "PCIe Root Complex"),

Modified: head/sys/dev/bhnd/siba/siba_nexus.c
==
--- head/sys/dev/bhnd/siba/siba_nexus.c Wed Jun  8 21:31:33 2016
(r301697)
+++ head/sys/dev/bhnd/siba/siba_nexus.c Wed Jun  8 21:38:51 2016
(r301698)
@@ -115,4 +115,5 @@ static device_method_t siba_nexus_method
 DEFINE_CLASS_2(bhnd, siba_nexus_driver, siba_nexus_methods,
 sizeof(struct siba_nexus_softc), bhnd_nexus_driver, siba_driver);
 
-DRIVER_MODULE(siba_nexus, nexus, siba_nexus_driver, bhnd_devclass, 0, 0);
+EARLY_DRIVER_MODULE(siba_nexus, nexus, siba_nexus_driver, bhnd_devclass, 0, 0,
+BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);

Modified: head/sys/mips/broadcom/bcm_mipscore.c
==
--- head/sys/mips/broadcom/bcm_mipscore.c   Wed Jun  8 21:31:33 2016
(r301697)
+++ head/sys/mips/broadcom/bcm_mipscore.c   Wed Jun  8 21:38:51 2016
(r301698)
@@ -53,10 +53,13 @@ static const struct resource_spec mipsco
{ -1, -1, 0 }
 };
 
+#defineMIPSCORE_DEV(_vendor, _core)\
+   BHND_DEVICE(_vendor, _core, NULL, NULL, BHND_DF_SOC)
+
 struct bhnd_device mipscore_match[] = {
-   BHND_DEVICE(BCM,MIPS,   NULL,   NULL),
-   BHND_DEVICE(BCM,MIPS33, NULL,   NULL),
-   BHND_DEVICE(MIPS,   MIPS74K,NULL,   NULL),
+   MIPSCORE_DEV(BCM, MIPS),
+   MIPSCORE_DEV(BCM, MIPS33),
+   MIPSCORE_DEV(MIPS, MIPS74K),
BHND_DEVICE_END
 };
 
@@ -116,8 +119,8 @@ static device_method_t mipscore_methods[
 
 devclass_t bhnd_mipscore_devclass;
 
-DEFINE_CLASS_0(bhnd_mipscore, mipscore_driver, mipscore_methods,
-   sizeof(str

svn commit: r301697 - in head/sys: dev/bhnd dev/bhnd/cores/chipc dev/bhnd/cores/pci dev/bhnd/cores/pcie2 dev/bhnd/siba mips/broadcom

2016-06-08 Thread Landon J. Fuller
Author: landonf
Date: Wed Jun  8 21:31:33 2016
New Revision: 301697
URL: https://svnweb.freebsd.org/changeset/base/301697

Log:
  bhnd(4): Add a vendor parameter to BHND_DEVICE(), replacing vendor-specific
  BHND_*_DEVICE macros.
  
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D6736

Modified:
  head/sys/dev/bhnd/bhnd.h
  head/sys/dev/bhnd/cores/chipc/chipc.c
  head/sys/dev/bhnd/cores/pci/bhnd_pci.c
  head/sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
  head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c
  head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.c
  head/sys/dev/bhnd/siba/siba_bhndb.c
  head/sys/mips/broadcom/bcm_mipscore.c

Modified: head/sys/dev/bhnd/bhnd.h
==
--- head/sys/dev/bhnd/bhnd.hWed Jun  8 20:54:56 2016(r301696)
+++ head/sys/dev/bhnd/bhnd.hWed Jun  8 21:31:33 2016(r301697)
@@ -232,16 +232,8 @@ struct bhnd_device {
BHND_COREID_ ## _device) }, _desc, _quirks, \
_flags }
 
-#defineBHND_MIPS_DEVICE(_device, _desc, _quirks, ...)  \
-   _BHND_DEVICE(MIPS, _device, _desc, _quirks, \
-   ## __VA_ARGS__, 0)
-
-#defineBHND_ARM_DEVICE(_device, _desc, _quirks, ...)   \
-   _BHND_DEVICE(ARM, _device, _desc, _quirks,  \
-   ## __VA_ARGS__, 0)
-
-#defineBHND_DEVICE(_device, _desc, _quirks, ...)   \
-   _BHND_DEVICE(BCM, _device, _desc, _quirks,  \
+#defineBHND_DEVICE(_vendor, _device, _desc, _quirks, ...)  \
+   _BHND_DEVICE(_vendor, _device, _desc, _quirks,  \
## __VA_ARGS__, 0)
 
 #defineBHND_DEVICE_END { { BHND_MATCH_ANY }, NULL, NULL, 0 }

Modified: head/sys/dev/bhnd/cores/chipc/chipc.c
==
--- head/sys/dev/bhnd/cores/chipc/chipc.c   Wed Jun  8 20:54:56 2016
(r301696)
+++ head/sys/dev/bhnd/cores/chipc/chipc.c   Wed Jun  8 21:31:33 2016
(r301697)
@@ -84,7 +84,7 @@ static struct bhnd_device_quirk chipc_qu
 
 /* Supported device identifiers */
 static const struct bhnd_device chipc_devices[] = {
-   BHND_DEVICE(CC, NULL,   chipc_quirks),
+   BHND_DEVICE(BCM, CC, NULL, chipc_quirks),
BHND_DEVICE_END
 };
 

Modified: head/sys/dev/bhnd/cores/pci/bhnd_pci.c
==
--- head/sys/dev/bhnd/cores/pci/bhnd_pci.c  Wed Jun  8 20:54:56 2016
(r301696)
+++ head/sys/dev/bhnd/cores/pci/bhnd_pci.c  Wed Jun  8 21:31:33 2016
(r301697)
@@ -68,8 +68,8 @@ static struct bhnd_device_quirk bhnd_pci
 
 #defineBHND_PCI_QUIRKS bhnd_pci_quirks
 #defineBHND_PCIE_QUIRKSbhnd_pcie_quirks
-#defineBHND_PCI_DEV(_core, _desc, ...) \
-   { BHND_DEVICE(_core, _desc, BHND_ ## _core ## _QUIRKS,  \
+#defineBHND_PCI_DEV(_core, _desc, ...) 
\
+   { BHND_DEVICE(BCM, _core, _desc, BHND_ ## _core ## _QUIRKS, \
## __VA_ARGS__), BHND_PCI_REGFMT_ ## _core }
 
 static const struct bhnd_pci_device {

Modified: head/sys/dev/bhnd/cores/pci/bhnd_pci_hostb.c
==
--- head/sys/dev/bhnd/cores/pci/bhnd_pci_hostb.cWed Jun  8 20:54:56 
2016(r301696)
+++ head/sys/dev/bhnd/cores/pci/bhnd_pci_hostb.cWed Jun  8 21:31:33 
2016(r301697)
@@ -87,7 +87,7 @@ static intbhnd_pci_wars_hwdown(struct b
  */
 
 #defineBHND_PCI_DEV(_core, _quirks)\
-   BHND_DEVICE(_core, NULL, _quirks, BHND_DF_HOSTB)
+   BHND_DEVICE(BCM, _core, NULL, _quirks, BHND_DF_HOSTB)
 
 static const struct bhnd_device bhnd_pci_devs[] = {
BHND_PCI_DEV(PCI,   bhnd_pci_quirks),

Modified: head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c
==
--- head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c  Wed Jun  8 20:54:56 2016
(r301696)
+++ head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c  Wed Jun  8 21:31:33 2016
(r301697)
@@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
 static struct bhnd_device_quirk bhnd_pcie2_quirks[];
 
 #defineBHND_PCIE_DEV(_core, _desc, ...)
\
-   BHND_DEVICE(_core, _desc, bhnd_pcie2_quirks, ## __VA_ARGS__)
+   BHND_DEVICE(BCM, _core, _desc, bhnd_pcie2_quirks, ## __VA_ARGS__)
 
 static const struct bhnd_device bhnd_pcie2_devs[] = {
BHND_PCIE_DEV(PCIE2,"PCIe-G2 Host-PCI bridge",  BHND_DF_HOSTB),

Modified: head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.c
==
--- head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.cWed Jun  8 20:54:56 
2016(r301696)
+++ head/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.cWed Jun  8 21:31:

svn commit: r301696 - head/contrib/atf

2016-06-08 Thread Ed Schouten
Author: ed
Date: Wed Jun  8 20:54:56 2016
New Revision: 301696
URL: https://svnweb.freebsd.org/changeset/base/301696

Log:
  Don't let ATF call basename() and dirname() in a non-standard way.
  
  POSIX basename() and dirname() are allowed to overwrite the input
  buffer. The advantage of implementing it that way is that the functions
  can be thread-safe, as they don't store the result in a global buffer.
  
  It looks like ATF wants to call basename() and dirname() in the
  non-standard way where the argument is of type "const char *". This
  change disables the calls to basename() and dirname(), which only seems
  to affect the formatting of some rare debug/error messages.
  
  Reviewed by:  ngie
  Differential Revision:https://reviews.freebsd.org/D6627

Modified:
  head/contrib/atf/config.h

Modified: head/contrib/atf/config.h
==
--- head/contrib/atf/config.h   Wed Jun  8 20:47:25 2016(r301695)
+++ head/contrib/atf/config.h   Wed Jun  8 20:54:56 2016(r301696)
@@ -2,10 +2,10 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
 /* Define to 1 if basename takes a constant pointer */
-#define HAVE_CONST_BASENAME 1
+/* #undef HAVE_CONST_BASENAME */
 
 /* Define to 1 if dirname takes a constant pointer */
-#define HAVE_CONST_DIRNAME 1
+/* #undef HAVE_CONST_DIRNAME */
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_DLFCN_H 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: r301695 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 20:47:25 2016
New Revision: 301695
URL: https://svnweb.freebsd.org/changeset/base/301695

Log:
  MFC r300870,r300884:
  
  r300870:
  
  Unbreak the zfs(4) build
  
  vm/vm_pageout.h grew a dependency on the bool typedef in r300865
  
  arc.c didn't include sys/types.h, which included the definition for the 
typedef
  
  Other items (ofed, drm2) might need to be chased for this commit.
  
  Pointyhat to: alc
  
  r300884:
  
  Fix up r300870
  
  The sys/types.h fix I proposed was only tested with zfs(4), not with
  libzpool, which is where the build failure actually existed
  
  Remove vm/vm_pageout.h from arc.c and zfs_vnops.c because they're both
  unneeded
  
  In collaboration with: kib

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c  Wed Jun 
 8 20:42:35 2016(r301694)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c  Wed Jun 
 8 20:47:25 2016(r301695)
@@ -139,7 +139,6 @@
 #include 
 #include 
 
-#include 
 #include 
 
 #ifdef illumos

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Wed Jun  8 20:42:35 2016(r301694)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Wed Jun  8 20:47:25 2016(r301695)
@@ -75,7 +75,6 @@
 #include 
 #include 
 #include 
-#include 
 
 /*
  * Programming rules.
___
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: r301694 - head/usr.sbin/bsdinstall/scripts

2016-06-08 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Jun  8 20:42:35 2016
New Revision: 301694
URL: https://svnweb.freebsd.org/changeset/base/301694

Log:
  bsdinstall: add country/regulatory domain configuration dialog.
  
  Allow to setup country and/or regulatory domain before scanning
  (since channel list is affected by regulatory restrictions this may
  impact scan results).
  
  PR:   182600 (originally)
  Differential Revision:https://reviews.freebsd.org/D6325

Modified:
  head/usr.sbin/bsdinstall/scripts/wlanconfig

Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig
==
--- head/usr.sbin/bsdinstall/scripts/wlanconfig Wed Jun  8 20:22:25 2016
(r301693)
+++ head/usr.sbin/bsdinstall/scripts/wlanconfig Wed Jun  8 20:42:35 2016
(r301694)
@@ -31,6 +31,7 @@
 
 BSDCFG_SHARE="/usr/share/bsdconfig"
 . $BSDCFG_SHARE/common.subr || exit 1
+f_include $BSDCFG_SHARE/dialog.subr
 
  MAIN
 
@@ -58,40 +59,190 @@ if [ $? -ne 0 -a -z $BSDINSTALL_CONFIGCU
exit 1
 fi
 
-output=$( wpa_cli scan 2>&1 )
-f_dprintf "%s" "$output"
-dialog --backtitle "FreeBSD Installer" --title "Scanning" --ok-label "Skip" \
-   --pause "Waiting 5 seconds to scan for wireless networks..." \
-   9 40 5 || exit 1
-
-SCAN_RESULTS=`wpa_cli scan_results`
-NETWORKS=`echo "$SCAN_RESULTS" | awk -F '\t' \
-   '/..:..:..:..:..:../ {if (length($5) > 0) printf("\"%s\"\t%s\n", $5, $4);}' 
|
-   sort | uniq`
-
-if [ -z "$NETWORKS" ]; then
-   dialog --backtitle "FreeBSD Installer" --title "Error" \
-   --yesno "No wireless networks were found. Rescan?" 0 0 && \
-   exec $0 $@
-   exit 1
+country_set()
+{
+   local error_str=
+   local iface_up=
+   local ifconfig_args=
+
+   # Setup what was selected
+   # NB: do not change order of arguments (or regdomain will be ignored)
+   if [ ! -z "$2" ]; then
+   ifconfig_args="${ifconfig_args}country $2"
+   fi
+   if [ ! -z "$1" ]; then
+   if [ ! -z "$2" ]; then
+   ifconfig_args="${ifconfig_args} "
+   fi
+   ifconfig_args="${ifconfig_args}regdomain $1"
+   fi
+   if [ -z "$ifconfig_args" ]; then
+   # Nothing to do (everything was skipped)
+   return $SUCCESS
+   fi
+
+   # Regdomain/country cannot be applied while interface is running
+   iface_up=`ifconfig -lu | grep -w $WLAN_IFACE`
+   if [ ! -z "$iface_up" ]; then
+   ifconfig $WLAN_IFACE down
+   fi
+   error_str=`ifconfig $WLAN_IFACE $ifconfig_args 2>&1 | \
+   sed 's/ifconfig: //'`
+   if [ ! -z "$iface_up" ]; then
+   # Restart wpa_supplicant(8) (should not fail).
+   wpa_supplicant -B -i $WLAN_IFACE -c \
+   $BSDINSTALL_TMPETC/wpa_supplicant.conf
+   fi
+   if [ ! -z "$error_str" ]; then
+   dialog --backtitle "FreeBSD Installer" --title "Error" \
+   --yes-label Change --no-label Ignore --yesno \
+   "Error while applying chosen settings ($error_str)" 0 0
+   if [ $? -eq $DIALOG_OK ]; then
+   return $FAILURE # Restart
+   else
+   return $SUCCESS # Skip
+   fi
+   else
+   : > $BSDINSTALL_TMPETC/rc.conf.net.wlan
+   echo create_args_$WLAN_IFACE=\"$ifconfig_args\" >> \
+   $BSDINSTALL_TMPETC/rc.conf.net.wlan
+   fi
+
+   return $SUCCESS
+}
+
+dialog_country_select()
+{
+   local input=
+   local def_item_regdomain=
+   local def_item_country=
+   local regdomains=
+   local countries=
+   local regdomain=
+   local country=
+
+   # Parse available countries/regdomains
+   input=`ifconfig $WLAN_IFACE list countries | sed 's/DEBUG//gi'`
+   regdomains=`echo $input | sed 's/.*domains://' | tr ' ' '\n' | \
+   sort | tr '\n' ' '`
+   countries=`echo $input | sed 's/Country codes://' | \
+   sed 's/Regulatory.*//' | awk '{
+   for (i = 1; i <= NF; i++) {
+   printf "%s", $i
+   if (match($i, "[[:lower:]]"))
+   if (match($(i+1), "[[:lower:]]"))
+   printf "\\ "
+   else
+   printf "\n"
+   else
+   printf " "
+   }
+   }' | sort -k 2 | tr '\n' ' '`
+
+   # Change default cursor position (if required).
+   if [ "$1" != "" ]; then
+   def_item_regdomain="--default-item $1"
+   fi
+   if [ "$2" != "" ]; then
+   def_item_country="--default-item $2"
+   fi
+
+   f_dialog_menu_size height width rows \"Regdomain sel

svn commit: r301693 - head/sys/dev/dwc

2016-06-08 Thread Jared McNeill
Author: jmcneill
Date: Wed Jun  8 20:22:25 2016
New Revision: 301693
URL: https://svnweb.freebsd.org/changeset/base/301693

Log:
  Multicast filters on DWC_GMAC_ALT_DESC type implementations use a different
  hash register setup. In addition, strip trailing FCS in receive path.
  
  Reviewed by:  loos
  Differential Revision:https://reviews.freebsd.org/D6653

Modified:
  head/sys/dev/dwc/if_dwc.c

Modified: head/sys/dev/dwc/if_dwc.c
==
--- head/sys/dev/dwc/if_dwc.c   Wed Jun  8 20:01:10 2016(r301692)
+++ head/sys/dev/dwc/if_dwc.c   Wed Jun  8 20:22:25 2016(r301693)
@@ -587,19 +587,26 @@ dwc_setup_rxfilter(struct dwc_softc *sc)
struct ifmultiaddr *ifma;
struct ifnet *ifp;
uint8_t *eaddr, val;
-   uint32_t crc, ffval, hashbit, hashreg, hi, lo, reg;
+   uint32_t crc, ffval, hashbit, hashreg, hi, lo, hash[8], hmask;
+   int nhash, i;
 
DWC_ASSERT_LOCKED(sc);
 
ifp = sc->ifp;
+   nhash = sc->mactype == DWC_GMAC_ALT_DESC ? 2 : 8;
+   hmask = ((nhash << 5) - 1) | 0xf;
 
/*
 * Set the multicast (group) filter hash.
 */
-   if ((ifp->if_flags & IFF_ALLMULTI))
+   if ((ifp->if_flags & IFF_ALLMULTI) != 0) {
ffval = (FRAME_FILTER_PM);
-   else {
+   for (i = 0; i < nhash; i++)
+   hash[i] = ~0;
+   } else {
ffval = (FRAME_FILTER_HMC);
+   for (i = 0; i < nhash; i++)
+   hash[i] = 0;
if_maddr_rlock(ifp);
TAILQ_FOREACH(ifma, &sc->ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_LINK)
@@ -608,13 +615,13 @@ dwc_setup_rxfilter(struct dwc_softc *sc)
ifma->ifma_addr), ETHER_ADDR_LEN);
 
/* Take lower 8 bits and reverse it */
-   val = bitreverse(~crc & 0xff);
-   hashreg = (val >> 5);
+   val = bitreverse(~crc & 0xff) & hmask;
+   if (sc->mactype == DWC_GMAC_ALT_DESC)
+   hashreg = (val >> 5) == 0;
+   else
+   hashreg = (val >> 5);
hashbit = (val & 31);
-
-   reg = READ4(sc, HASH_TABLE_REG(hashreg));
-   reg |= (1 << hashbit);
-   WRITE4(sc, HASH_TABLE_REG(hashreg), reg);
+   hash[hashreg] |= (1 << hashbit);
}
if_maddr_runlock(ifp);
}
@@ -635,6 +642,8 @@ dwc_setup_rxfilter(struct dwc_softc *sc)
WRITE4(sc, MAC_ADDRESS_LOW(0), lo);
WRITE4(sc, MAC_ADDRESS_HIGH(0), hi);
WRITE4(sc, MAC_FRAME_FILTER, ffval);
+   for (i = 0; i < nhash; i++)
+   WRITE4(sc, HASH_TABLE_REG(i), hash[i]);
 }
 
 static int
@@ -759,6 +768,9 @@ dwc_rxfinish_locked(struct dwc_softc *sc
m->m_len = len;
if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
 
+   /* Remove trailing FCS */
+   m_adj(m, -ETHER_CRC_LEN);
+
DWC_UNLOCK(sc);
(*ifp->if_input)(ifp, m);
DWC_LOCK(sc);
___
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: r301692 - in head/sys/modules: bwn bwn_pci siba_bwn

2016-06-08 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Jun  8 20:01:10 2016
New Revision: 301692
URL: https://svnweb.freebsd.org/changeset/base/301692

Log:
  bwn, bwn_pci, siba_bwn: add missing opt_*.h dependencies.

Modified:
  head/sys/modules/bwn/Makefile
  head/sys/modules/bwn_pci/Makefile
  head/sys/modules/siba_bwn/Makefile

Modified: head/sys/modules/bwn/Makefile
==
--- head/sys/modules/bwn/Makefile   Wed Jun  8 19:39:44 2016
(r301691)
+++ head/sys/modules/bwn/Makefile   Wed Jun  8 20:01:10 2016
(r301692)
@@ -12,7 +12,7 @@ SRCS+=if_bwn_phy_g.c if_bwn_phy_lp.c
 SRCS+= if_bwn_phy_n.c
 
 # Other
-SRCS+= device_if.h bus_if.h pci_if.h
+SRCS+= device_if.h bus_if.h pci_if.h opt_bwn.h opt_wlan.h
 
 # Uncomment this for the GPL PHY code; this requires the
 # module be built with BWN_GPL_PHY set in the kernel

Modified: head/sys/modules/bwn_pci/Makefile
==
--- head/sys/modules/bwn_pci/Makefile   Wed Jun  8 19:39:44 2016
(r301691)
+++ head/sys/modules/bwn_pci/Makefile   Wed Jun  8 20:01:10 2016
(r301692)
@@ -7,5 +7,6 @@ SRCS=   if_bwn_pci.c bwn_mac.c
 SRCS+= bhnd_bus_if.h bhndb_bus_if.h \
bhndb_if.h bhnd_nvram_map.h
 SRCS+= device_if.h bus_if.h pci_if.h \
+   opt_bwn.h opt_wlan.h opt_global.h
 
 .include 

Modified: head/sys/modules/siba_bwn/Makefile
==
--- head/sys/modules/siba_bwn/Makefile  Wed Jun  8 19:39:44 2016
(r301691)
+++ head/sys/modules/siba_bwn/Makefile  Wed Jun  8 20:01:10 2016
(r301692)
@@ -4,6 +4,6 @@
 
 KMOD=  siba_bwn
 SRCS=  siba_core.c siba_bwn.c sibareg.h sibavar.h
-SRCS+= device_if.h bus_if.h pci_if.h
+SRCS+= device_if.h bus_if.h pci_if.h opt_siba.h
 
 .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: r301691 - head/contrib/one-true-awk

2016-06-08 Thread Pedro F. Giffuni
Author: pfg
Date: Wed Jun  8 19:39:44 2016
New Revision: 301691
URL: https://svnweb.freebsd.org/changeset/base/301691

Log:
  Revert r301689 - one-true-awk: Avoid a NULL dereference.
  
  I got this wrong and the coverity report doesn't match the NetBSD change,
  which was thought for a different version.
  
  The change wouldn't hurt but let's wait until upstream figures this out.

Modified:
  head/contrib/one-true-awk/tran.c

Modified: head/contrib/one-true-awk/tran.c
==
--- head/contrib/one-true-awk/tran.cWed Jun  8 19:31:12 2016
(r301690)
+++ head/contrib/one-true-awk/tran.cWed Jun  8 19:39:44 2016
(r301691)
@@ -333,7 +333,7 @@ char *setsval(Cell *vp, const char *s)  /
donefld = 0;/* mark $1... invalid */
donerec = 1;
}
-   t = s ? tostring(s) : tostring(""); /* in case it's self-assign */
+   t = tostring(s);/* in case it's self-assign */
if (freeable(vp))
xfree(vp->sval);
vp->tval &= ~NUM;
___
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: r301690 - stable/9/usr.sbin/bsnmpd/tools/libbsnmptools

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 19:31:12 2016
New Revision: 301690
URL: https://svnweb.freebsd.org/changeset/base/301690

Log:
  MFstable/10 r301655:
  
  MFC r299766:
  
  Fix logically dead code pointed out by clang/Coverity
  
  parse_context, parse_user_security: test for validity of results from
  parse_ascii(..) with by casting to int32_t and comparing to -1; comparing
  unsigned types to negative values will always be false.
  
  CID: 1011432, 1011433

Modified:
  stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)
  stable/9/usr.sbin/bsnmpd/   (props changed)

Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
==
--- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c   Wed Jun  8 
19:24:48 2016(r301689)
+++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c   Wed Jun  8 
19:31:12 2016(r301690)
@@ -614,8 +614,8 @@ parse_context(struct snmp_toolinfo *snmp
warnx("Suboption 'context-engine' - no 
argument");
return (-1);
}
-   if ((snmp_client.clen = parse_ascii(val,
-   snmp_client.cengine, SNMP_ENGINE_ID_SIZ)) < 0) {
+   if ((int32_t)(snmp_client.clen = parse_ascii(val,
+   snmp_client.cengine, SNMP_ENGINE_ID_SIZ)) == -1) {
warnx("Bad EngineID - %s", val);
return (-1);
}
@@ -653,7 +653,7 @@ parse_user_security(struct snmp_toolinfo
}
snmp_client.engine.engine_len = parse_ascii(val, 
snmp_client.engine.engine_id, SNMP_ENGINE_ID_SIZ);
-   if (snmp_client.engine.engine_len < 0) {
+   if ((int32_t)snmp_client.engine.engine_len == -1) {
warnx("Bad EngineID - %s", val);
return (-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: r301689 - head/contrib/one-true-awk

2016-06-08 Thread Pedro F. Giffuni
Author: pfg
Date: Wed Jun  8 19:24:48 2016
New Revision: 301689
URL: https://svnweb.freebsd.org/changeset/base/301689

Log:
  one-true-awk: Avoid a NULL dereference.
  
  CID:  270862
  Obtained from:NetBSD (CVS Rev. 1.8)
  MFC after:2 weeks

Modified:
  head/contrib/one-true-awk/tran.c

Modified: head/contrib/one-true-awk/tran.c
==
--- head/contrib/one-true-awk/tran.cWed Jun  8 18:47:00 2016
(r301688)
+++ head/contrib/one-true-awk/tran.cWed Jun  8 19:24:48 2016
(r301689)
@@ -333,7 +333,7 @@ char *setsval(Cell *vp, const char *s)  /
donefld = 0;/* mark $1... invalid */
donerec = 1;
}
-   t = tostring(s);/* in case it's self-assign */
+   t = s ? tostring(s) : tostring(""); /* in case it's self-assign */
if (freeable(vp))
xfree(vp->sval);
vp->tval &= ~NUM;
___
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: r301681 - stable/9/sys/rpc

2016-06-08 Thread Ngie Cooper (yaneurabeya)

> On Jun 8, 2016, at 14:50, Cy Schubert  wrote:
> 
> In message <201606081823.u58inxvl053...@repo.freebsd.org>, Garrett Cooper
> write
> s:
>> Author: ngie
>> Date: Wed Jun  8 18:23:33 2016
>> New Revision: 301681
>> URL: https://svnweb.freebsd.org/changeset/base/301681
>> 
>> Log:
>>  MFstable/10 r301680:
>> 
>>  MFC r300625:
> 
> Why MFC to stable/10 and then to stable/9. Doesn't that make stable/10
> stable/9's ancestor? When stable/9 was first branched,HEAD was its
> ancestor. Doesn't this cause confusing ancestry in the branch?

Good question!

Yes; it makes ^/stable/10 ^/stable/9’s ancestor for changes from ^/head, even 
though the ancestry was the other way around (^/stable/9 is ^/stable/10’s 
ancestor, chronologically… but content-wise ^/stable/9 is a subset really of 
everything in ^/stable/10 and ^/head). There have been a few discussions about 
this on the developer’s list, and the general consensus was a trickle down 
method, i.e. “merge from head to head-1; merge from head-1 to head-2; etc”.

There’s some minor disagreement on content in the MFC messages, but the way I 
have things right now is the preferred format AFAIK, i.e. less people have 
nitpicked the messages, content-wise.

After I fix the small formatting annoyance with my MFCs vs others, I was 
thinking of putting out the scripts I use for CR; it would be nice for everyone 
to be using the same tools.

Thanks!
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r301681 - stable/9/sys/rpc

2016-06-08 Thread Cy Schubert
In message <201606081823.u58inxvl053...@repo.freebsd.org>, Garrett Cooper 
write
s:
> Author: ngie
> Date: Wed Jun  8 18:23:33 2016
> New Revision: 301681
> URL: https://svnweb.freebsd.org/changeset/base/301681
> 
> Log:
>   MFstable/10 r301680:
>   
>   MFC r300625:

Why MFC to stable/10 and then to stable/9. Doesn't that make stable/10 
stable/9's ancestor? When stable/9 was first branched,HEAD was its 
ancestor. Doesn't this cause confusing ancestry in the branch?


-- 
Cheers,
Cy Schubert  or 
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: r301687 - stable/10/lib/libc/rpc

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:46:10 2016
New Revision: 301687
URL: https://svnweb.freebsd.org/changeset/base/301687

Log:
  MFC r300624:
  
  Fix up r300385
  
  I accidentally glossed over the fact that tmp is manipulated via strchr, so
  if we tried to free `tmp` after r300385, it would have crashed.
  
  Create a separate pointer (tmp2) to track the original allocation of `tmp`,
  and free `tmp2` if `p->nc_lookups` can't be malloced
  
  CID: 1356026

Modified:
  stable/10/lib/libc/rpc/getnetconfig.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/getnetconfig.c
==
--- stable/10/lib/libc/rpc/getnetconfig.c   Wed Jun  8 18:43:56 2016
(r301686)
+++ stable/10/lib/libc/rpc/getnetconfig.c   Wed Jun  8 18:46:10 2016
(r301687)
@@ -697,7 +697,7 @@ dup_ncp(ncp)
 struct netconfig   *ncp;
 {
 struct netconfig   *p;
-char   *tmp;
+char   *tmp, *tmp2;
 u_int  i;
 
 if ((tmp=malloc(MAXNETCONFIGLINE)) == NULL)
@@ -706,6 +706,7 @@ struct netconfig*ncp;
free(tmp);
return(NULL);
 }
+tmp2 = tmp;
 /*
  * First we dup all the data from matched netconfig buffer.  Then we
  * adjust some of the member pointer to a pre-allocated buffer where
@@ -727,7 +728,7 @@ struct netconfig*ncp;
 if (p->nc_lookups == NULL) {
free(p->nc_netid);
free(p);
-   free(tmp);
+   free(tmp2);
return(NULL);
 }
 for (i=0; i < p->nc_nlookups; i++) {
___
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: r301688 - stable/9/lib/libc/rpc

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:47:00 2016
New Revision: 301688
URL: https://svnweb.freebsd.org/changeset/base/301688

Log:
  MFstable/10 r301687:
  
  MFC r300624:
  
  Fix up r300385
  
  I accidentally glossed over the fact that tmp is manipulated via strchr, so
  if we tried to free `tmp` after r300385, it would have crashed.
  
  Create a separate pointer (tmp2) to track the original allocation of `tmp`,
  and free `tmp2` if `p->nc_lookups` can't be malloced
  
  CID: 1356026

Modified:
  stable/9/lib/libc/rpc/getnetconfig.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/lib/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/rpc/getnetconfig.c
==
--- stable/9/lib/libc/rpc/getnetconfig.cWed Jun  8 18:46:10 2016
(r301687)
+++ stable/9/lib/libc/rpc/getnetconfig.cWed Jun  8 18:47:00 2016
(r301688)
@@ -697,7 +697,7 @@ dup_ncp(ncp)
 struct netconfig   *ncp;
 {
 struct netconfig   *p;
-char   *tmp;
+char   *tmp, *tmp2;
 u_int  i;
 
 if ((tmp=malloc(MAXNETCONFIGLINE)) == NULL)
@@ -706,6 +706,7 @@ struct netconfig*ncp;
free(tmp);
return(NULL);
 }
+tmp2 = tmp;
 /*
  * First we dup all the data from matched netconfig buffer.  Then we
  * adjust some of the member pointer to a pre-allocated buffer where
@@ -727,7 +728,7 @@ struct netconfig*ncp;
 if (p->nc_lookups == NULL) {
free(p->nc_netid);
free(p);
-   free(tmp);
+   free(tmp2);
return(NULL);
 }
 for (i=0; i < p->nc_nlookups; i++) {
___
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: r301686 - stable/9/lib/libc/rpc

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:43:56 2016
New Revision: 301686
URL: https://svnweb.freebsd.org/changeset/base/301686

Log:
  MFstable/10 r301684:
  
  MFC r300385:
  
  Don't leak `tmp` if `p->nc_lookups` can't be malloced

Modified:
  stable/9/lib/libc/rpc/getnetconfig.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/lib/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/rpc/getnetconfig.c
==
--- stable/9/lib/libc/rpc/getnetconfig.cWed Jun  8 18:43:11 2016
(r301685)
+++ stable/9/lib/libc/rpc/getnetconfig.cWed Jun  8 18:43:56 2016
(r301686)
@@ -727,6 +727,7 @@ struct netconfig*ncp;
 if (p->nc_lookups == NULL) {
free(p->nc_netid);
free(p);
+   free(tmp);
return(NULL);
 }
 for (i=0; i < p->nc_nlookups; i++) {
___
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: r301685 - stable/9/lib/libc/rpc

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:43:11 2016
New Revision: 301685
URL: https://svnweb.freebsd.org/changeset/base/301685

Log:
  MFstable/10 r301682:
  
  MFC r300386:
  
  Don't leak `handle` if svc_tp_create(..) succeeds and allocating a new
  struct xlist object fails
  
  CID: 978277

Modified:
  stable/9/lib/libc/rpc/svc_generic.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/lib/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/rpc/svc_generic.c
==
--- stable/9/lib/libc/rpc/svc_generic.c Wed Jun  8 18:41:49 2016
(r301684)
+++ stable/9/lib/libc/rpc/svc_generic.c Wed Jun  8 18:43:11 2016
(r301685)
@@ -121,7 +121,8 @@ svc_create(dispatch, prognum, versnum, n
if (l == NULL) {
warnx("svc_create: no memory");
mutex_unlock(&xprtlist_lock);
-   return (0);
+   num = 0;
+   goto done;
}
l->xprt = xprt;
l->next = xprtlist;
@@ -131,6 +132,7 @@ svc_create(dispatch, prognum, versnum, n
}
mutex_unlock(&xprtlist_lock);
}
+done:
__rpc_endconf(handle);
/*
 * In case of num == 0; the error messages are generated by the
___
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: r301684 - stable/10/lib/libc/rpc

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:41:49 2016
New Revision: 301684
URL: https://svnweb.freebsd.org/changeset/base/301684

Log:
  MFC r300385:
  
  Don't leak `tmp` if `p->nc_lookups` can't be malloced

Modified:
  stable/10/lib/libc/rpc/getnetconfig.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/getnetconfig.c
==
--- stable/10/lib/libc/rpc/getnetconfig.c   Wed Jun  8 18:38:48 2016
(r301683)
+++ stable/10/lib/libc/rpc/getnetconfig.c   Wed Jun  8 18:41:49 2016
(r301684)
@@ -727,6 +727,7 @@ struct netconfig*ncp;
 if (p->nc_lookups == NULL) {
free(p->nc_netid);
free(p);
+   free(tmp);
return(NULL);
 }
 for (i=0; i < p->nc_nlookups; i++) {
___
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: r301683 - head/etc/defaults

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:38:48 2016
New Revision: 301683
URL: https://svnweb.freebsd.org/changeset/base/301683

Log:
  Fix typo with description for $ipv6_cpe_wanif (upstram -> upstream)
  
  MFC after: 3 days
  PR: 210146
  Reported by: Sean M. Collins 
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/etc/defaults/rc.conf

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Wed Jun  8 18:27:44 2016(r301682)
+++ head/etc/defaults/rc.conf   Wed Jun  8 18:38:48 2016(r301683)
@@ -481,7 +481,7 @@ ipv6_static_routes=""   # Set to static r
#  route toward loopback interface.
 #ipv6_route_xxx="fec0:::0006:: -prefixlen 64 ::1"
 ipv6_gateway_enable="NO"   # Set to YES if this host will be a gateway.
-ipv6_cpe_wanif="NO"# Set to the upstram interface name if this
+ipv6_cpe_wanif="NO"# Set to the upstream interface name if this
# node will work as a router to forward IPv6
# packets not explicitly addressed to itself.
 ipv6_privacy="NO"  # Use privacy address on RA-receiving IFs
___
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: r301682 - stable/10/lib/libc/rpc

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:27:44 2016
New Revision: 301682
URL: https://svnweb.freebsd.org/changeset/base/301682

Log:
  MFC r300386:
  
  Don't leak `handle` if svc_tp_create(..) succeeds and allocating a new
  struct xlist object fails
  
  CID: 978277

Modified:
  stable/10/lib/libc/rpc/svc_generic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/svc_generic.c
==
--- stable/10/lib/libc/rpc/svc_generic.cWed Jun  8 18:23:33 2016
(r301681)
+++ stable/10/lib/libc/rpc/svc_generic.cWed Jun  8 18:27:44 2016
(r301682)
@@ -121,7 +121,8 @@ svc_create(dispatch, prognum, versnum, n
if (l == NULL) {
warnx("svc_create: no memory");
mutex_unlock(&xprtlist_lock);
-   return (0);
+   num = 0;
+   goto done;
}
l->xprt = xprt;
l->next = xprtlist;
@@ -131,6 +132,7 @@ svc_create(dispatch, prognum, versnum, n
}
mutex_unlock(&xprtlist_lock);
}
+done:
__rpc_endconf(handle);
/*
 * In case of num == 0; the error messages are generated by the
___
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: r301681 - stable/9/sys/rpc

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:23:33 2016
New Revision: 301681
URL: https://svnweb.freebsd.org/changeset/base/301681

Log:
  MFstable/10 r301680:
  
  MFC r300625:
  
  Remove unnecessary memset(.., 0, ..)'s
  
  The mem_alloc macro calls calloc (userspace) / malloc(.., M_WAITOK|M_ZERO)
  under the covers, so zeroing out memory is already handled by the underlying
  calls

Modified:
  stable/9/sys/rpc/svc.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/sys/rpc/svc.c
==
--- stable/9/sys/rpc/svc.c  Wed Jun  8 18:22:54 2016(r301680)
+++ stable/9/sys/rpc/svc.c  Wed Jun  8 18:23:33 2016(r301681)
@@ -848,9 +848,7 @@ svc_xprt_alloc()
SVCXPRT_EXT *ext;
 
xprt = mem_alloc(sizeof(SVCXPRT));
-   memset(xprt, 0, sizeof(SVCXPRT));
ext = mem_alloc(sizeof(SVCXPRT_EXT));
-   memset(ext, 0, sizeof(SVCXPRT_EXT));
xprt->xp_p3 = ext;
refcount_init(&xprt->xp_refs, 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: r301680 - stable/10/sys/rpc

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:22:54 2016
New Revision: 301680
URL: https://svnweb.freebsd.org/changeset/base/301680

Log:
  MFC r300625:
  
  Remove unnecessary memset(.., 0, ..)'s
  
  The mem_alloc macro calls calloc (userspace) / malloc(.., M_WAITOK|M_ZERO)
  under the covers, so zeroing out memory is already handled by the underlying
  calls

Modified:
  stable/10/sys/rpc/svc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/rpc/svc.c
==
--- stable/10/sys/rpc/svc.c Wed Jun  8 18:21:27 2016(r301679)
+++ stable/10/sys/rpc/svc.c Wed Jun  8 18:22:54 2016(r301680)
@@ -847,9 +847,7 @@ svc_xprt_alloc()
SVCXPRT_EXT *ext;
 
xprt = mem_alloc(sizeof(SVCXPRT));
-   memset(xprt, 0, sizeof(SVCXPRT));
ext = mem_alloc(sizeof(SVCXPRT_EXT));
-   memset(ext, 0, sizeof(SVCXPRT_EXT));
xprt->xp_p3 = ext;
refcount_init(&xprt->xp_refs, 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: r301679 - in head: contrib/libc-vis lib/libc/gen

2016-06-08 Thread Brooks Davis
Author: brooks
Date: Wed Jun  8 18:21:27 2016
New Revision: 301679
URL: https://svnweb.freebsd.org/changeset/base/301679

Log:
  Update to a June 8th snapshot of (un)vis form NetBSD.
  
  This adds stravis() and some new encoding flags VIS_SHELL, VIS_META,
  and VIS_NOLOCALE.
  
  Assorted cleanups and fixes includeing a manpage typo[0].
  
  PR:   210013 [0]
  Submitted by: pi [0]

Modified:
  head/contrib/libc-vis/unvis.c
  head/contrib/libc-vis/vis.3
  head/contrib/libc-vis/vis.c
  head/contrib/libc-vis/vis.h
  head/lib/libc/gen/Symbol.map
Directory Properties:
  head/contrib/libc-vis/   (props changed)

Modified: head/contrib/libc-vis/unvis.c
==
--- head/contrib/libc-vis/unvis.c   Wed Jun  8 18:21:25 2016
(r301678)
+++ head/contrib/libc-vis/unvis.c   Wed Jun  8 18:21:27 2016
(r301679)
@@ -1,4 +1,4 @@
-/* $NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $  */
+/* $NetBSD: unvis.c,v 1.44 2014/09/26 15:43:36 roy Exp $   */
 
 /*-
  * Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)unvis.c8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $");
+__RCSID("$NetBSD: unvis.c,v 1.44 2014/09/26 15:43:36 roy Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 __FBSDID("$FreeBSD$");
@@ -322,6 +322,12 @@ unvis(char *cp, int c, int *astate, int 
 */
*astate = SS(0, S_GROUND);
return UNVIS_NOCHAR;
+   default:
+   if (isgraph(c)) {
+   *cp = c;
+   *astate = SS(0, S_GROUND);
+   return UNVIS_VALID;
+   }
}
goto bad;
 

Modified: head/contrib/libc-vis/vis.3
==
--- head/contrib/libc-vis/vis.3 Wed Jun  8 18:21:25 2016(r301678)
+++ head/contrib/libc-vis/vis.3 Wed Jun  8 18:21:27 2016(r301679)
@@ -1,4 +1,4 @@
-.\"$NetBSD: vis.3,v 1.39 2013/02/20 20:05:26 christos Exp $
+.\"$NetBSD: vis.3,v 1.45 2016/06/08 15:00:04 wiz Exp $
 .\"$FreeBSD$
 .\"
 .\" Copyright (c) 1989, 1991, 1993
@@ -30,13 +30,14 @@
 .\"
 .\" @(#)vis.3  8.1 (Berkeley) 6/9/93
 .\"
-.Dd February 19, 2013
+.Dd January 14, 2015
 .Dt VIS 3
 .Os
 .Sh NAME
 .Nm vis ,
 .Nm nvis ,
 .Nm strvis ,
+.Nm stravis ,
 .Nm strnvis ,
 .Nm strvisx ,
 .Nm strnvisx ,
@@ -60,6 +61,8 @@
 .Ft int
 .Fn strvis "char *dst" "const char *src" "int flag"
 .Ft int
+.Fn stravis "char **dst" "const char *src" "int flag"
+.Ft int
 .Fn strnvis "char *dst" "size_t dlen" "const char *src" "int flag"
 .Ft int
 .Fn strvisx "char *dst" "const char *src" "size_t len" "int flag"
@@ -112,6 +115,7 @@ encoding format (explained below).
 .Pp
 The
 .Fn strvis ,
+.Fn stravis ,
 .Fn strnvis ,
 .Fn strvisx ,
 and
@@ -158,6 +162,9 @@ forms return the number of characters in
 (not including the trailing
 .Dv NUL ) .
 The
+.Fn stravis
+function allocates space dynamically to hold the string.
+The
 .Dq Nm n
 versions of the functions also take an additional argument
 .Fa dlen
@@ -240,11 +247,31 @@ alter this:
 Also encode the magic characters
 .Ql ( * ,
 .Ql \&? ,
-.Ql \&[
+.Ql \&[ ,
 and
 .Ql # )
 recognized by
 .Xr glob 3 .
+.It Dv VIS_SHELL
+Also encode the meta characters used by shells (in addition to the glob
+characters):
+.Ql ( ' ,
+.Ql ` ,
+.Ql \&" ,
+.Ql \&; ,
+.Ql & ,
+.Ql < ,
+.Ql > ,
+.Ql \&( ,
+.Ql \&) ,
+.Ql \&| ,
+.Ql \&] ,
+.Ql \e ,
+.Ql $ ,
+.Ql \&! ,
+.Ql \&^ ,
+and
+.Ql ~ ) .
 .It Dv VIS_SP
 Also encode space.
 .It Dv VIS_TAB
@@ -253,11 +280,10 @@ Also encode tab.
 Also encode newline.
 .It Dv VIS_WHITE
 Synonym for
-.Dv VIS_SP
-\&|
-.Dv VIS_TAB
-\&|
-.Dv VIS_NL .
+.Dv VIS_SP | VIS_TAB | VIS_NL .
+.It Dv VIS_META
+Synonym for
+.Dv VIS_WHITE | VIS_GLOB | VIS_SHELL .
 .It Dv VIS_SAFE
 Only encode
 .Dq unsafe
@@ -418,6 +444,11 @@ The encoding conversion is influenced by
 environment variable which defines the set of characters
 that can be copied without encoding.
 .Pp
+If
+.Dv VIS_NOLOCALE
+is set, processing is done assuming the C locale and overriding
+any other environment settings.
+.Pp
 When 8-bit data is present in the input,
 .Ev LC_CTYPE
 must be set to the correct locale or to the C locale.
@@ -513,7 +544,7 @@ appeared in
 .Nx 6.0
 and
 .Fx 9.2 .
-Myltibyte character support was added in
+Multibyte character support was added in
 .Nx 7.0
 and
 .Fx 9.2 .

Modified: head/contrib/libc-vis/vis.c
==
--- head/contrib/libc-vis/vis.c Wed Jun  8 18:21:25 2016(r301678)
+++ head/contrib/libc-vis/vis.c Wed Jun  8 18:21:27 2016(r301679)
@@ -1,4 +1,4 @@
-/* $NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $*/
+/* $NetBSD: vis.c,v 1.71 2016/01/14

svn commit: r301678 - stable/10/tools/tools/ioat

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:21:25 2016
New Revision: 301678
URL: https://svnweb.freebsd.org/changeset/base/301678

Log:
  MFC r300861,r300862:
  
  r300861:
  
  - Sort make variables
  - Use SRCTOP instead of ad hoc definition for it
  
  r300862:
  
  Install ioatcontrol to /usr/bin by default instead of /

Modified:
  stable/10/tools/tools/ioat/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/tools/ioat/Makefile
==
--- stable/10/tools/tools/ioat/Makefile Wed Jun  8 18:19:34 2016
(r301677)
+++ stable/10/tools/tools/ioat/Makefile Wed Jun  8 18:21:25 2016
(r301678)
@@ -2,9 +2,13 @@
 
 PROG=  ioatcontrol
 MAN=   ioatcontrol.8
-CFLAGS+=   -I${.CURDIR:H:H:H}/sys/dev/ioat
-WARNS?=6
+BINDIR?=   /usr/bin
+
+CFLAGS+=   -I${SRCTOP}/sys/dev/ioat
+
 #LIBADD=   util
 LDADD= -lutil
 
+WARNS?=6
+
 .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: r301677 - stable/10/tools/tools/ioat

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:19:34 2016
New Revision: 301677
URL: https://svnweb.freebsd.org/changeset/base/301677

Log:
  MFC r300856,r300857,r300858,r300874:
  
  r300856:
  
  Initialize `t` with memset(.., 0, ..)
  
  This will help ensure that we're not using random garbage on the stack by
  accident with respect to the variable
  
  r300857:
  
  Document the default behavior for -c (0)
  
  Bump .Dd for the change
  
  r300858:
  
  Fix description for -V in the -r case
  
  t.verify_test = true is always set when -V is specified, regardless of whether
  or not the tool is being run in raw mode
  
  r300874:
  
  Update usage(..)
  
  - Document missing options
  - Sync options with ioatcontrol(8).
  - Make it clear that the first 2 parameters are always required.

Modified:
  stable/10/tools/tools/ioat/ioatcontrol.8
  stable/10/tools/tools/ioat/ioatcontrol.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/tools/ioat/ioatcontrol.8
==
--- stable/10/tools/tools/ioat/ioatcontrol.8Wed Jun  8 18:16:34 2016
(r301676)
+++ stable/10/tools/tools/ioat/ioatcontrol.8Wed Jun  8 18:19:34 2016
(r301677)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 14, 2015
+.Dd May 27, 2016
 .Dt IOATCONTROL 8
 .Os
 .Sh NAME
@@ -62,7 +62,8 @@ driver on a specific hardware channel.
 The arguments are as follows:
 .Bl -tag -width Ds
 .It Fl c Ar period
-Configure the channel's interrupt coalescing period, in microseconds.
+Configure the channel's interrupt coalescing period, in microseconds
+(defaults to 0).
 .It Fl E
 Test non-contiguous 8k copy.
 .It Fl f
@@ -92,7 +93,7 @@ is a kernel virtual address (by default,
 .Ar address
 is assumed to be a physical address)
 .It Fl V
-Dump the resulting hex to syslog
+Verify copies/fills for accuracy
 .It Fl w
 Write to the specified
 .Ar address

Modified: stable/10/tools/tools/ioat/ioatcontrol.c
==
--- stable/10/tools/tools/ioat/ioatcontrol.cWed Jun  8 18:16:34 2016
(r301676)
+++ stable/10/tools/tools/ioat/ioatcontrol.cWed Jun  8 18:19:34 2016
(r301677)
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -48,14 +49,19 @@ static void
 usage(void)
 {
 
-   printf("Usage: %s [-E|-f|-m] OPTIONS   [ "
+   printf("Usage: %s [-c period] [-EfmVz] channel-number num-txns 
[ "
"[ [duration]]]\n", getprogname());
-   printf("   %s -r [-v] OPTIONS   []\n\n",
+   printf("   %s -r [-c period] [-vVwz] channel-number address 
[]\n\n",
getprogname());
-   printf("   OPTIONS:\n");
-   printf("   -c  - Enable interrupt coalescing (us)\n");
-   printf("   -V  - Enable verification\n");
-   printf("   -z  - Zero device stats before test\n");
+   printf("   -c period - Enable interrupt coalescing (us) 
(default: 0)\n");
+   printf("   -E- Test non-contiguous 8k copy.\n");
+   printf("   -f- Test block fill (default: DMA copy).\n");
+   printf("   -m- Test memcpy instead of DMA.\n");
+   printf("   -r- Issue DMA to or from a specific 
address.\n");
+   printf("   -V- Enable verification\n");
+   printf("   -v-  is a kernel virtual 
address\n");
+   printf("   -w- Write to the specified address\n");
+   printf("   -z- Zero device stats before test\n");
exit(EX_USAGE);
 }
 
@@ -104,6 +110,8 @@ main(int argc, char **argv)
bool fflag, rflag, Eflag, mflag;
unsigned modeflags;
 
+   memset(&t, 0, sizeof(t));
+
fflag = rflag = Eflag = mflag = false;
modeflags = 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: r301676 - stable/9/contrib/top

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:16:34 2016
New Revision: 301676
URL: https://svnweb.freebsd.org/changeset/base/301676

Log:
  MFstable/10 r301675:
  
  MFC r300714:
  
  The readme provides a high-level overview of how to upgrade top(1).
  
  Reviewed By: ngie

Added:
  stable/9/contrib/top/FREEBSD-upgrade
 - copied unchanged from r301675, stable/10/contrib/top/FREEBSD-upgrade
Modified:
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/top/   (props changed)

Copied: stable/9/contrib/top/FREEBSD-upgrade (from r301675, 
stable/10/contrib/top/FREEBSD-upgrade)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/contrib/top/FREEBSD-upgradeWed Jun  8 18:16:34 2016
(r301676, copy of r301675, stable/10/contrib/top/FREEBSD-upgrade)
@@ -0,0 +1,22 @@
+$FreeBSD$
+
+This file contains notes regarding the upgrade of top(1).  See the vendor
+import instructions at:
+
+   
https://www.freebsd.org/doc/en/articles/committers-guide/subversion-primer.html#svn-advanced-use-vendor-imports
+
+The upstream project pages for top(1) are:
+
+   http://www.unixtop.org/
+
+   https://sourceforge.net/projects/unixtop/
+
+contrib/top/machine.h specifies an interface that must be provided by the
+target OS.  That interface is implemented in usr.bin/top/machine.c
+
+To enable building on case-insensitive filesystems, the following files were
+renamed:
+
+   contrib/top/top.X   -> contrib/top/top.xs
+   contrib/top/top.local.H -> contrib/top/top.local.hs
+
___
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: r301675 - stable/10/contrib/top

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:15:51 2016
New Revision: 301675
URL: https://svnweb.freebsd.org/changeset/base/301675

Log:
  MFC r300714:
  
  The readme provides a high-level overview of how to upgrade top(1).
  
  Reviewed By: ngie

Added:
  stable/10/contrib/top/FREEBSD-upgrade
 - copied unchanged from r300714, head/contrib/top/FREEBSD-upgrade
Modified:
Directory Properties:
  stable/10/   (props changed)

Copied: stable/10/contrib/top/FREEBSD-upgrade (from r300714, 
head/contrib/top/FREEBSD-upgrade)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/contrib/top/FREEBSD-upgrade   Wed Jun  8 18:15:51 2016
(r301675, copy of r300714, head/contrib/top/FREEBSD-upgrade)
@@ -0,0 +1,22 @@
+$FreeBSD$
+
+This file contains notes regarding the upgrade of top(1).  See the vendor
+import instructions at:
+
+   
https://www.freebsd.org/doc/en/articles/committers-guide/subversion-primer.html#svn-advanced-use-vendor-imports
+
+The upstream project pages for top(1) are:
+
+   http://www.unixtop.org/
+
+   https://sourceforge.net/projects/unixtop/
+
+contrib/top/machine.h specifies an interface that must be provided by the
+target OS.  That interface is implemented in usr.bin/top/machine.c
+
+To enable building on case-insensitive filesystems, the following files were
+renamed:
+
+   contrib/top/top.X   -> contrib/top/top.xs
+   contrib/top/top.local.H -> contrib/top/top.local.hs
+
___
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: r301674 - stable/9/lib/libbsnmp

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:15:13 2016
New Revision: 301674
URL: https://svnweb.freebsd.org/changeset/base/301674

Log:
  MFstable/10 r301673:
  
  MFC r299699:
  
  Remove NO_WERROR from libbsnmp/Makefile.inc
  
  This has been compiling without warnings with clang/gcc for a while now
  
  Tested with: clang 3.8.0, gcc 4.2.x, gcc 5.x

Modified:
  stable/9/lib/libbsnmp/Makefile.inc
Directory Properties:
  stable/9/   (props changed)
  stable/9/lib/   (props changed)

Modified: stable/9/lib/libbsnmp/Makefile.inc
==
--- stable/9/lib/libbsnmp/Makefile.inc  Wed Jun  8 18:14:06 2016
(r301673)
+++ stable/9/lib/libbsnmp/Makefile.inc  Wed Jun  8 18:15:13 2016
(r301674)
@@ -1,6 +1,5 @@
 # $FreeBSD$
 
-NO_WERROR=
 INCSDIR=   ${INCLUDEDIR}/bsnmp
 
 .include "../Makefile.inc"
___
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: r301673 - stable/10/lib/libbsnmp

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:14:06 2016
New Revision: 301673
URL: https://svnweb.freebsd.org/changeset/base/301673

Log:
  MFC r299699:
  
  Remove NO_WERROR from libbsnmp/Makefile.inc
  
  This has been compiling without warnings with clang/gcc for a while now
  
  Tested with: clang 3.8.0, gcc 4.2.x, gcc 5.x

Modified:
  stable/10/lib/libbsnmp/Makefile.inc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libbsnmp/Makefile.inc
==
--- stable/10/lib/libbsnmp/Makefile.inc Wed Jun  8 18:09:40 2016
(r301672)
+++ stable/10/lib/libbsnmp/Makefile.inc Wed Jun  8 18:14:06 2016
(r301673)
@@ -1,6 +1,5 @@
 # $FreeBSD$
 
-NO_WERROR=
 INCSDIR=   ${INCLUDEDIR}/bsnmp
 
 .include "../Makefile.inc"
___
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: r301672 - stable/9/usr.sbin/bsnmpd/modules/snmp_mibII

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:09:40 2016
New Revision: 301672
URL: https://svnweb.freebsd.org/changeset/base/301672

Log:
  MFstable/10 r301671:
  
  MFC r299815:
  
  Remove NO_WERROR.clang from this Makefile
  
  This compiles with clang without warnings

Modified:
  stable/9/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)
  stable/9/usr.sbin/bsnmpd/   (props changed)

Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile
==
--- stable/9/usr.sbin/bsnmpd/modules/snmp_mibII/MakefileWed Jun  8 
18:08:06 2016(r301671)
+++ stable/9/usr.sbin/bsnmpd/modules/snmp_mibII/MakefileWed Jun  8 
18:09:40 2016(r301672)
@@ -15,8 +15,6 @@ MAN=  snmp_mibII.3
 
 CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd
 CFLAGS+= -DHAVE_ERR_H -DHAVE_GETADDRINFO -DHAVE_STRLCPY -DHAVE_SYS_TREE_H
-# XXX Work around clang warning, until maintainer approves fix.
-NO_WERROR.clang=
 
 DEFS=  ${MOD}_tree.def
 INCS=  snmp_${MOD}.h
___
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: r301671 - stable/10/usr.sbin/bsnmpd/modules/snmp_mibII

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:08:06 2016
New Revision: 301671
URL: https://svnweb.freebsd.org/changeset/base/301671

Log:
  MFC r299815:
  
  Remove NO_WERROR.clang from this Makefile
  
  This compiles with clang without warnings

Modified:
  stable/10/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile
==
--- stable/10/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile   Wed Jun  8 
18:07:51 2016(r301670)
+++ stable/10/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile   Wed Jun  8 
18:08:06 2016(r301671)
@@ -15,8 +15,6 @@ MAN=  snmp_mibII.3
 
 CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd
 CFLAGS+= -DHAVE_ERR_H -DHAVE_GETADDRINFO -DHAVE_STRLCPY -DHAVE_SYS_TREE_H
-# XXX Work around clang warning, until maintainer approves fix.
-NO_WERROR.clang=
 
 DEFS=  ${MOD}_tree.def
 INCS=  snmp_${MOD}.h
___
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: r301670 - stable/9/usr.sbin/bsnmpd/tools

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:07:51 2016
New Revision: 301670
URL: https://svnweb.freebsd.org/changeset/base/301670

Log:
  MFstable/10 r301669:
  
  MFC r299806:
  
  Bump WARNS to 6

Modified:
  stable/9/usr.sbin/bsnmpd/tools/Makefile.inc
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)
  stable/9/usr.sbin/bsnmpd/   (props changed)

Modified: stable/9/usr.sbin/bsnmpd/tools/Makefile.inc
==
--- stable/9/usr.sbin/bsnmpd/tools/Makefile.inc Wed Jun  8 18:05:52 2016
(r301669)
+++ stable/9/usr.sbin/bsnmpd/tools/Makefile.inc Wed Jun  8 18:07:51 2016
(r301670)
@@ -11,3 +11,5 @@ LIBBSNMPTOOLSDIR=  ${.OBJDIR}/../lib
 LIBBSNMPTOOLSDIR=  ${.CURDIR}/../libbsnmptools
 .endif
 LIBBSNMPTOOLS= ${LIBBSNMPTOOLSDIR}/libbsnmptools.a
+
+WARNS?=6
___
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: r301669 - stable/10/usr.sbin/bsnmpd/tools

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:05:52 2016
New Revision: 301669
URL: https://svnweb.freebsd.org/changeset/base/301669

Log:
  MFC r299806:
  
  Bump WARNS to 6

Modified:
  stable/10/usr.sbin/bsnmpd/tools/Makefile.inc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bsnmpd/tools/Makefile.inc
==
--- stable/10/usr.sbin/bsnmpd/tools/Makefile.incWed Jun  8 18:00:07 
2016(r301668)
+++ stable/10/usr.sbin/bsnmpd/tools/Makefile.incWed Jun  8 18:05:52 
2016(r301669)
@@ -11,3 +11,5 @@ LIBBSNMPTOOLSDIR=  ${.OBJDIR}/../lib
 LIBBSNMPTOOLSDIR=  ${.CURDIR}/../libbsnmptools
 .endif
 LIBBSNMPTOOLS= ${LIBBSNMPTOOLSDIR}/libbsnmptools.a
+
+WARNS?=6
___
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: r301668 - stable/9/contrib/bsnmp/snmpd

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 18:00:07 2016
New Revision: 301668
URL: https://svnweb.freebsd.org/changeset/base/301668

Log:
  MFstable/10 r301667:
  
  MFC r299834:
  
  Fix .Dd
  
  Today is the 14th, not the 10th of May

Modified:
  stable/9/contrib/bsnmp/snmpd/bsnmpd.1
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/bsnmp/   (props changed)

Modified: stable/9/contrib/bsnmp/snmpd/bsnmpd.1
==
--- stable/9/contrib/bsnmp/snmpd/bsnmpd.1   Wed Jun  8 17:59:21 2016
(r301667)
+++ stable/9/contrib/bsnmp/snmpd/bsnmpd.1   Wed Jun  8 18:00:07 2016
(r301668)
@@ -31,7 +31,7 @@
 .\"
 .\" $Begemot: bsnmp/snmpd/bsnmpd.1,v 1.12 2006/02/27 09:50:03 brandt_h Exp $
 .\"
-.Dd May 10, 2016
+.Dd May 14, 2016
 .Dt BSNMPD 1
 .Os
 .Sh NAME
___
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: r301667 - stable/10/contrib/bsnmp/snmpd

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:59:21 2016
New Revision: 301667
URL: https://svnweb.freebsd.org/changeset/base/301667

Log:
  MFC r299834:
  
  Fix .Dd
  
  Today is the 14th, not the 10th of May

Modified:
  stable/10/contrib/bsnmp/snmpd/bsnmpd.1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/bsnmp/snmpd/bsnmpd.1
==
--- stable/10/contrib/bsnmp/snmpd/bsnmpd.1  Wed Jun  8 17:57:42 2016
(r301666)
+++ stable/10/contrib/bsnmp/snmpd/bsnmpd.1  Wed Jun  8 17:59:21 2016
(r301667)
@@ -31,7 +31,7 @@
 .\"
 .\" $Begemot: bsnmp/snmpd/bsnmpd.1,v 1.12 2006/02/27 09:50:03 brandt_h Exp $
 .\"
-.Dd May 10, 2016
+.Dd May 14, 2016
 .Dt BSNMPD 1
 .Os
 .Sh NAME
___
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: r301666 - head/sys/netinet

2016-06-08 Thread Michael Tuexen
Author: tuexen
Date: Wed Jun  8 17:57:42 2016
New Revision: 301666
URL: https://svnweb.freebsd.org/changeset/base/301666

Log:
  Use a separate MID counter for  ordered und unordered messages for each
  outgoing stream.
  
  Thanks to Jens Hoelscher for reporting the issue.
  
  MFC after: 1 week

Modified:
  head/sys/netinet/sctp_input.c
  head/sys/netinet/sctp_output.c
  head/sys/netinet/sctp_structs.h
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctp_input.c
==
--- head/sys/netinet/sctp_input.c   Wed Jun  8 17:51:21 2016
(r301665)
+++ head/sys/netinet/sctp_input.c   Wed Jun  8 17:57:42 2016
(r301666)
@@ -1969,7 +1969,8 @@ sctp_process_cookie_existing(struct mbuf
asoc->strmout[i].abandoned_unsent[0] = 0;
 #endif
stcb->asoc.strmout[i].stream_no = i;
-   stcb->asoc.strmout[i].next_sequence_send = 0;
+   stcb->asoc.strmout[i].next_mid_ordered = 0;
+   stcb->asoc.strmout[i].next_mid_unordered = 0;
stcb->asoc.strmout[i].last_msg_incomplete = 0;
}
/* process the INIT-ACK info (my info) */
@@ -3521,11 +3522,13 @@ sctp_reset_out_streams(struct sctp_tcb *
/* no such stream */
continue;
}
-   stcb->asoc.strmout[temp].next_sequence_send = 0;
+   stcb->asoc.strmout[temp].next_mid_ordered = 0;
+   stcb->asoc.strmout[temp].next_mid_unordered = 0;
}
} else {
for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
-   stcb->asoc.strmout[i].next_sequence_send = 0;
+   stcb->asoc.strmout[i].next_mid_ordered = 0;
+   stcb->asoc.strmout[i].next_mid_unordered = 0;
}
}
sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_SEND, stcb, number_entries, (void 
*)list, SCTP_SO_NOT_LOCKED);

Modified: head/sys/netinet/sctp_output.c
==
--- head/sys/netinet/sctp_output.c  Wed Jun  8 17:51:21 2016
(r301665)
+++ head/sys/netinet/sctp_output.c  Wed Jun  8 17:57:42 2016
(r301666)
@@ -3643,7 +3643,8 @@ sctp_process_cmsgs_for_init(struct sctp_
for (i = 0; i < 
stcb->asoc.streamoutcnt; i++) {

TAILQ_INIT(&stcb->asoc.strmout[i].outqueue);

stcb->asoc.strmout[i].chunks_on_queues = 0;
-   
stcb->asoc.strmout[i].next_sequence_send = 0;
+   
stcb->asoc.strmout[i].next_mid_ordered = 0;
+   
stcb->asoc.strmout[i].next_mid_unordered = 0;
 #if defined(SCTP_DETAILED_STR_STATS)
for (j = 0; j < 
SCTP_PR_SCTP_MAX + 1; j++) {

stcb->asoc.strmout[i].abandoned_sent[j] = 0;
@@ -6381,7 +6382,6 @@ sctp_msg_append(struct sctp_tcb *stcb,
sp->ppid = srcv->sinfo_ppid;
sp->context = srcv->sinfo_context;
sp->fsn = 0;
-   sp->msg_id = atomic_fetchadd_int(&stcb->asoc.assoc_msg_id, 1);
if (sp->sinfo_flags & SCTP_ADDR_OVER) {
sp->net = net;
atomic_add_int(&sp->net->ref_count, 1);
@@ -7568,10 +7568,28 @@ dont_do_it:
chk->asoc = &stcb->asoc;
chk->pad_inplace = 0;
chk->no_fr_allowed = 0;
-   chk->rec.data.stream_seq = strq->next_sequence_send;
-   if ((rcv_flags & SCTP_DATA_LAST_FRAG) &&
-   !(rcv_flags & SCTP_DATA_UNORDERED)) {
-   strq->next_sequence_send++;
+   if (stcb->asoc.idata_supported == 0) {
+   if (rcv_flags & SCTP_DATA_UNORDERED) {
+   /* Just use 0. The receiver ignores the values. */
+   chk->rec.data.stream_seq = 0;
+   } else {
+   chk->rec.data.stream_seq = strq->next_mid_ordered;
+   if (rcv_flags & SCTP_DATA_LAST_FRAG) {
+   strq->next_mid_ordered++;
+   }
+   }
+   } else {
+   if (rcv_flags & SCTP_DATA_UNORDERED) {
+   chk->rec.data.stream_seq = strq->next_mid_unordered;
+   if (rcv_flags & SCTP_DATA_LAST_FRAG) {
+   strq->next_mid_unordered++;
+   }
+   } else {
+   chk->rec.data.stream_seq = strq->next_mid_ordered;
+   if (rcv_flags & SCTP_DATA_LAST_FRAG) {
+   strq->next_mid_ordered++;
+

svn commit: r301665 - in head: contrib/bmake usr.bin/bmake

2016-06-08 Thread Simon J. Gerraty
Author: sjg
Date: Wed Jun  8 17:51:21 2016
New Revision: 301665
URL: https://svnweb.freebsd.org/changeset/base/301665

Log:
  Merge bmake-20160606
  
  o dir.c: extend mtimes cache to others via cached_stat()

Modified:
  head/contrib/bmake/ChangeLog
  head/contrib/bmake/Makefile
  head/contrib/bmake/README
  head/contrib/bmake/config.h.in
  head/contrib/bmake/configure
  head/contrib/bmake/configure.in
  head/contrib/bmake/dir.c
  head/contrib/bmake/hash.h
  head/contrib/bmake/main.c
  head/contrib/bmake/make.h
  head/contrib/bmake/meta.c
  head/usr.bin/bmake/Makefile
  head/usr.bin/bmake/config.h
Directory Properties:
  head/contrib/bmake/   (props changed)

Modified: head/contrib/bmake/ChangeLog
==
--- head/contrib/bmake/ChangeLogWed Jun  8 17:50:51 2016
(r301664)
+++ head/contrib/bmake/ChangeLogWed Jun  8 17:51:21 2016
(r301665)
@@ -1,3 +1,9 @@
+2016-06-06  Simon J. Gerraty  
+
+   * Makefile (_MAKE_VERSION): 20160606
+ Merge with NetBSD make, pick up
+ o dir.c: extend mtimes cache to others via cached_stat()
+
 2016-06-04  Simon J. Gerraty  
 
* Makefile (_MAKE_VERSION): 20160604

Modified: head/contrib/bmake/Makefile
==
--- head/contrib/bmake/Makefile Wed Jun  8 17:50:51 2016(r301664)
+++ head/contrib/bmake/Makefile Wed Jun  8 17:51:21 2016(r301665)
@@ -1,7 +1,7 @@
-#  $Id: Makefile,v 1.66 2016/06/04 22:21:15 sjg Exp $
+#  $Id: Makefile,v 1.67 2016/06/07 00:46:12 sjg Exp $
 
 # Base version on src date
-_MAKE_VERSION= 20160604
+_MAKE_VERSION= 20160606
 
 PROG=  bmake
 

Modified: head/contrib/bmake/README
==
--- head/contrib/bmake/README   Wed Jun  8 17:50:51 2016(r301664)
+++ head/contrib/bmake/README   Wed Jun  8 17:51:21 2016(r301665)
@@ -1,47 +1,52 @@
   bmake
+  *
 
-This directory contains a port of the BSD make tool (from NetBSD)
-I have run it on SunOS,Solaris,HP-UX,AIX,IRIX,FreeBSD and Linux.
+This directory contains a port of the BSD make tool (from NetBSD).
+Since 1993 I have run it on AIX, BSDi, Darwin, FreeBSD, HP-UX, IRIX,
+Linux, Minix, OSF, Solaris, SunOS and even UTS.
+Others have run it on many more systems.
 
-Version 3 was re-worked from scratch to better facilitate
-importing newer make(1) versions from NetBSD.  The original code base
-was NetBSD-1.0, so version 3 was built by doing a fresh import of the
-NetBSD-1.0 usr.bin/make, adding the autoconf and other portability
-patches to sync it with bmake v2, and then NetBSD's make 
-of Feb 20, 2000 was imported and conflicts dealt with.
-NetBSD's make was again imported on June 6 and December 15, 2000.
+Currently each release is tested on NetBSD, FreeBSD, Solaris and Linux.
 
-In 2003 bmake switched to a date based version (first was 20030714)
+Since 2003 bmake switched to a date based version (first was 20030714)
 which generally represents the date it was last merged with NetBSD's
 make.  Since then, NetBSD's make is imported within a week of any
 interesting changes, so that bmake tracks it very closely.
 
-Building:
+Building
+
 
-The preferred way to bootstrap bmake is:
+The preferred way to bootstrap bmake is::
 
-./bmake/boot-strap
+   ./bmake/boot-strap
 
 there are a number of args - most of which get passed to configure,
 eg.
+::
 
-./bmake/boot-strap --prefix=/opt
+   ./bmake/boot-strap --prefix=/opt
 
 see the boot-strap script for details.
 
+For folk that hate to read anything, since 20121212 you can also use
+the GNU standard process of::
+
+   ./configure; make; make install
+
 To make much use of bmake you will need the bsd.*.mk macros or my
-portable *.mk macros.  See 
+portable *.mk macros which are included with bmake since 20121212
+and separately available from
 http://www.crufty.net/ftp/pub/sjg/mk.tar.gz
 which will be links to the latest versions.
 
-On a non-BSD system, you would want to unpack mk[-mmdd].tar.gz in
-the same directory as bmake (so ./mk and ./bmake exist), and
-./bmake/boot-strap will do the rest.
+Porting
+===
+
+If you encounter a system that bmake does not build or work on *out of
+the box*, I welcome patches.
+If you can provide access to a suitable machine - even better.
 
-If you want to do it all by hand then read boot-strap first to get the
-idea.
+More info can be found at http://www.crufty.net/help/sjg/bmake.htm
 
-Even if you have an earlier version of bmake installed, use boot-strap
-to ensure that all goes well.
+--sjg 
 
---sjg

Modified: head/contrib/bmake/config.h.in
==
--- head/contrib/bmake/config.h.in  Wed Jun  8 17:50:51 2016
(r301664)
+++ head/contrib/bmake/config.h.in  Wed 

svn commit: r301664 - in stable/9/contrib/bsnmp: snmp_mibII snmpd

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:50:51 2016
New Revision: 301664
URL: https://svnweb.freebsd.org/changeset/base/301664

Log:
  MFstable/10 r301663:
  
  MFC r294507,r294567,r299466:
  
  r294507 (by harti):
  
  Fill the ifAlias leaf of the ifXTable with the interface description
  if there is one available and it fits into the maximum size (64 characters).
  
  r294567 (by bz):
  
  Change the variable to a #define in order to make gcc happy which
  otherwise will complain about "variably modified 'alias' at file scope".
  Unbreaks the build on gcc platforms.
  
  r299466 (by cem):
  
  bsnmpd: Fix size of trapsink::comm to match other community arrays
  
  This fixes a number of possible strcpy() buffer overruns between the various
  community strings in trap.c.
  
  CIDs: 1006820, 1006821, 1006822

Modified:
  stable/9/contrib/bsnmp/snmp_mibII/mibII.c
  stable/9/contrib/bsnmp/snmp_mibII/mibII.h
  stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
  stable/9/contrib/bsnmp/snmpd/snmpd.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/bsnmp/   (props changed)
  stable/9/contrib/bsnmp/snmp_mibII/   (props changed)

Modified: stable/9/contrib/bsnmp/snmp_mibII/mibII.c
==
--- stable/9/contrib/bsnmp/snmp_mibII/mibII.c   Wed Jun  8 17:49:03 2016
(r301663)
+++ stable/9/contrib/bsnmp/snmp_mibII/mibII.c   Wed Jun  8 17:50:51 2016
(r301664)
@@ -443,6 +443,7 @@ mib_fetch_ifmib(struct mibif *ifp)
size_t len;
void *newmib;
struct ifmibdata oldmib = ifp->mib;
+   struct ifreq irr;
 
if (fetch_generic_mib(ifp, &oldmib) == -1)
return (-1);
@@ -514,6 +515,18 @@ mib_fetch_ifmib(struct mibif *ifp)
}
 
   out:
+   strncpy(irr.ifr_name, ifp->name, sizeof(irr.ifr_name));
+   irr.ifr_buffer.buffer = MIBIF_PRIV(ifp)->alias;
+   irr.ifr_buffer.length = sizeof(MIBIF_PRIV(ifp)->alias);
+   if (ioctl(mib_netsock, SIOCGIFDESCR, &irr) == -1) {
+   MIBIF_PRIV(ifp)->alias[0] = 0;
+   if (errno != ENOMSG)
+   syslog(LOG_WARNING, "SIOCGIFDESCR (%s): %m", ifp->name);
+   } else if (irr.ifr_buffer.buffer == NULL) {
+   MIBIF_PRIV(ifp)->alias[0] = 0;
+   syslog(LOG_WARNING, "SIOCGIFDESCR (%s): too long (%zu)",
+   ifp->name, irr.ifr_buffer.length);
+   }
ifp->mibtick = get_ticks();
return (0);
 }

Modified: stable/9/contrib/bsnmp/snmp_mibII/mibII.h
==
--- stable/9/contrib/bsnmp/snmp_mibII/mibII.h   Wed Jun  8 17:49:03 2016
(r301663)
+++ stable/9/contrib/bsnmp/snmp_mibII/mibII.h   Wed Jun  8 17:50:51 2016
(r301664)
@@ -56,6 +56,9 @@
 #include "snmp_mibII.h"
 #include "mibII_tree.h"
 
+/* maximum size of the interface alias */
+#defineMIBIF_ALIAS_SIZE(64 + 1)
+
 /*
  * Interface list and flags.
  */
@@ -76,6 +79,9 @@ struct mibif_private {
uint64_thc_opackets;
uint64_thc_imcasts;
uint64_thc_ipackets;
+
+   /* this should be made public */
+   charalias[MIBIF_ALIAS_SIZE];
 };
 #defineMIBIF_PRIV(IFP) ((struct mibif_private *)((IFP)->private))
 

Modified: stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
==
--- stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.cWed Jun  8 
17:49:03 2016(r301663)
+++ stable/9/contrib/bsnmp/snmp_mibII/mibII_interfaces.cWed Jun  8 
17:50:51 2016(r301664)
@@ -528,7 +528,7 @@ op_ifxtable(struct snmp_context *ctx, st
break;
 
  case LEAF_ifAlias:
-   ret = string_get(value, "", -1);
+   ret = string_get(value, MIBIF_PRIV(ifp)->alias, -1);
break;
 
  case LEAF_ifCounterDiscontinuityTime:

Modified: stable/9/contrib/bsnmp/snmpd/snmpd.h
==
--- stable/9/contrib/bsnmp/snmpd/snmpd.hWed Jun  8 17:49:03 2016
(r301663)
+++ stable/9/contrib/bsnmp/snmpd/snmpd.hWed Jun  8 17:50:51 2016
(r301664)
@@ -307,7 +307,7 @@ struct trapsink {
struct asn_oid  index;
u_int   status;
int socket;
-   u_char  comm[SNMP_COMMUNITY_MAXLEN];
+   u_char  comm[SNMP_COMMUNITY_MAXLEN + 1];
int version;
 };
 enum {
___
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: r301663 - in stable/10/contrib/bsnmp: snmp_mibII snmpd

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:49:03 2016
New Revision: 301663
URL: https://svnweb.freebsd.org/changeset/base/301663

Log:
  MFC r294507,r294567,r299466:
  
  r294507 (by harti):
  
  Fill the ifAlias leaf of the ifXTable with the interface description
  if there is one available and it fits into the maximum size (64 characters).
  
  r294567 (by bz):
  
  Change the variable to a #define in order to make gcc happy which
  otherwise will complain about "variably modified 'alias' at file scope".
  Unbreaks the build on gcc platforms.
  
  r299466 (by cem):
  
  bsnmpd: Fix size of trapsink::comm to match other community arrays
  
  This fixes a number of possible strcpy() buffer overruns between the various
  community strings in trap.c.
  
  CIDs: 1006820, 1006821, 1006822

Modified:
  stable/10/contrib/bsnmp/snmp_mibII/mibII.c
  stable/10/contrib/bsnmp/snmp_mibII/mibII.h
  stable/10/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
  stable/10/contrib/bsnmp/snmpd/snmpd.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/bsnmp/snmp_mibII/mibII.c
==
--- stable/10/contrib/bsnmp/snmp_mibII/mibII.c  Wed Jun  8 17:44:22 2016
(r301662)
+++ stable/10/contrib/bsnmp/snmp_mibII/mibII.c  Wed Jun  8 17:49:03 2016
(r301663)
@@ -443,6 +443,7 @@ mib_fetch_ifmib(struct mibif *ifp)
size_t len;
void *newmib;
struct ifmibdata oldmib = ifp->mib;
+   struct ifreq irr;
 
if (fetch_generic_mib(ifp, &oldmib) == -1)
return (-1);
@@ -514,6 +515,18 @@ mib_fetch_ifmib(struct mibif *ifp)
}
 
   out:
+   strncpy(irr.ifr_name, ifp->name, sizeof(irr.ifr_name));
+   irr.ifr_buffer.buffer = MIBIF_PRIV(ifp)->alias;
+   irr.ifr_buffer.length = sizeof(MIBIF_PRIV(ifp)->alias);
+   if (ioctl(mib_netsock, SIOCGIFDESCR, &irr) == -1) {
+   MIBIF_PRIV(ifp)->alias[0] = 0;
+   if (errno != ENOMSG)
+   syslog(LOG_WARNING, "SIOCGIFDESCR (%s): %m", ifp->name);
+   } else if (irr.ifr_buffer.buffer == NULL) {
+   MIBIF_PRIV(ifp)->alias[0] = 0;
+   syslog(LOG_WARNING, "SIOCGIFDESCR (%s): too long (%zu)",
+   ifp->name, irr.ifr_buffer.length);
+   }
ifp->mibtick = get_ticks();
return (0);
 }

Modified: stable/10/contrib/bsnmp/snmp_mibII/mibII.h
==
--- stable/10/contrib/bsnmp/snmp_mibII/mibII.h  Wed Jun  8 17:44:22 2016
(r301662)
+++ stable/10/contrib/bsnmp/snmp_mibII/mibII.h  Wed Jun  8 17:49:03 2016
(r301663)
@@ -57,6 +57,9 @@
 #include "snmp_mibII.h"
 #include "mibII_tree.h"
 
+/* maximum size of the interface alias */
+#defineMIBIF_ALIAS_SIZE(64 + 1)
+
 /*
  * Interface list and flags.
  */
@@ -77,6 +80,9 @@ struct mibif_private {
uint64_thc_opackets;
uint64_thc_imcasts;
uint64_thc_ipackets;
+
+   /* this should be made public */
+   charalias[MIBIF_ALIAS_SIZE];
 };
 #defineMIBIF_PRIV(IFP) ((struct mibif_private *)((IFP)->private))
 

Modified: stable/10/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
==
--- stable/10/contrib/bsnmp/snmp_mibII/mibII_interfaces.c   Wed Jun  8 
17:44:22 2016(r301662)
+++ stable/10/contrib/bsnmp/snmp_mibII/mibII_interfaces.c   Wed Jun  8 
17:49:03 2016(r301663)
@@ -528,7 +528,7 @@ op_ifxtable(struct snmp_context *ctx, st
break;
 
  case LEAF_ifAlias:
-   ret = string_get(value, "", -1);
+   ret = string_get(value, MIBIF_PRIV(ifp)->alias, -1);
break;
 
  case LEAF_ifCounterDiscontinuityTime:

Modified: stable/10/contrib/bsnmp/snmpd/snmpd.h
==
--- stable/10/contrib/bsnmp/snmpd/snmpd.h   Wed Jun  8 17:44:22 2016
(r301662)
+++ stable/10/contrib/bsnmp/snmpd/snmpd.h   Wed Jun  8 17:49:03 2016
(r301663)
@@ -307,7 +307,7 @@ struct trapsink {
struct asn_oid  index;
u_int   status;
int socket;
-   u_char  comm[SNMP_COMMUNITY_MAXLEN];
+   u_char  comm[SNMP_COMMUNITY_MAXLEN + 1];
int version;
 };
 enum {
___
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: r301662 - in stable/9/contrib/bsnmp: lib snmp_mibII snmp_target

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:44:22 2016
New Revision: 301662
URL: https://svnweb.freebsd.org/changeset/base/301662

Log:
  MFstable/10 r301661:
  
  MFC r256678,r256680,r260986,r272878,r286402:
  
  r256678 (by syrinx):
  
  Fix SNMP Error response PDUs and properly encode them when using v3 
auth/encryption.
  
  r256680 (by syrinx):
  
  Fix the -Wconversion warnings produced when compiling the SNMP agent.
  
  r260986 (by harti):
  
  Fix a problem with OBJECT IDENTIFIER encoding: need to check the
  second subid to be less than 40, not the first when the first
  subid is 0 or 1.
  
  r272878 (by syrinx):
  
  Fix a bug in decoding string indexes in snmp_target(3), thus causing
  bsnmpd(1) to not send v3 notifications properly; while here add two
  missing return statements which could lead to abort() in case of a
  rollback
  
  r286402 (by araujo):
  
  Fix variable 'old' is used uninitialized whenever '&&' condition is false.
  Spotted by clang.

Modified:
  stable/9/contrib/bsnmp/lib/asn1.c
  stable/9/contrib/bsnmp/lib/snmp.c
  stable/9/contrib/bsnmp/lib/snmp.h
  stable/9/contrib/bsnmp/lib/snmpagent.c
  stable/9/contrib/bsnmp/snmp_mibII/mibII_ip.c
  stable/9/contrib/bsnmp/snmp_target/target_snmp.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/bsnmp/   (props changed)
  stable/9/contrib/bsnmp/snmp_mibII/   (props changed)

Modified: stable/9/contrib/bsnmp/lib/asn1.c
==
--- stable/9/contrib/bsnmp/lib/asn1.c   Wed Jun  8 17:43:04 2016
(r301661)
+++ stable/9/contrib/bsnmp/lib/asn1.c   Wed Jun  8 17:44:22 2016
(r301662)
@@ -652,7 +652,7 @@ asn_put_objid(struct asn_buf *b, const s
err = ASN_ERR_RANGE;
}
if (oid->subs[0] > 2 ||
-   (oid->subs[0] < 2 && oid->subs[0] >= 40)) {
+   (oid->subs[0] < 2 && oid->subs[1] >= 40)) {
asn_error(NULL, "oid out of range (%u,%u)",
oid->subs[0], oid->subs[1]);
err = ASN_ERR_RANGE;

Modified: stable/9/contrib/bsnmp/lib/snmp.c
==
--- stable/9/contrib/bsnmp/lib/snmp.c   Wed Jun  8 17:43:04 2016
(r301661)
+++ stable/9/contrib/bsnmp/lib/snmp.c   Wed Jun  8 17:44:22 2016
(r301662)
@@ -288,11 +288,13 @@ parse_secparams(struct asn_buf *b, struc
memset(buf, 0, 256);
tb.asn_ptr = buf;
tb.asn_len = 256;
+   u_int len;
 
-   if (asn_get_octetstring(b, buf, &tb.asn_len) != ASN_ERR_OK) {
+   if (asn_get_octetstring(b, buf, &len) != ASN_ERR_OK) {
snmp_error("cannot parse usm header");
return (ASN_ERR_FAILED);
}
+   tb.asn_len = len;
 
if (asn_get_sequence(&tb, &octs_len) != ASN_ERR_OK) {
snmp_error("cannot decode usm header");
@@ -864,7 +866,7 @@ snmp_fix_encoding(struct asn_buf *b, str
return (SNMP_CODE_FAILED);
 
pdu->scoped_len = b->asn_ptr - pdu->scoped_ptr;
-   if ((code = snmp_pdu_fix_padd(b, pdu))!= ASN_ERR_OK)
+   if (snmp_pdu_fix_padd(b, pdu) != ASN_ERR_OK)
return (SNMP_CODE_FAILED);
 
if (pdu->security_model != SNMP_SECMODEL_USM)
@@ -997,7 +999,7 @@ snmp_pdu_encode(struct snmp_pdu *pdu, st
if ((err = snmp_pdu_encode_header(resp_b, pdu)) != SNMP_CODE_OK)
return (err);
for (idx = 0; idx < pdu->nbindings; idx++)
-   if ((err = snmp_binding_encode(resp_b, &pdu->bindings[idx]))
+   if (snmp_binding_encode(resp_b, &pdu->bindings[idx])
!= ASN_ERR_OK)
return (SNMP_CODE_FAILED);
 

Modified: stable/9/contrib/bsnmp/lib/snmp.h
==
--- stable/9/contrib/bsnmp/lib/snmp.h   Wed Jun  8 17:43:04 2016
(r301661)
+++ stable/9/contrib/bsnmp/lib/snmp.h   Wed Jun  8 17:44:22 2016
(r301662)
@@ -182,7 +182,7 @@ struct snmp_pdu {
 
/* fixes for encoding */
size_t  outer_len;
-   size_t  scoped_len;
+   asn_len_t   scoped_len;
u_char  *outer_ptr;
u_char  *digest_ptr;
u_char  *encrypted_ptr;

Modified: stable/9/contrib/bsnmp/lib/snmpagent.c
==
--- stable/9/contrib/bsnmp/lib/snmpagent.c  Wed Jun  8 17:43:04 2016
(r301661)
+++ stable/9/contrib/bsnmp/lib/snmpagent.c  Wed Jun  8 17:44:22 2016
(r301662)
@@ -166,7 +166,7 @@ find_subnode(const struct snmp_value *va
 }
 
 static void
-snmp_pdu_create_response(struct snmp_pdu *pdu, struct snmp_pdu *resp)
+snmp_pdu_create_response(

svn commit: r301661 - in stable/10/contrib/bsnmp: lib snmp_mibII snmp_target

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:43:04 2016
New Revision: 301661
URL: https://svnweb.freebsd.org/changeset/base/301661

Log:
  MFC r256678,r256680,r260986,r272878,r286402:
  
  r256678 (by syrinx):
  
  Fix SNMP Error response PDUs and properly encode them when using v3 
auth/encryption.
  
  r256680 (by syrinx):
  
  Fix the -Wconversion warnings produced when compiling the SNMP agent.
  
  r260986 (by harti):
  
  Fix a problem with OBJECT IDENTIFIER encoding: need to check the
  second subid to be less than 40, not the first when the first
  subid is 0 or 1.
  
  r272878 (by syrinx):
  
  Fix a bug in decoding string indexes in snmp_target(3), thus causing
  bsnmpd(1) to not send v3 notifications properly; while here add two
  missing return statements which could lead to abort() in case of a
  rollback
  
  r286402 (by araujo):
  
  Fix variable 'old' is used uninitialized whenever '&&' condition is false.
  Spotted by clang.

Modified:
  stable/10/contrib/bsnmp/lib/asn1.c
  stable/10/contrib/bsnmp/lib/snmp.c
  stable/10/contrib/bsnmp/lib/snmp.h
  stable/10/contrib/bsnmp/lib/snmpagent.c
  stable/10/contrib/bsnmp/snmp_mibII/mibII_ip.c
  stable/10/contrib/bsnmp/snmp_target/target_snmp.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/bsnmp/lib/asn1.c
==
--- stable/10/contrib/bsnmp/lib/asn1.c  Wed Jun  8 17:36:01 2016
(r301660)
+++ stable/10/contrib/bsnmp/lib/asn1.c  Wed Jun  8 17:43:04 2016
(r301661)
@@ -652,7 +652,7 @@ asn_put_objid(struct asn_buf *b, const s
err = ASN_ERR_RANGE;
}
if (oid->subs[0] > 2 ||
-   (oid->subs[0] < 2 && oid->subs[0] >= 40)) {
+   (oid->subs[0] < 2 && oid->subs[1] >= 40)) {
asn_error(NULL, "oid out of range (%u,%u)",
oid->subs[0], oid->subs[1]);
err = ASN_ERR_RANGE;

Modified: stable/10/contrib/bsnmp/lib/snmp.c
==
--- stable/10/contrib/bsnmp/lib/snmp.c  Wed Jun  8 17:36:01 2016
(r301660)
+++ stable/10/contrib/bsnmp/lib/snmp.c  Wed Jun  8 17:43:04 2016
(r301661)
@@ -288,11 +288,13 @@ parse_secparams(struct asn_buf *b, struc
memset(buf, 0, 256);
tb.asn_ptr = buf;
tb.asn_len = 256;
+   u_int len;
 
-   if (asn_get_octetstring(b, buf, &tb.asn_len) != ASN_ERR_OK) {
+   if (asn_get_octetstring(b, buf, &len) != ASN_ERR_OK) {
snmp_error("cannot parse usm header");
return (ASN_ERR_FAILED);
}
+   tb.asn_len = len;
 
if (asn_get_sequence(&tb, &octs_len) != ASN_ERR_OK) {
snmp_error("cannot decode usm header");
@@ -864,7 +866,7 @@ snmp_fix_encoding(struct asn_buf *b, str
return (SNMP_CODE_FAILED);
 
pdu->scoped_len = b->asn_ptr - pdu->scoped_ptr;
-   if ((code = snmp_pdu_fix_padd(b, pdu))!= ASN_ERR_OK)
+   if (snmp_pdu_fix_padd(b, pdu) != ASN_ERR_OK)
return (SNMP_CODE_FAILED);
 
if (pdu->security_model != SNMP_SECMODEL_USM)
@@ -997,7 +999,7 @@ snmp_pdu_encode(struct snmp_pdu *pdu, st
if ((err = snmp_pdu_encode_header(resp_b, pdu)) != SNMP_CODE_OK)
return (err);
for (idx = 0; idx < pdu->nbindings; idx++)
-   if ((err = snmp_binding_encode(resp_b, &pdu->bindings[idx]))
+   if (snmp_binding_encode(resp_b, &pdu->bindings[idx])
!= ASN_ERR_OK)
return (SNMP_CODE_FAILED);
 

Modified: stable/10/contrib/bsnmp/lib/snmp.h
==
--- stable/10/contrib/bsnmp/lib/snmp.h  Wed Jun  8 17:36:01 2016
(r301660)
+++ stable/10/contrib/bsnmp/lib/snmp.h  Wed Jun  8 17:43:04 2016
(r301661)
@@ -182,7 +182,7 @@ struct snmp_pdu {
 
/* fixes for encoding */
size_t  outer_len;
-   size_t  scoped_len;
+   asn_len_t   scoped_len;
u_char  *outer_ptr;
u_char  *digest_ptr;
u_char  *encrypted_ptr;

Modified: stable/10/contrib/bsnmp/lib/snmpagent.c
==
--- stable/10/contrib/bsnmp/lib/snmpagent.c Wed Jun  8 17:36:01 2016
(r301660)
+++ stable/10/contrib/bsnmp/lib/snmpagent.c Wed Jun  8 17:43:04 2016
(r301661)
@@ -166,7 +166,7 @@ find_subnode(const struct snmp_value *va
 }
 
 static void
-snmp_pdu_create_response(struct snmp_pdu *pdu, struct snmp_pdu *resp)
+snmp_pdu_create_response(const struct snmp_pdu *pdu, struct snmp_pdu *resp)
 {
memset(resp, 0, sizeof(*resp));
strcpy(resp->community, pdu->community);
@@ -276,7

svn commit: r301659 - stable/9/usr.sbin/bsnmpd/tools/libbsnmptools

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:35:59 2016
New Revision: 301659
URL: https://svnweb.freebsd.org/changeset/base/301659

Log:
  MFstable/10 r301657:
  
  MFC r299701:
  
  Move _bsnmptools_debug extern from bsnmpmap.c to bsnmptools.h
  
  It was used in bsnmpmap.c but was stored in bsnmptools.c; moving the extern
  to the header allows us to cover all of our bases for the variable, and allows
  _bsnmptools_debug to be used in the future elsewhere -- not just bsnmpmap.c.

Modified:
  stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
  stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)
  stable/9/usr.sbin/bsnmpd/   (props changed)

Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
==
--- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c Wed Jun  8 
17:35:13 2016(r301658)
+++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c Wed Jun  8 
17:35:59 2016(r301659)
@@ -47,7 +47,6 @@
 #include "bsnmptc.h"
 #include "bsnmptools.h"
 
-extern int _bsnmptools_debug;
 #defineDEBUG   if (_bsnmptools_debug) fprintf
 
 /* Allocate memory and initialize list. */

Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h
==
--- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h   Wed Jun  8 
17:35:13 2016(r301658)
+++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h   Wed Jun  8 
17:35:59 2016(r301659)
@@ -229,7 +229,7 @@ extern struct snmp_toolinfo snmptool;
 #defineSET_NONREP(ctx, i)  (((ctx)->flags |= (((i) & 0xff) << 24)))
 #defineGET_NONREP(ctx) (((ctx)->flags & NONREP_BITS) >> 24)
 
-
+extern int _bsnmptools_debug;
 extern const struct asn_oid IsoOrgDod_OID;
 
 int snmptool_init(struct snmp_toolinfo *);
___
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: r301660 - vendor/NetBSD/libc-vis/20160608

2016-06-08 Thread Brooks Davis
Author: brooks
Date: Wed Jun  8 17:36:01 2016
New Revision: 301660
URL: https://svnweb.freebsd.org/changeset/base/301660

Log:
  Tag 2016-06-08 import of NetBSD's (un)vis(3)

Added:
  vendor/NetBSD/libc-vis/20160608/
 - copied from r301659, vendor/NetBSD/libc-vis/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: r301658 - vendor/NetBSD/libc-vis/dist

2016-06-08 Thread Brooks Davis
Author: brooks
Date: Wed Jun  8 17:35:13 2016
New Revision: 301658
URL: https://svnweb.freebsd.org/changeset/base/301658

Log:
  Vendor import of NetBSD's (un)vis(3) at 2016-06-08

Modified:
  vendor/NetBSD/libc-vis/dist/unvis.c
  vendor/NetBSD/libc-vis/dist/vis.3
  vendor/NetBSD/libc-vis/dist/vis.c
  vendor/NetBSD/libc-vis/dist/vis.h

Modified: vendor/NetBSD/libc-vis/dist/unvis.c
==
--- vendor/NetBSD/libc-vis/dist/unvis.c Wed Jun  8 17:34:37 2016
(r301657)
+++ vendor/NetBSD/libc-vis/dist/unvis.c Wed Jun  8 17:35:13 2016
(r301658)
@@ -1,4 +1,4 @@
-/* $NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $  */
+/* $NetBSD: unvis.c,v 1.44 2014/09/26 15:43:36 roy Exp $   */
 
 /*-
  * Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)unvis.c8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $");
+__RCSID("$NetBSD: unvis.c,v 1.44 2014/09/26 15:43:36 roy Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -313,6 +313,12 @@ unvis(char *cp, int c, int *astate, int 
 */
*astate = SS(0, S_GROUND);
return UNVIS_NOCHAR;
+   default:
+   if (isgraph(c)) {
+   *cp = c;
+   *astate = SS(0, S_GROUND);
+   return UNVIS_VALID;
+   }
}
goto bad;
 

Modified: vendor/NetBSD/libc-vis/dist/vis.3
==
--- vendor/NetBSD/libc-vis/dist/vis.3   Wed Jun  8 17:34:37 2016
(r301657)
+++ vendor/NetBSD/libc-vis/dist/vis.3   Wed Jun  8 17:35:13 2016
(r301658)
@@ -1,4 +1,4 @@
-.\"$NetBSD: vis.3,v 1.39 2013/02/20 20:05:26 christos Exp $
+.\"$NetBSD: vis.3,v 1.45 2016/06/08 15:00:04 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1991, 1993
 .\"The Regents of the University of California.  All rights reserved.
@@ -29,13 +29,14 @@
 .\"
 .\" @(#)vis.3  8.1 (Berkeley) 6/9/93
 .\"
-.Dd February 19, 2013
+.Dd January 14, 2015
 .Dt VIS 3
 .Os
 .Sh NAME
 .Nm vis ,
 .Nm nvis ,
 .Nm strvis ,
+.Nm stravis ,
 .Nm strnvis ,
 .Nm strvisx ,
 .Nm strnvisx ,
@@ -59,6 +60,8 @@
 .Ft int
 .Fn strvis "char *dst" "const char *src" "int flag"
 .Ft int
+.Fn stravis "char **dst" "const char *src" "int flag"
+.Ft int
 .Fn strnvis "char *dst" "size_t dlen" "const char *src" "int flag"
 .Ft int
 .Fn strvisx "char *dst" "const char *src" "size_t len" "int flag"
@@ -111,6 +114,7 @@ encoding format (explained below).
 .Pp
 The
 .Fn strvis ,
+.Fn stravis ,
 .Fn strnvis ,
 .Fn strvisx ,
 and
@@ -157,6 +161,9 @@ forms return the number of characters in
 (not including the trailing
 .Dv NUL ) .
 The
+.Fn stravis
+function allocates space dynamically to hold the string.
+The
 .Dq Nm n
 versions of the functions also take an additional argument
 .Fa dlen
@@ -239,11 +246,31 @@ alter this:
 Also encode the magic characters
 .Ql ( * ,
 .Ql \&? ,
-.Ql \&[
+.Ql \&[ ,
 and
 .Ql # )
 recognized by
 .Xr glob 3 .
+.It Dv VIS_SHELL
+Also encode the meta characters used by shells (in addition to the glob
+characters):
+.Ql ( ' ,
+.Ql ` ,
+.Ql \&" ,
+.Ql \&; ,
+.Ql & ,
+.Ql < ,
+.Ql > ,
+.Ql \&( ,
+.Ql \&) ,
+.Ql \&| ,
+.Ql \&] ,
+.Ql \e ,
+.Ql $ ,
+.Ql \&! ,
+.Ql \&^ ,
+and
+.Ql ~ ) .
 .It Dv VIS_SP
 Also encode space.
 .It Dv VIS_TAB
@@ -252,11 +279,10 @@ Also encode tab.
 Also encode newline.
 .It Dv VIS_WHITE
 Synonym for
-.Dv VIS_SP
-\&|
-.Dv VIS_TAB
-\&|
-.Dv VIS_NL .
+.Dv VIS_SP | VIS_TAB | VIS_NL .
+.It Dv VIS_META
+Synonym for
+.Dv VIS_WHITE | VIS_GLOB | VIS_SHELL .
 .It Dv VIS_SAFE
 Only encode
 .Dq unsafe
@@ -417,6 +443,11 @@ The encoding conversion is influenced by
 environment variable which defines the set of characters
 that can be copied without encoding.
 .Pp
+If
+.Dv VIS_NOLOCALE
+is set, processing is done assuming the C locale and overriding
+any other environment settings.
+.Pp
 When 8-bit data is present in the input,
 .Ev LC_CTYPE
 must be set to the correct locale or to the C locale.
@@ -510,7 +541,7 @@ appeared in
 .Nx 6.0
 and
 .Fx 9.2 .
-Myltibyte character support was added in
+Multibyte character support was added in
 .Nx 7.0
 and
 .Fx 9.2 .

Modified: vendor/NetBSD/libc-vis/dist/vis.c
==
--- vendor/NetBSD/libc-vis/dist/vis.c   Wed Jun  8 17:34:37 2016
(r301657)
+++ vendor/NetBSD/libc-vis/dist/vis.c   Wed Jun  8 17:35:13 2016
(r301658)
@@ -1,4 +1,4 @@
-/* $NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $*/
+/* $NetBSD: vis.c,v 1.71 2016/01/14 20:41:23 christos Exp $*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -57,7 +57,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 

svn commit: r301657 - stable/10/usr.sbin/bsnmpd/tools/libbsnmptools

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:34:37 2016
New Revision: 301657
URL: https://svnweb.freebsd.org/changeset/base/301657

Log:
  MFC r299701:
  
  Move _bsnmptools_debug extern from bsnmpmap.c to bsnmptools.h
  
  It was used in bsnmpmap.c but was stored in bsnmptools.c; moving the extern
  to the header allows us to cover all of our bases for the variable, and allows
  _bsnmptools_debug to be used in the future elsewhere -- not just bsnmpmap.c.

Modified:
  stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
  stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
==
--- stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.cWed Jun  8 
17:32:41 2016(r301656)
+++ stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.cWed Jun  8 
17:34:37 2016(r301657)
@@ -47,7 +47,6 @@
 #include "bsnmptc.h"
 #include "bsnmptools.h"
 
-extern int _bsnmptools_debug;
 #defineDEBUG   if (_bsnmptools_debug) fprintf
 
 /* Allocate memory and initialize list. */

Modified: stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h
==
--- stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h  Wed Jun  8 
17:32:41 2016(r301656)
+++ stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h  Wed Jun  8 
17:34:37 2016(r301657)
@@ -231,7 +231,7 @@ extern struct snmp_toolinfo snmptool;
 #defineSET_NONREP(ctx, i)  (((ctx)->flags |= (((i) & 0xff) << 24)))
 #defineGET_NONREP(ctx) (((ctx)->flags & NONREP_BITS) >> 24)
 
-
+extern int _bsnmptools_debug;
 extern const struct asn_oid IsoOrgDod_OID;
 
 int snmptool_init(struct snmp_toolinfo *);
___
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: r301656 - stable/10/usr.sbin/bsnmpd/tools/libbsnmptools

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:32:41 2016
New Revision: 301656
URL: https://svnweb.freebsd.org/changeset/base/301656

Log:
  MFC r299778:
  
  Use a consistent errno save/restore pattern before running strtoul
  
  - Save errno
  - Set errno to 0
  - Call strtoul
  - Test errno (optional, but many calls to strtoul did this afterwards)
  
  Some of the code was setting errno = 0 after calling strtoul, not setting
  errno = 0, or setting errno to saved_errno after the call, but before the
  test. These all have unwanted behavioral side-effects, depending on the
  initial value of errno and whether or not the input to strtoul was correct
  or incorrect.

Modified:
  stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c
==
--- stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c Wed Jun  8 
17:30:29 2016(r301655)
+++ stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c Wed Jun  8 
17:32:41 2016(r301656)
@@ -364,6 +364,7 @@ snmp_date2asn_oid(char *str, struct asn_
/* 'MM-' */
ptr = endptr + 1;
saved_errno = errno;
+   errno = 0;
v = strtoul(ptr, &endptr, 10);
if (errno != 0)
goto error;
@@ -377,6 +378,7 @@ snmp_date2asn_oid(char *str, struct asn_
/* 'DD,' */
ptr = endptr + 1;
saved_errno = errno;
+   errno = 0;
v = strtoul(ptr, &endptr, 10);
if (errno != 0)
goto error;
@@ -390,6 +392,7 @@ snmp_date2asn_oid(char *str, struct asn_
/* 'HH:' */
ptr = endptr + 1;
saved_errno = errno;
+   errno = 0;
v = strtoul(ptr, &endptr, 10);
if (errno != 0)
goto error;
@@ -403,6 +406,7 @@ snmp_date2asn_oid(char *str, struct asn_
/* 'MM:' */
ptr = endptr + 1;
saved_errno = errno;
+   errno = 0;
v = strtoul(ptr, &endptr, 10);
if (errno != 0)
goto error;
@@ -416,6 +420,7 @@ snmp_date2asn_oid(char *str, struct asn_
/* 'SS.' */
ptr = endptr + 1;
saved_errno = errno;
+   errno = 0;
v = strtoul(ptr, &endptr, 10);
if (errno != 0)
goto error;
@@ -429,6 +434,7 @@ snmp_date2asn_oid(char *str, struct asn_
/* 'M(mseconds),' */
ptr = endptr + 1;
saved_errno = errno;
+   errno = 0;
v = strtoul(ptr, &endptr, 10);
if (errno != 0)
goto error;
@@ -454,6 +460,7 @@ snmp_date2asn_oid(char *str, struct asn_
/* 'HH:' */
ptr = endptr + 1;
saved_errno = errno;
+   errno = 0;
v = strtoul(ptr, &endptr, 10);
if (errno != 0)
goto error;
@@ -467,6 +474,7 @@ snmp_date2asn_oid(char *str, struct asn_
/* 'MM' - last one - ignore endptr here. */
ptr = endptr + 1;
saved_errno = errno;
+   errno = 0;
v = strtoul(ptr, &endptr, 10);
if (errno != 0)
goto error;
@@ -725,6 +733,7 @@ snmp_ntp_ts2asn_oid(char *str, struct as
 
ptr = str;
saved_errno = errno;
+   errno = 0;
v = strtoul(ptr, &endptr, 10);
if (errno != 0 || (v / 1000) > 9) {
warnx("Integer value %s not supported", str);
@@ -749,6 +758,7 @@ snmp_ntp_ts2asn_oid(char *str, struct as
 
ptr = endptr + 1;
saved_errno = errno;
+   errno = 0;
v = strtoul(ptr, &endptr, 10);
if (errno != 0 || (v / 1000) > 9) {
warnx("Integer value %s not supported", str);
@@ -776,6 +786,7 @@ parse_ntp_ts(struct snmp_value *sv, char
uint8_t ntp_ts[SNMP_NTP_TS_OCTETS];
 
saved_errno = errno;
+   errno = 0;
v = strtoul(val, &endptr, 10);
if (errno != 0 || (v / 1000) > 9) {
errno = saved_errno;
@@ -797,6 +808,7 @@ parse_ntp_ts(struct snmp_value *sv, char
val = endptr + 1;
 
saved_errno = errno;
+   errno = 0;
v = strtoul(val, &endptr, 10);
if (errno != 0 || (v / 1000) > 9) {
errno = saved_errno;
@@ -879,8 +891,8 @@ snmp_bridgeid2oct(char *str, struct asn_
ptr = str;
/* Read the priority. */
saved_errno = errno;
-   v = strtoul(ptr, &endptr, 10);
errno = 0;
+   v = strtoul(ptr, &endptr, 10);
 
if (v > SNMP_MAX_BRIDGE_PRIORITY || errno != 0 || *endptr != '.') {
errno = saved_errno;
@@ -897,6 +909,7 @@ snmp_bridgeid2oct(char *str, struct asn_
ptr = endptr + 1;
for (i = 0; i < 5; i++) {
saved_errno = errno;
+   errno = 0;
v = strtoul(ptr, &endptr, 16);
errno = saved_errno;
if (v > 0xff) {
@@ -914,6 +927,7 @@ snmp_bridgeid2oct(char *str, struct asn_
 
/* The last one - don't check th

svn commit: r301655 - stable/10/usr.sbin/bsnmpd/tools/libbsnmptools

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:30:29 2016
New Revision: 301655
URL: https://svnweb.freebsd.org/changeset/base/301655

Log:
  MFC r299766:
  
  Fix logically dead code pointed out by clang/Coverity
  
  parse_context, parse_user_security: test for validity of results from
  parse_ascii(..) with by casting to int32_t and comparing to -1; comparing
  unsigned types to negative values will always be false.
  
  CID: 1011432, 1011433

Modified:
  stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
==
--- stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c  Wed Jun  8 
17:29:07 2016(r301654)
+++ stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c  Wed Jun  8 
17:30:29 2016(r301655)
@@ -615,8 +615,8 @@ parse_context(struct snmp_toolinfo *snmp
warnx("Suboption 'context-engine' - no 
argument");
return (-1);
}
-   if ((snmp_client.clen = parse_ascii(val,
-   snmp_client.cengine, SNMP_ENGINE_ID_SIZ)) < 0) {
+   if ((int32_t)(snmp_client.clen = parse_ascii(val,
+   snmp_client.cengine, SNMP_ENGINE_ID_SIZ)) == -1) {
warnx("Bad EngineID - %s", val);
return (-1);
}
@@ -654,7 +654,7 @@ parse_user_security(struct snmp_toolinfo
}
snmp_client.engine.engine_len = parse_ascii(val, 
snmp_client.engine.engine_id, SNMP_ENGINE_ID_SIZ);
-   if (snmp_client.engine.engine_len < 0) {
+   if ((int32_t)snmp_client.engine.engine_len == -1) {
warnx("Bad EngineID - %s", val);
return (-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: r301654 - stable/9/usr.sbin/bsnmpd/tools/libbsnmptools

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:29:07 2016
New Revision: 301654
URL: https://svnweb.freebsd.org/changeset/base/301654

Log:
  MFstable/10 r301653:
  
  MFC r299810:
  
  Correct function names that failed in error messages
  
  It should be calloc/strdup, not malloc

Modified:
  stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
  stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)
  stable/9/usr.sbin/bsnmpd/   (props changed)

Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
==
--- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c Wed Jun  8 
17:27:38 2016(r301653)
+++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c Wed Jun  8 
17:29:07 2016(r301654)
@@ -269,12 +269,12 @@ enum_pair_insert(struct enum_pairs *head
struct enum_pair *e_new;
 
if ((e_new = calloc(1, sizeof(struct enum_pair))) == NULL) {
-   syslog(LOG_ERR, "malloc() failed: %s", strerror(errno));
+   syslog(LOG_ERR, "calloc() failed: %s", strerror(errno));
return (-1);
}
 
if ((e_new->enum_str = strdup(enum_str)) == NULL) {
-   syslog(LOG_ERR, "malloc() failed: %s", strerror(errno));
+   syslog(LOG_ERR, "strdup() failed: %s", strerror(errno));
free(e_new);
return (-1);
}

Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
==
--- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c   Wed Jun  8 
17:27:38 2016(r301653)
+++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c   Wed Jun  8 
17:29:07 2016(r301654)
@@ -251,12 +251,12 @@ add_filename(struct snmp_toolinfo *snmpt
}
 
if ((fstring = strdup(filename)) == NULL) {
-   warnx("malloc() failed - %s", strerror(errno));
+   warnx("strdup() failed - %s", strerror(errno));
return (-1);
}
 
if ((entry = calloc(1, sizeof(struct fname))) == NULL) {
-   warnx("malloc() failed - %s", strerror(errno));
+   warnx("calloc() failed - %s", strerror(errno));
free(fstring);
return (-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: r301653 - stable/10/usr.sbin/bsnmpd/tools/libbsnmptools

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:27:38 2016
New Revision: 301653
URL: https://svnweb.freebsd.org/changeset/base/301653

Log:
  MFC r299810:
  
  Correct function names that failed in error messages
  
  It should be calloc/strdup, not malloc

Modified:
  stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
  stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
==
--- stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.cWed Jun  8 
17:24:57 2016(r301652)
+++ stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.cWed Jun  8 
17:27:38 2016(r301653)
@@ -269,12 +269,12 @@ enum_pair_insert(struct enum_pairs *head
struct enum_pair *e_new;
 
if ((e_new = calloc(1, sizeof(struct enum_pair))) == NULL) {
-   syslog(LOG_ERR, "malloc() failed: %s", strerror(errno));
+   syslog(LOG_ERR, "calloc() failed: %s", strerror(errno));
return (-1);
}
 
if ((e_new->enum_str = strdup(enum_str)) == NULL) {
-   syslog(LOG_ERR, "malloc() failed: %s", strerror(errno));
+   syslog(LOG_ERR, "strdup() failed: %s", strerror(errno));
free(e_new);
return (-1);
}

Modified: stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
==
--- stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c  Wed Jun  8 
17:24:57 2016(r301652)
+++ stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c  Wed Jun  8 
17:27:38 2016(r301653)
@@ -252,12 +252,12 @@ add_filename(struct snmp_toolinfo *snmpt
}
 
if ((fstring = strdup(filename)) == NULL) {
-   warnx("malloc() failed - %s", strerror(errno));
+   warnx("strdup() failed - %s", strerror(errno));
return (-1);
}
 
if ((entry = calloc(1, sizeof(struct fname))) == NULL) {
-   warnx("malloc() failed - %s", strerror(errno));
+   warnx("calloc() failed - %s", strerror(errno));
free(fstring);
return (-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: r301652 - stable/9/usr.sbin/bsnmpd/tools/libbsnmptools

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:24:57 2016
New Revision: 301652
URL: https://svnweb.freebsd.org/changeset/base/301652

Log:
  MFstable/10 r300475:
  
  MFC r299710,r299711,r299763,r299783,r299811:
  
  r299710:
  
  Staticize global variables only used in bsnmpimport.c to fix
  -Wmissing-variable-declarations warnings
  
  r299711:
  
  Fold two malloc + memset(.., 0, ..) calls into equivalent calloc calls
  
  r299763:
  
  Mute -Wstrlcpy-strlcat-size warning by using nitems with the size of the 
buffer
  
  This is a no-op as the malloc above set the size of the buffer to the size 
used
  below, but this keeps things consistent in case the malloc call changes 
somehow.
  
  r299783:
  
  Convert tok from enum tok to int32_t in function calls
  
  get_token(..) returns int32_t, not enum tok, and in many cases tests for items
  not in enum tok (e.g. '('). Make the typing consistent with get_token, which
  includes a domino effect of changing enum tok to int32_t.
  
  r299811:
  
  Use strdup instead of malloc + strlcpy
  
  Fix error messages on failure for calloc/strdup

Modified:
  stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)
  stable/9/usr.sbin/bsnmpd/   (props changed)

Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
==
--- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c  Wed Jun  8 
17:21:15 2016(r301651)
+++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c  Wed Jun  8 
17:24:57 2016(r301652)
@@ -140,9 +140,9 @@ struct input {
LIST_ENTRY(input) link;
 };
 
-LIST_HEAD(, input) inputs = LIST_HEAD_INITIALIZER(inputs);
-struct input *input = NULL;
-int32_t pbchar = -1;
+static LIST_HEAD(, input) inputs = LIST_HEAD_INITIALIZER(inputs);
+static struct input *input = NULL;
+static int32_t pbchar = -1;
 
 #defineMAX_PATHS   100
 
@@ -301,18 +301,18 @@ static const struct {
{ NULL, 0, 0 }
 };
 
-struct {
+static struct {
/* Current OID type, regarding table membership. */
enum snmp_tbl_entry tbl_type;
/* A pointer to a structure in table list to add to its members. */
struct snmp_index_entry *table_idx;
 } table_data;
 
-struct asn_oid current_oid;
-char nexttok[MAXSTR];
-u_long val;/* integer values */
-int32_tall_cond;   /* all conditions are true */
-int32_t saved_token = -1;
+static struct asn_oid current_oid;
+static char nexttok[MAXSTR];
+static u_long val; /* integer values */
+static int32_t all_cond;   /* all conditions are true */
+static int32_t saved_token = -1;
 
 /* Prepare the global data before parsing a new file. */
 static void
@@ -513,7 +513,7 @@ snmp_import_update_table(enum snmp_tbl_e
 }
 
 static int32_t
-parse_enum(struct snmp_toolinfo *snmptoolctx, enum tok *tok,
+parse_enum(struct snmp_toolinfo *snmptoolctx, int32_t *tok,
 struct enum_pairs *enums)
 {
while ((*tok = gettoken(snmptoolctx)) == TOK_STR) {
@@ -532,7 +532,7 @@ parse_enum(struct snmp_toolinfo *snmptoo
 }
 
 static int32_t
-parse_subtype(struct snmp_toolinfo *snmptoolctx, enum tok *tok,
+parse_subtype(struct snmp_toolinfo *snmptoolctx, int32_t *tok,
 enum snmp_tc *tc)
 {
if ((*tok = gettoken(snmptoolctx)) != TOK_STR) {
@@ -547,7 +547,7 @@ parse_subtype(struct snmp_toolinfo *snmp
 }
 
 static int32_t
-parse_type(struct snmp_toolinfo *snmptoolctx, enum tok *tok,
+parse_type(struct snmp_toolinfo *snmptoolctx, int32_t *tok,
 enum snmp_tc *tc, struct enum_pairs **snmp_enum)
 {
int32_t syntax, mem;
@@ -630,17 +630,15 @@ snmp_import_head(struct snmp_toolinfo *s
 static int32_t
 snmp_import_table(struct snmp_toolinfo *snmptoolctx, struct snmp_oid2str *obj)
 {
-   int32_t i;
+   int32_t i, tok;
enum snmp_tc tc;
-   enum tok tok;
struct snmp_index_entry *entry;
 
-   if ((entry = malloc(sizeof(struct snmp_index_entry))) == NULL) {
+   if ((entry = calloc(1, sizeof(struct snmp_index_entry))) == NULL) {
syslog(LOG_ERR, "malloc() failed: %s", strerror(errno));
return (-1);
}
 
-   memset(entry, 0, sizeof(struct snmp_index_entry));
STAILQ_INIT(&(entry->index_list));
 
for (i = 0, tok = gettoken(snmptoolctx); i < SNMP_INDEXES_MAX; i++) {
@@ -705,7 +703,7 @@ snmp_import_table(struct snmp_toolinfo *
  * Read everything after the syntax type that is certainly a leaf OID info.
  */
 static int32_t
-snmp_import_leaf(struct snmp_toolinfo *snmptoolctx, enum tok *tok,
+snmp_import_leaf(struct snmp_toolinfo *snmptoolctx, int32_t *tok,
 struct snmp_oid2str *oid2str)
 {
int32_t i, syntax;
@@ -758,25 +756,23 @@ snmp_import_object(struct snmp_toolinfo 
 {
char *string;
int i;
-   enum tok tok;
+   int32_t tok;
struct snmp_oid2str *oid2str;
 
 

svn commit: r301651 - head/sbin/ifconfig

2016-06-08 Thread Andriy Voskoboinyk
Author: avos
Date: Wed Jun  8 17:21:15 2016
New Revision: 301651
URL: https://svnweb.freebsd.org/changeset/base/301651

Log:
  ifconfig: fix wlan creation when unit number is not provided
  (was broken after r300738).
  
  Reported by:  Yoshihiro Ota , adrian
  Tested by:Yoshihiro Ota 

Modified:
  head/sbin/ifconfig/ifieee80211.c

Modified: head/sbin/ifconfig/ifieee80211.c
==
--- head/sbin/ifconfig/ifieee80211.cWed Jun  8 17:17:03 2016
(r301650)
+++ head/sbin/ifconfig/ifieee80211.cWed Jun  8 17:21:15 2016
(r301651)
@@ -5190,6 +5190,7 @@ static void
 wlan_create(int s, struct ifreq *ifr)
 {
static const uint8_t zerobssid[IEEE80211_ADDR_LEN];
+   char orig_name[IFNAMSIZ];
 
if (params.icp_parent[0] == '\0')
errx(1, "must specify a parent device (wlandev) when creating "
@@ -5201,7 +5202,13 @@ wlan_create(int s, struct ifreq *ifr)
if (ioctl(s, SIOCIFCREATE2, ifr) < 0)
err(1, "SIOCIFCREATE2");
 
+   /* XXX preserve original name for ifclonecreate(). */
+   strlcpy(orig_name, name, sizeof(orig_name));
+   strlcpy(name, ifr->ifr_name, sizeof(name));
+
setdefregdomain(s);
+
+   strlcpy(name, orig_name, sizeof(name));
 }
 
 static
___
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: r301650 - stable/9/usr.sbin/rpcbind

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:17:03 2016
New Revision: 301650
URL: https://svnweb.freebsd.org/changeset/base/301650

Log:
  MFstable/10 r301636:
  
  MFC r300867,r300932,r300934,r300941,r300972,r300973:
  
  r300867:
  
  Only expose `hint_uaddr` in the ND_DEBUG case
  
  This fixes a -Wunused-but-set-variable warning with gcc
  
  r300932:
  
  Catch malloc(3) errors and socket(2) errors
  
  - malloc failing will result in a delayed segfault
  - socket failing will result in delayed failures with setsockopt
  
  Exit in the event that either of these high-level conditions are met.
  
  CID: 976288, 976321, 976858
  
  r300934:
  
  Plug leak with ifp by calling freeifaddrs after calling getifaddrs
  
  Obtained from: NetBSD v1.18
  
  r300941:
  
  Don't leak res in network_init(..)
  
  Call freeaddrinfo on it after it's been used
  
  CID: 1225050
  
  r300972 (by markj):
  
  Fix rpcbind init after r300941.
  
  - getaddrinfo() sets res = NULL on failure and freeaddrinfo() always
dereferences its argument, so we should only free the address list after
a successful call.
  - Address a second potential leak caused by getaddrinfo(AF_INET6)
overwriting the address list returned by getaddrinfo(AF_INET).
  
  X-MFC-With:   r300941
  
  r300973:
  
  Follow up to r300932
  
  In the event MK_INET6 != no in userspace, but is disabled in the
  kernel, or if there aren't any IPv6 addresses configured in userspace
  (for lo0 and all physical interfaces), rpcbind would terminate
  immediately instead of silently failing on
  
  Skip over the IPv6 block to its respective cleanup with freeifaddrs if
  creating the socket failed instead of terminating rpcbind immediately

Modified:
  stable/9/usr.sbin/rpcbind/util.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)

Modified: stable/9/usr.sbin/rpcbind/util.c
==
--- stable/9/usr.sbin/rpcbind/util.cWed Jun  8 17:13:57 2016
(r301649)
+++ stable/9/usr.sbin/rpcbind/util.cWed Jun  8 17:17:03 2016
(r301650)
@@ -142,7 +142,9 @@ addrmerge(struct netbuf *caller, const c
struct sockaddr_storage ss;
struct netconfig *nconf;
char *caller_uaddr = NULL;
+#ifdef ND_DEBUG
const char *hint_uaddr = NULL;
+#endif
char *ret = NULL;
int bestif_goodness;
 
@@ -163,13 +165,17 @@ addrmerge(struct netbuf *caller, const c
 */
hint_sa = NULL;
if (clnt_uaddr != NULL) {
+#ifdef ND_DEBUG
hint_uaddr = clnt_uaddr;
+#endif
if ((hint_nbp = uaddr2taddr(nconf, clnt_uaddr)) == NULL)
goto freeit;
hint_sa = hint_nbp->buf;
}
if (hint_sa == NULL || hint_sa->sa_family != caller_sa->sa_family) {
+#ifdef ND_DEBUG
hint_uaddr = caller_uaddr;
+#endif
hint_sa = caller->buf;
}
 
___
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: r301649 - stable/9/usr.sbin/rpcbind

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:13:57 2016
New Revision: 301649
URL: https://svnweb.freebsd.org/changeset/base/301649

Log:
  MFstable/10 r301648:
  
  MFC r300947:
  
  Staticize variables only used in rpcbind.c
  
  This is some low hanging fruit necessary for making this WARNS?= 6 clean

Modified:
  stable/9/usr.sbin/rpcbind/rpcbind.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)

Modified: stable/9/usr.sbin/rpcbind/rpcbind.c
==
--- stable/9/usr.sbin/rpcbind/rpcbind.c Wed Jun  8 17:13:28 2016
(r301648)
+++ stable/9/usr.sbin/rpcbind/rpcbind.c Wed Jun  8 17:13:57 2016
(r301649)
@@ -86,17 +86,17 @@ rpcblist_ptr list_rbl;  /* A list of vers
 
 #define RPCBINDDLOCK "/var/run/rpcbind.lock"
 
-int runasdaemon = 0;
+static int runasdaemon = 0;
 int insecure = 0;
 int oldstyle_local = 0;
 int verboselog = 0;
 
-char **hosts = NULL;
-struct sockaddr **bound_sa;
-int ipv6_only = 0;
-int nhosts = 0;
-int on = 1;
-int rpcbindlockfd;
+static char **hosts = NULL;
+static struct sockaddr **bound_sa;
+static int ipv6_only = 0;
+static int nhosts = 0;
+static int on = 1;
+static int rpcbindlockfd;
 
 #ifdef WARMSTART
 /* Local Variable */
___
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: r301648 - stable/10/usr.sbin/rpcbind

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:13:28 2016
New Revision: 301648
URL: https://svnweb.freebsd.org/changeset/base/301648

Log:
  MFC r300947:
  
  Staticize variables only used in rpcbind.c
  
  This is some low hanging fruit necessary for making this WARNS?= 6 clean

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

Modified: stable/10/usr.sbin/rpcbind/rpcbind.c
==
--- stable/10/usr.sbin/rpcbind/rpcbind.cWed Jun  8 17:12:37 2016
(r301647)
+++ stable/10/usr.sbin/rpcbind/rpcbind.cWed Jun  8 17:13:28 2016
(r301648)
@@ -86,17 +86,17 @@ rpcblist_ptr list_rbl;  /* A list of vers
 
 #define RPCBINDDLOCK "/var/run/rpcbind.lock"
 
-int runasdaemon = 0;
+static int runasdaemon = 0;
 int insecure = 0;
 int oldstyle_local = 0;
 int verboselog = 0;
 
-char **hosts = NULL;
-struct sockaddr **bound_sa;
-int ipv6_only = 0;
-int nhosts = 0;
-int on = 1;
-int rpcbindlockfd;
+static char **hosts = NULL;
+static struct sockaddr **bound_sa;
+static int ipv6_only = 0;
+static int nhosts = 0;
+static int on = 1;
+static int rpcbindlockfd;
 
 #ifdef WARMSTART
 /* Local Variable */
___
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: r301647 - stable/9/usr.sbin/rpcbind

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:12:37 2016
New Revision: 301647
URL: https://svnweb.freebsd.org/changeset/base/301647

Log:
  MFstable/10 r301646:
  
  MFC r300945:
  
  Remove unnecessary caller_uaddr != NULL test before calling free on it

Modified:
  stable/9/usr.sbin/rpcbind/util.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)

Modified: stable/9/usr.sbin/rpcbind/util.c
==
--- stable/9/usr.sbin/rpcbind/util.cWed Jun  8 17:11:42 2016
(r301646)
+++ stable/9/usr.sbin/rpcbind/util.cWed Jun  8 17:12:37 2016
(r301647)
@@ -311,8 +311,7 @@ found:
ret = taddr2uaddr(nconf, &tbuf);
 
 freeit:
-   if (caller_uaddr != NULL)
-   free(caller_uaddr);
+   free(caller_uaddr);
if (hint_nbp != NULL) {
free(hint_nbp->buf);
free(hint_nbp);
___
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: r301646 - stable/10/usr.sbin/rpcbind

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:11:42 2016
New Revision: 301646
URL: https://svnweb.freebsd.org/changeset/base/301646

Log:
  MFC r300945:
  
  Remove unnecessary caller_uaddr != NULL test before calling free on it

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

Modified: stable/10/usr.sbin/rpcbind/util.c
==
--- stable/10/usr.sbin/rpcbind/util.c   Wed Jun  8 17:10:43 2016
(r301645)
+++ stable/10/usr.sbin/rpcbind/util.c   Wed Jun  8 17:11:42 2016
(r301646)
@@ -293,8 +293,7 @@ found:
ret = taddr2uaddr(nconf, &tbuf);
 
 freeit:
-   if (caller_uaddr != NULL)
-   free(caller_uaddr);
+   free(caller_uaddr);
if (hint_nbp != NULL) {
free(hint_nbp->buf);
free(hint_nbp);
___
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: r301645 - stable/9/usr.sbin/rpcbind

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:10:43 2016
New Revision: 301645
URL: https://svnweb.freebsd.org/changeset/base/301645

Log:
  MFstable/10 r301644:
  
  MFC r300942:
  
  Remove a useless if (x != NULL) check before calling free on allocated_uaddr

Modified:
  stable/9/usr.sbin/rpcbind/check_bound.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)

Modified: stable/9/usr.sbin/rpcbind/check_bound.c
==
--- stable/9/usr.sbin/rpcbind/check_bound.c Wed Jun  8 17:09:47 2016
(r301644)
+++ stable/9/usr.sbin/rpcbind/check_bound.c Wed Jun  8 17:10:43 2016
(r301645)
@@ -220,8 +220,7 @@ mergeaddr(SVCXPRT *xprt, char *netid, ch
fprintf(stderr, "mergeaddr: uaddr = %s, merged uaddr = %s\n",
uaddr, m_uaddr);
 #endif
-   if (allocated_uaddr != NULL)
-   free(allocated_uaddr);
+   free(allocated_uaddr);
return (m_uaddr);
 }
 
___
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: r301644 - stable/10/usr.sbin/rpcbind

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:09:47 2016
New Revision: 301644
URL: https://svnweb.freebsd.org/changeset/base/301644

Log:
  MFC r300942:
  
  Remove a useless if (x != NULL) check before calling free on allocated_uaddr

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

Modified: stable/10/usr.sbin/rpcbind/check_bound.c
==
--- stable/10/usr.sbin/rpcbind/check_bound.cWed Jun  8 17:04:15 2016
(r301643)
+++ stable/10/usr.sbin/rpcbind/check_bound.cWed Jun  8 17:09:47 2016
(r301644)
@@ -220,8 +220,7 @@ mergeaddr(SVCXPRT *xprt, char *netid, ch
fprintf(stderr, "mergeaddr: uaddr = %s, merged uaddr = %s\n",
uaddr, m_uaddr);
 #endif
-   if (allocated_uaddr != NULL)
-   free(allocated_uaddr);
+   free(allocated_uaddr);
return (m_uaddr);
 }
 
___
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: r301643 - stable/9/usr.sbin/rpcbind

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 17:04:15 2016
New Revision: 301643
URL: https://svnweb.freebsd.org/changeset/base/301643

Log:
  MFC r300932,r300934,r300941,r300972,r300973:
  
  r300932:
  
  Catch malloc(3) errors and socket(2) errors
  
  - malloc failing will result in a delayed segfault
  - socket failing will result in delayed failures with setsockopt
  
  Exit in the event that either of these high-level conditions are met.
  
  CID: 976288, 976321, 976858
  
  r300934:
  
  Plug leak with ifp by calling freeifaddrs after calling getifaddrs
  
  Obtained from: NetBSD v1.18
  
  r300941:
  
  Don't leak res in network_init(..)
  
  Call freeaddrinfo on it after it's been used
  
  CID: 1225050
  
  r300972 (by markj):
  
  Fix rpcbind init after r300941.
  
  - getaddrinfo() sets res = NULL on failure and freeaddrinfo() always
dereferences its argument, so we should only free the address list after
a successful call.
  - Address a second potential leak caused by getaddrinfo(AF_INET6)
overwriting the address list returned by getaddrinfo(AF_INET).
  
  X-MFC-With:   r300941
  
  r300973:
  
  Follow up to r300932
  
  In the event MK_INET6 != no in userspace, but is disabled in the
  kernel, or if there aren't any IPv6 addresses configured in userspace
  (for lo0 and all physical interfaces), rpcbind would terminate
  immediately instead of silently failing on
  
  Skip over the IPv6 block to its respective cleanup with freeifaddrs if
  creating the socket failed instead of terminating rpcbind immediately

Modified:
  stable/9/usr.sbin/rpcbind/util.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)

Modified: stable/9/usr.sbin/rpcbind/util.c
==
--- stable/9/usr.sbin/rpcbind/util.cWed Jun  8 16:59:09 2016
(r301642)
+++ stable/9/usr.sbin/rpcbind/util.cWed Jun  8 17:04:15 2016
(r301643)
@@ -354,8 +354,10 @@ network_init(void)
if (local_in4 == NULL) {
if (debugging)
fprintf(stderr, "can't alloc local ip4 addr\n");
+   exit(1);
}
memcpy(local_in4, res->ai_addr, sizeof *local_in4);
+   freeaddrinfo(res);
}
 
 #ifdef INET6
@@ -369,8 +371,10 @@ network_init(void)
if (local_in6 == NULL) {
if (debugging)
fprintf(stderr, "can't alloc local ip6 addr\n");
+   exit(1);
}
memcpy(local_in6, res->ai_addr, sizeof *local_in6);
+   freeaddrinfo(res);
}
 
/*
@@ -383,6 +387,11 @@ network_init(void)
inet_pton(AF_INET6, RPCB_MULTICAST_ADDR, &mreq6.ipv6mr_multiaddr);
 
s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
+   if (s == -1) {
+   if (debugging)
+   fprintf(stderr, "couldn't create ip6 socket");
+   goto done_inet6;
+   }
 
/*
 * Loop through all interfaces. For each IPv6 multicast-capable
@@ -404,6 +413,8 @@ network_init(void)
if (debugging)
perror("setsockopt v6 multicast");
}
+done_inet6:
+   freeifaddrs(ifp);
 #endif
 
/* close(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"


svn commit: r301642 - stable/9/usr.sbin/rpcbind

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 16:59:09 2016
New Revision: 301642
URL: https://svnweb.freebsd.org/changeset/base/301642

Log:
  MFstable/10 r296994:
  r296994 (by asomers):
  
  MFC r293229, r293833 to usr.sbin/rpcbind
  
  r293833 | asomers | 2016-01-13 10:33:50 -0700 (Wed, 13 Jan 2016) | 16 lines
  
  Fix Coverity warnings regarding r293229
  
  rpcbind/check_bound.c
  Fix CID1347798, a memory leak in mergeaddr.
  
  rpcbind/tests/addrmerge_test.c
  Fix CID1347800 through CID1347803, memory leaks in ATF tests.  They
  are harmless because each ATF test case runs in its own process, but
  they are trivial to fix.  Fix a few other leaks that Coverity didn't
  detect, too.
  
  r293229 | asomers | 2016-01-05 17:00:11 -0700 (Tue, 05 Jan 2016) | 36 lines
  
  "source routing" in rpcbind
  
  Fix a bug in rpcbind for multihomed hosts. If the server had interfaces on
  two separate subnets, and a client on the first subnet contacted rpcbind at
  the address on the second subnet, rpcbind would advertise addresses on the
  first subnet. This is a bug, because it should prefer to advertise the
  address where it was contacted. The requested service might be firewalled
  off from the address on the first subnet, for example.
  
  usr.sbin/rpcbind/check_bound.c
  If the address on which a request was received is known, pass that
  to addrmerge as the clnt_uaddr parameter. That is what addrmerge's
  comment indicates the parameter is supposed to mean. The previous
  behavior is that clnt_uaddr would contain the address from which the
  client sent the request.
  
  usr.sbin/rpcbind/util.c
  Modify addrmerge to prefer to use an IP that is equal to clnt_uaddr,
  if one is found. Refactor the relevant portion of the function for
  clarity, and to reduce the number of ifdefs.
  
  etc/mtree/BSD.tests.dist
  usr.sbin/rpcbind/tests/Makefile
  usr.sbin/rpcbind/tests/addrmerge_test.c
  Add unit tests for usr.sbin/rpcbind/util.c:addrmerge.
  
  usr.sbin/rpcbind/check_bound.c
  usr.sbin/rpcbind/rpcbind.h
  usr.sbin/rpcbind/util.c
  Constify some function arguments

Modified:
  stable/9/usr.sbin/rpcbind/check_bound.c
  stable/9/usr.sbin/rpcbind/rpcbind.h
  stable/9/usr.sbin/rpcbind/util.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)

Modified: stable/9/usr.sbin/rpcbind/check_bound.c
==
--- stable/9/usr.sbin/rpcbind/check_bound.c Wed Jun  8 16:26:44 2016
(r301641)
+++ stable/9/usr.sbin/rpcbind/check_bound.c Wed Jun  8 16:59:09 2016
(r301642)
@@ -51,6 +51,7 @@ staticchar sccsid[] = "@(#)check_bound.
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -160,6 +161,7 @@ char *
 mergeaddr(SVCXPRT *xprt, char *netid, char *uaddr, char *saddr)
 {
struct fdlist *fdl;
+   struct svc_dg_data *dg_data;
char *c_uaddr, *s_uaddr, *m_uaddr, *allocated_uaddr = NULL;
 
for (fdl = fdhead; fdl; fdl = fdl->next)
@@ -171,21 +173,31 @@ mergeaddr(SVCXPRT *xprt, char *netid, ch
/* that server died */
return (nullstring);
/*
+* Try to determine the local address on which the client contacted us,
+* so we can send a reply from the same address.  If it's unknown, then
+* try to determine which address the client used, and pick a nearby
+* local address.
+*
 * If saddr is not NULL, the remote client may have included the
 * address by which it contacted us.  Use that for the "client" uaddr,
 * otherwise use the info from the SVCXPRT.
 */
-   if (saddr != NULL) {
+   dg_data = (struct svc_dg_data*)xprt->xp_p2;
+   if (dg_data != NULL && dg_data->su_srcaddr.buf != NULL) {
+   c_uaddr = taddr2uaddr(fdl->nconf, &dg_data->su_srcaddr);
+   allocated_uaddr = c_uaddr;
+   }
+   else if (saddr != NULL) {
c_uaddr = saddr;
} else {
c_uaddr = taddr2uaddr(fdl->nconf, svc_getrpccaller(xprt));
-   if (c_uaddr == NULL) {
-   syslog(LOG_ERR, "taddr2uaddr failed for %s",
-   fdl->nconf->nc_netid);
-   return (NULL);
-   }
allocated_uaddr = c_uaddr;
}
+   if (c_uaddr == NULL) {
+   syslog(LOG_ERR, "taddr2uaddr failed for %s",
+   fdl->nconf->nc_netid);
+   return (NULL);
+   }
 
 #ifdef ND_DEBUG
if (debugging) {
@@ -218,7 +230,7 @@ mergeaddr(SVCXPRT *xprt, char *netid, ch
  * structure should not be freed.
  */
 struct netconfig *
-rpcbind_get_conf(char *netid)
+rpcbind_get_conf(const char *netid)
 {
struct fdlist *fdl;
 

Modified: stable/9/usr.sbin/rpcbind/rpcbind.h
===

Re: svn commit: r301577 - stable/10/etc/periodic/daily

2016-06-08 Thread Cy Schubert
In message , Andrey 
Chernov w
rites:
> The code still is called only if $daily_ntpd_leapfile_enable is YES and
> it is NO by default.

Yes, that will be MFCd on Friday, June 10.


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

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


> 
> On 08.06.2016 6:08, Cy Schubert wrote:
> > Author: cy
> > Date: Wed Jun  8 03:08:37 2016
> > New Revision: 301577
> > URL: https://svnweb.freebsd.org/changeset/base/301577
> > 
> > Log:
> >   MFC r301102:
> >   
> >   Don't rely on $ntpd_enable to periodically fetch the latest leapfile.
> >   
> >   Suggested by: cperciva
> > 
> > Modified:
> >   stable/10/etc/periodic/daily/480.leapfile-ntpd
> > Directory Properties:
> >   stable/10/   (props changed)
> > 
> > Modified: stable/10/etc/periodic/daily/480.leapfile-ntpd
> > ===
> ===
> > --- stable/10/etc/periodic/daily/480.leapfile-ntpd  Wed Jun  8 02:39:10 201
> 6 (r301576)
> > +++ stable/10/etc/periodic/daily/480.leapfile-ntpd  Wed Jun  8 03:08:37 201
> 6 (r301577)
> > @@ -16,10 +16,10 @@ case "$daily_ntpd_leapfile_enable" in
> > case "$daily_ntpd_avoid_congestion" in
> > [Yy][Ee][Ss])
> > # Avoid dogpiling
> > -   (sleep $(jot -r 1 0 86400); service ntpd fetch) &
> > +   (sleep $(jot -r 1 0 86400); service ntpd onefetch) &
> > ;;
> > *)
> > -   service ntpd fetch
> > +   service ntpd onefetch
> > ;;
> > esac
> > ;;
> > 
> 


___
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: r301641 - head/sys/contrib/dev/ath/ath_hal/ar9300

2016-06-08 Thread Adrian Chadd
Author: adrian
Date: Wed Jun  8 16:26:44 2016
New Revision: 301641
URL: https://svnweb.freebsd.org/changeset/base/301641

Log:
  [ath_hal] modify the xmit code to use temporary variables for setting 
qmisc/dmisc.
  
  This is in preparation for some other TDMA fixes which will hopefully
  end with having working TDMA.
  
  But, it does avoid lots of read/modify/writes in the txq setup path.

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c   Wed Jun  8 
16:21:38 2016(r301640)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c   Wed Jun  8 
16:26:44 2016(r301641)
@@ -288,6 +288,7 @@ ar9300_reset_tx_queue(struct ath_hal *ah
 const struct ieee80211_channel *chan = AH_PRIVATE(ah)->ah_curchan;
 HAL_TX_QUEUE_INFO   *qi;
 u_int32_t   cw_min, chan_cw_min, value;
+uint32_tqmisc, dmisc;
 
 if (q >= p_cap->halTotalQueues) {
 HALDEBUG(ah, HAL_DEBUG_QUEUE, "%s: invalid queue num %u\n", __func__, 
q);
@@ -335,17 +336,15 @@ ar9300_reset_tx_queue(struct ath_hal *ah
 SM(qi->tqi_shretry, AR_D_RETRY_LIMIT_FR_SH));
 
 /* enable early termination on the QCU */
-OS_REG_WRITE(ah, AR_QMISC(q), AR_Q_MISC_DCU_EARLY_TERM_REQ);
+qmisc = AR_Q_MISC_DCU_EARLY_TERM_REQ;
 
 /* enable DCU to wait for next fragment from QCU  */
 if (AR_SREV_WASP(ah) && (AH_PRIVATE((ah))->ah_macRev <= 
AR_SREV_REVISION_WASP_12)) {
 /* WAR for EV#85395: Wasp Rx overrun issue - reduces Tx queue backoff 
  * threshold to 1 to avoid Rx overruns - Fixed in Wasp 1.3 */
-OS_REG_WRITE(ah, AR_DMISC(q), 
-AR_D_MISC_CW_BKOFF_EN | AR_D_MISC_FRAG_WAIT_EN | 0x1);
+dmisc = AR_D_MISC_CW_BKOFF_EN | AR_D_MISC_FRAG_WAIT_EN | 0x1;
 } else {
-OS_REG_WRITE(ah, AR_DMISC(q), 
-AR_D_MISC_CW_BKOFF_EN | AR_D_MISC_FRAG_WAIT_EN | 0x2);
+dmisc = AR_D_MISC_CW_BKOFF_EN | AR_D_MISC_FRAG_WAIT_EN | 0x2;
 }
 
 /* multiqueue support */
@@ -355,11 +354,9 @@ ar9300_reset_tx_queue(struct ath_hal *ah
 SM(qi->tqi_cbrPeriod, AR_Q_CBRCFG_INTERVAL) |
 SM(qi->tqi_cbrOverflowLimit,
 AR_Q_CBRCFG_OVF_THRESH));
-OS_REG_WRITE(ah, AR_QMISC(q),
-OS_REG_READ(ah, AR_QMISC(q)) |
-AR_Q_MISC_FSP_CBR |
+qmisc |= AR_Q_MISC_FSP_CBR |
 (qi->tqi_cbrOverflowLimit ?
-AR_Q_MISC_CBR_EXP_CNTR_LIMIT_EN : 0));
+AR_Q_MISC_CBR_EXP_CNTR_LIMIT_EN : 0);
 }
 
 if (qi->tqi_readyTime && (qi->tqi_type != HAL_TX_QUEUE_CAB)) {
@@ -374,34 +371,27 @@ ar9300_reset_tx_queue(struct ath_hal *ah
 if (qi->tqi_burstTime &&
 (qi->tqi_qflags & HAL_TXQ_RDYTIME_EXP_POLICY_ENABLE))
 {
-OS_REG_WRITE(ah, AR_QMISC(q), OS_REG_READ(ah, AR_QMISC(q)) |
- AR_Q_MISC_RDYTIME_EXP_POLICY);
+qmisc |= AR_Q_MISC_RDYTIME_EXP_POLICY;
 }
 
 if (qi->tqi_qflags & HAL_TXQ_BACKOFF_DISABLE) {
-OS_REG_WRITE(ah, AR_DMISC(q), OS_REG_READ(ah, AR_DMISC(q)) |
-AR_D_MISC_POST_FR_BKOFF_DIS);
+dmisc |= AR_D_MISC_POST_FR_BKOFF_DIS;
 }
 
 if (qi->tqi_qflags & HAL_TXQ_FRAG_BURST_BACKOFF_ENABLE) {
-OS_REG_WRITE(ah, AR_DMISC(q), OS_REG_READ(ah, AR_DMISC(q)) |
-AR_D_MISC_FRAG_BKOFF_EN);
+dmisc |= AR_D_MISC_FRAG_BKOFF_EN;
 }
 
 switch (qi->tqi_type) {
 case HAL_TX_QUEUE_BEACON:   /* beacon frames */
-OS_REG_WRITE(ah, AR_QMISC(q),
-OS_REG_READ(ah, AR_QMISC(q))
-| AR_Q_MISC_FSP_DBA_GATED
+qmisc |= AR_Q_MISC_FSP_DBA_GATED
 | AR_Q_MISC_BEACON_USE
-| AR_Q_MISC_CBR_INCR_DIS1);
+| AR_Q_MISC_CBR_INCR_DIS1;
 
-OS_REG_WRITE(ah, AR_DMISC(q),
-OS_REG_READ(ah, AR_DMISC(q))
-| (AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL <<
+dmisc |= (AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL <<
 AR_D_MISC_ARB_LOCKOUT_CNTRL_S)
 | AR_D_MISC_BEACON_USE
-| AR_D_MISC_POST_FR_BKOFF_DIS);
+| AR_D_MISC_POST_FR_BKOFF_DIS;
 /* XXX cwmin and cwmax should be 0 for beacon queue */
 if (AH_PRIVATE(ah)->ah_opmode != HAL_M_IBSS) {
 OS_REG_WRITE(ah, AR_DLCL_IFS(q), SM(0, AR_D_LCL_IFS_CWMIN)
@@ -416,11 +406,9 @@ ar9300_reset_tx_queue(struct ath_hal *ah
  * not properly refreshing the Tx descriptor if
  * the TXE clear setting is used.
  */
-OS_REG_WRITE(ah, AR_QMISC(q),
-OS_REG_READ(ah, AR_QMISC(q))
-| AR_Q_MISC_FSP_DBA_GATED
+qmisc |= AR_Q_MISC_FSP_DBA_GATED
 | A

svn commit: r301640 - head/sys/contrib/dev/ath/ath_hal/ar9300

2016-06-08 Thread Adrian Chadd
Author: adrian
Date: Wed Jun  8 16:21:38 2016
New Revision: 301640
URL: https://svnweb.freebsd.org/changeset/base/301640

Log:
  [ath_hal] add a _S so FSP (frame scheduling policy) can be set/read via SM/MS 
macros.

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h Wed Jun  8 16:10:34 
2016(r301639)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h Wed Jun  8 16:21:38 
2016(r301640)
@@ -506,6 +506,7 @@
 #define AR_Q0_MISCAR_MAC_QCU_OFFSET(MAC_QCU_MISC)
 #define AR_QMISC(_i)  (AR_Q0_MISC + ((_i)<<2))
 #define AR_Q_MISC_FSP 0x000F // Mask for Frame 
Scheduling Policy
+#define AR_Q_MISC_FSP_S   0
 #define AR_Q_MISC_FSP_ASAP0  // ASAP
 #define AR_Q_MISC_FSP_CBR 1  // CBR
 #define AR_Q_MISC_FSP_DBA_GATED   2  // DMA Beacon Alert gated
___
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: r301639 - head/sys/contrib/dev/ath/ath_hal/ar9300

2016-06-08 Thread Adrian Chadd
Author: adrian
Date: Wed Jun  8 16:10:34 2016
New Revision: 301639
URL: https://svnweb.freebsd.org/changeset/base/301639

Log:
  [ath_hal] correctly initialise the CAB queue default value
  
  * Allow readyTime to just be programmed in directly
  * The beacon interval and all of the beacon timing sysctl's are in TU,
not TSF.  So, we were doing the wrong math on the CAB programming
in the first place.

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c   Wed Jun  8 
16:08:05 2016(r301638)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c   Wed Jun  8 
16:10:34 2016(r301639)
@@ -422,11 +422,29 @@ ar9300_reset_tx_queue(struct ath_hal *ah
 | AR_Q_MISC_CBR_INCR_DIS1
 | AR_Q_MISC_CBR_INCR_DIS0);
 
-value = TU_TO_USEC(qi->tqi_readyTime)
-- (ah->ah_config.ah_sw_beacon_response_time
--  ah->ah_config.ah_dma_beacon_response_time)
-- ah->ah_config.ah_additional_swba_backoff;
-OS_REG_WRITE(ah, AR_QRDYTIMECFG(q), value | AR_Q_RDYTIMECFG_EN);
+if (qi->tqi_readyTime) {
+OS_REG_WRITE(ah, AR_QRDYTIMECFG(q),
+  SM(qi->tqi_readyTime, AR_Q_RDYTIMECFG_DURATION) |
+  AR_Q_RDYTIMECFG_EN);
+} else {
+
+value = (ahp->ah_beaconInterval * 50 / 100)
+  - ah->ah_config.ah_additional_swba_backoff
+  - ah->ah_config.ah_sw_beacon_response_time
+  + ah->ah_config.ah_dma_beacon_response_time;
+/*
+ * XXX Ensure it isn't too low - nothing lower
+ * XXX than 10 TU
+ */
+if (value < 10)
+value = 10;
+HALDEBUG(ah, HAL_DEBUG_TXQUEUE,
+  "%s: defaulting to rdytime = %d uS\n",
+  __func__, value);
+OS_REG_WRITE(ah, AR_QRDYTIMECFG(q),
+  SM(TU_TO_USEC(value), AR_Q_RDYTIMECFG_DURATION) |
+  AR_Q_RDYTIMECFG_EN);
+}
 
 OS_REG_WRITE(ah, AR_DMISC(q), OS_REG_READ(ah, AR_DMISC(q))
 | (AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL <<
___
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: r301577 - stable/10/etc/periodic/daily

2016-06-08 Thread Andrey Chernov
The code still is called only if $daily_ntpd_leapfile_enable is YES and
it is NO by default.

On 08.06.2016 6:08, Cy Schubert wrote:
> Author: cy
> Date: Wed Jun  8 03:08:37 2016
> New Revision: 301577
> URL: https://svnweb.freebsd.org/changeset/base/301577
> 
> Log:
>   MFC r301102:
>   
>   Don't rely on $ntpd_enable to periodically fetch the latest leapfile.
>   
>   Suggested by:   cperciva
> 
> Modified:
>   stable/10/etc/periodic/daily/480.leapfile-ntpd
> Directory Properties:
>   stable/10/   (props changed)
> 
> Modified: stable/10/etc/periodic/daily/480.leapfile-ntpd
> ==
> --- stable/10/etc/periodic/daily/480.leapfile-ntpdWed Jun  8 02:39:10 
> 2016(r301576)
> +++ stable/10/etc/periodic/daily/480.leapfile-ntpdWed Jun  8 03:08:37 
> 2016(r301577)
> @@ -16,10 +16,10 @@ case "$daily_ntpd_leapfile_enable" in
>   case "$daily_ntpd_avoid_congestion" in
>   [Yy][Ee][Ss])
>   # Avoid dogpiling
> - (sleep $(jot -r 1 0 86400); service ntpd fetch) &
> + (sleep $(jot -r 1 0 86400); service ntpd onefetch) &
>   ;;
>   *)
> - service ntpd fetch
> + service ntpd onefetch
>   ;;
>   esac
>   ;;
> 

___
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: r301638 - head/sys/contrib/dev/ath/ath_hal/ar9300

2016-06-08 Thread Adrian Chadd
Author: adrian
Date: Wed Jun  8 16:08:05 2016
New Revision: 301638
URL: https://svnweb.freebsd.org/changeset/base/301638

Log:
  [ath_hal] initialise ah_beaconInterval when the AP/IBSS/TDMA beacon is setup.

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.hWed Jun  8 16:03:04 
2016(r301637)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.hWed Jun  8 16:08:05 
2016(r301638)
@@ -898,6 +898,8 @@ struct ath_hal_9300 {
 struct ar9300NfLimits nf_2GHz;
 struct ar9300NfLimits nf_5GHz;
 struct ar9300NfLimits *nfp;
+
+uint32_t ah_beaconInterval;
 };
 
 #define AH9300(_ah) ((struct ath_hal_9300 *)(_ah))

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.cWed Jun  8 
16:03:04 2016(r301637)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.cWed Jun  8 
16:08:05 2016(r301638)
@@ -774,8 +774,7 @@ ar9300_beacon_set_beacon_timers(struct a
OS_REG_WRITE(ah, AR_NEXT_NDP_TIMER, TU_TO_USEC(bt->bt_nextatim));
 
bperiod = TU_TO_USEC(bt->bt_intval & HAL_BEACON_PERIOD);
-   /* XXX TODO! */
-//ahp->ah_beaconInterval = bt->bt_intval & HAL_BEACON_PERIOD;
+   AH9300(ah)->ah_beaconInterval = bt->bt_intval & HAL_BEACON_PERIOD;
OS_REG_WRITE(ah, AR_BEACON_PERIOD, bperiod);
OS_REG_WRITE(ah, AR_DMA_BEACON_PERIOD, bperiod);
OS_REG_WRITE(ah, AR_SWBA_PERIOD, bperiod);
___
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: r301636 - stable/10/usr.sbin/rpcbind

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 15:41:39 2016
New Revision: 301636
URL: https://svnweb.freebsd.org/changeset/base/301636

Log:
  MFC r300867,r300932,r300934,r300941,r300972,r300973:
  
  r300867:
  
  Only expose `hint_uaddr` in the ND_DEBUG case
  
  This fixes a -Wunused-but-set-variable warning with gcc
  
  r300932:
  
  Catch malloc(3) errors and socket(2) errors
  
  - malloc failing will result in a delayed segfault
  - socket failing will result in delayed failures with setsockopt
  
  Exit in the event that either of these high-level conditions are met.
  
  CID: 976288, 976321, 976858
  
  r300934:
  
  Plug leak with ifp by calling freeifaddrs after calling getifaddrs
  
  Obtained from: NetBSD v1.18
  
  r300941:
  
  Don't leak res in network_init(..)
  
  Call freeaddrinfo on it after it's been used
  
  CID: 1225050
  
  r300972 (by markj):
  
  Fix rpcbind init after r300941.
  
  - getaddrinfo() sets res = NULL on failure and freeaddrinfo() always
dereferences its argument, so we should only free the address list after
a successful call.
  - Address a second potential leak caused by getaddrinfo(AF_INET6)
overwriting the address list returned by getaddrinfo(AF_INET).
  
  X-MFC-With:   r300941
  
  r300973:
  
  Follow up to r300932
  
  In the event MK_INET6 != no in userspace, but is disabled in the
  kernel, or if there aren't any IPv6 addresses configured in userspace
  (for lo0 and all physical interfaces), rpcbind would terminate
  immediately instead of silently failing on
  
  Skip over the IPv6 block to its respective cleanup with freeifaddrs if
  creating the socket failed instead of terminating rpcbind immediately

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

Modified: stable/10/usr.sbin/rpcbind/util.c
==
--- stable/10/usr.sbin/rpcbind/util.c   Wed Jun  8 15:38:19 2016
(r301635)
+++ stable/10/usr.sbin/rpcbind/util.c   Wed Jun  8 15:41:39 2016
(r301636)
@@ -119,7 +119,9 @@ addrmerge(struct netbuf *caller, const c
struct sockaddr_storage ss;
struct netconfig *nconf;
char *caller_uaddr = NULL;
+#ifdef ND_DEBUG
const char *hint_uaddr = NULL;
+#endif
char *ret = NULL;
int bestif_goodness;
 
@@ -140,13 +142,17 @@ addrmerge(struct netbuf *caller, const c
 */
hint_sa = NULL;
if (clnt_uaddr != NULL) {
+#ifdef ND_DEBUG
hint_uaddr = clnt_uaddr;
+#endif
if ((hint_nbp = uaddr2taddr(nconf, clnt_uaddr)) == NULL)
goto freeit;
hint_sa = hint_nbp->buf;
}
if (hint_sa == NULL || hint_sa->sa_family != caller_sa->sa_family) {
+#ifdef ND_DEBUG
hint_uaddr = caller_uaddr;
+#endif
hint_sa = caller->buf;
}
 
@@ -330,8 +336,10 @@ network_init(void)
if (local_in4 == NULL) {
if (debugging)
fprintf(stderr, "can't alloc local ip4 addr\n");
+   exit(1);
}
memcpy(local_in4, res->ai_addr, sizeof *local_in4);
+   freeaddrinfo(res);
}
 
 #ifdef INET6
@@ -345,8 +353,10 @@ network_init(void)
if (local_in6 == NULL) {
if (debugging)
fprintf(stderr, "can't alloc local ip6 addr\n");
+   exit(1);
}
memcpy(local_in6, res->ai_addr, sizeof *local_in6);
+   freeaddrinfo(res);
}
 
/*
@@ -359,6 +369,11 @@ network_init(void)
inet_pton(AF_INET6, RPCB_MULTICAST_ADDR, &mreq6.ipv6mr_multiaddr);
 
s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
+   if (s == -1) {
+   if (debugging)
+   fprintf(stderr, "couldn't create ip6 socket");
+   goto done_inet6;
+   }
 
/*
 * Loop through all interfaces. For each IPv6 multicast-capable
@@ -380,6 +395,8 @@ network_init(void)
if (debugging)
perror("setsockopt v6 multicast");
}
+done_inet6:
+   freeifaddrs(ifp);
 #endif
 
/* close(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"


svn commit: r301635 - vendor/NetBSD/bmake/20160606

2016-06-08 Thread Simon J. Gerraty
Author: sjg
Date: Wed Jun  8 15:38:19 2016
New Revision: 301635
URL: https://svnweb.freebsd.org/changeset/base/301635

Log:
  tag bmake-20160606

Added:
  vendor/NetBSD/bmake/20160606/
 - copied from r301634, vendor/NetBSD/bmake/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: r301634 - vendor/NetBSD/bmake/dist

2016-06-08 Thread Simon J. Gerraty
Author: sjg
Date: Wed Jun  8 15:38:06 2016
New Revision: 301634
URL: https://svnweb.freebsd.org/changeset/base/301634

Log:
  Import bmake-20160606
  
  From ChangeLog:
  
o dir.c: extend mtimes cache to others via cached_stat()

Modified:
  vendor/NetBSD/bmake/dist/ChangeLog
  vendor/NetBSD/bmake/dist/Makefile
  vendor/NetBSD/bmake/dist/README
  vendor/NetBSD/bmake/dist/config.h.in
  vendor/NetBSD/bmake/dist/configure
  vendor/NetBSD/bmake/dist/configure.in
  vendor/NetBSD/bmake/dist/dir.c
  vendor/NetBSD/bmake/dist/hash.h
  vendor/NetBSD/bmake/dist/main.c
  vendor/NetBSD/bmake/dist/make.h
  vendor/NetBSD/bmake/dist/meta.c

Modified: vendor/NetBSD/bmake/dist/ChangeLog
==
--- vendor/NetBSD/bmake/dist/ChangeLog  Wed Jun  8 15:09:07 2016
(r301633)
+++ vendor/NetBSD/bmake/dist/ChangeLog  Wed Jun  8 15:38:06 2016
(r301634)
@@ -1,3 +1,9 @@
+2016-06-06  Simon J. Gerraty  
+
+   * Makefile (_MAKE_VERSION): 20160606
+ Merge with NetBSD make, pick up
+ o dir.c: extend mtimes cache to others via cached_stat()
+
 2016-06-04  Simon J. Gerraty  
 
* Makefile (_MAKE_VERSION): 20160604

Modified: vendor/NetBSD/bmake/dist/Makefile
==
--- vendor/NetBSD/bmake/dist/Makefile   Wed Jun  8 15:09:07 2016
(r301633)
+++ vendor/NetBSD/bmake/dist/Makefile   Wed Jun  8 15:38:06 2016
(r301634)
@@ -1,7 +1,7 @@
-#  $Id: Makefile,v 1.66 2016/06/04 22:21:15 sjg Exp $
+#  $Id: Makefile,v 1.67 2016/06/07 00:46:12 sjg Exp $
 
 # Base version on src date
-_MAKE_VERSION= 20160604
+_MAKE_VERSION= 20160606
 
 PROG=  bmake
 

Modified: vendor/NetBSD/bmake/dist/README
==
--- vendor/NetBSD/bmake/dist/README Wed Jun  8 15:09:07 2016
(r301633)
+++ vendor/NetBSD/bmake/dist/README Wed Jun  8 15:38:06 2016
(r301634)
@@ -1,47 +1,52 @@
   bmake
+  *
 
-This directory contains a port of the BSD make tool (from NetBSD)
-I have run it on SunOS,Solaris,HP-UX,AIX,IRIX,FreeBSD and Linux.
+This directory contains a port of the BSD make tool (from NetBSD).
+Since 1993 I have run it on AIX, BSDi, Darwin, FreeBSD, HP-UX, IRIX,
+Linux, Minix, OSF, Solaris, SunOS and even UTS.
+Others have run it on many more systems.
 
-Version 3 was re-worked from scratch to better facilitate
-importing newer make(1) versions from NetBSD.  The original code base
-was NetBSD-1.0, so version 3 was built by doing a fresh import of the
-NetBSD-1.0 usr.bin/make, adding the autoconf and other portability
-patches to sync it with bmake v2, and then NetBSD's make 
-of Feb 20, 2000 was imported and conflicts dealt with.
-NetBSD's make was again imported on June 6 and December 15, 2000.
+Currently each release is tested on NetBSD, FreeBSD, Solaris and Linux.
 
-In 2003 bmake switched to a date based version (first was 20030714)
+Since 2003 bmake switched to a date based version (first was 20030714)
 which generally represents the date it was last merged with NetBSD's
 make.  Since then, NetBSD's make is imported within a week of any
 interesting changes, so that bmake tracks it very closely.
 
-Building:
+Building
+
 
-The preferred way to bootstrap bmake is:
+The preferred way to bootstrap bmake is::
 
-./bmake/boot-strap
+   ./bmake/boot-strap
 
 there are a number of args - most of which get passed to configure,
 eg.
+::
 
-./bmake/boot-strap --prefix=/opt
+   ./bmake/boot-strap --prefix=/opt
 
 see the boot-strap script for details.
 
+For folk that hate to read anything, since 20121212 you can also use
+the GNU standard process of::
+
+   ./configure; make; make install
+
 To make much use of bmake you will need the bsd.*.mk macros or my
-portable *.mk macros.  See 
+portable *.mk macros which are included with bmake since 20121212
+and separately available from
 http://www.crufty.net/ftp/pub/sjg/mk.tar.gz
 which will be links to the latest versions.
 
-On a non-BSD system, you would want to unpack mk[-mmdd].tar.gz in
-the same directory as bmake (so ./mk and ./bmake exist), and
-./bmake/boot-strap will do the rest.
+Porting
+===
+
+If you encounter a system that bmake does not build or work on *out of
+the box*, I welcome patches.
+If you can provide access to a suitable machine - even better.
 
-If you want to do it all by hand then read boot-strap first to get the
-idea.
+More info can be found at http://www.crufty.net/help/sjg/bmake.htm
 
-Even if you have an earlier version of bmake installed, use boot-strap
-to ensure that all goes well.
+--sjg 
 
---sjg

Modified: vendor/NetBSD/bmake/dist/config.h.in
==
--- vendor/NetBSD/bmake/dist/config.h.inWed Jun  8 15:09:07 2016
(r301633)

Re: svn commit: r301632 - in head/sys/dev: flash mii

2016-06-08 Thread Baptiste Daroussin
On Wed, Jun 08, 2016 at 02:22:16PM +, Baptiste Daroussin wrote:
> Author: bapt
> Date: Wed Jun  8 14:22:16 2016
> New Revision: 301632
> URL: https://svnweb.freebsd.org/changeset/base/301632
> 
> Log:
>   Add support for Atmel at25df641 flash
>   
>   Submitted by:   Grégory Soutadé  (via github pull 
> request)
> 
Sorry I mixed 2 commits by accident, so this commits also includes:

Add support for PHY LAN8700 using the same driver as PHY LAN8710A

Best regards,
Bapt


signature.asc
Description: PGP signature


svn commit: r301631 - head/release/doc/en_US.ISO8859-1/relnotes

2016-06-08 Thread Steven Kreuzer
Author: skreuzer (doc,ports committer)
Date: Wed Jun  8 14:21:48 2016
New Revision: 301631
URL: https://svnweb.freebsd.org/changeset/base/301631

Log:
  Document 300880, Leading spaces are stripped from SCSI disk serial numbers
  
  Approved by:  re (gjb, implicit, relnotes)

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Wed Jun  8 
14:20:54 2016(r301630)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Wed Jun  8 
14:21:48 2016(r301631)
@@ -1517,6 +1517,13 @@
TRIM/UNMAP support on
GELI-backed SSD storage
providers.
+
+  
+   Leading spaces are now stripped off SCSI disk serial
+   numbers when populating the CAM serial number. This affects the output 
of
+   &man.diskinfo.8; and the names of 
/dev/diskid/DISK-*
+   device nodes, among other things.
+
 
 
 
___
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: r301628 - head/sys/dev/cxgbe

2016-06-08 Thread Navdeep Parhar
Author: np
Date: Wed Jun  8 14:15:29 2016
New Revision: 301628
URL: https://svnweb.freebsd.org/changeset/base/301628

Log:
  cxgbe(4): Add a sysctl to manage the binding of a txq to a traffic class.
  
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/adapter.h
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/adapter.h
==
--- head/sys/dev/cxgbe/adapter.hWed Jun  8 14:07:43 2016
(r301627)
+++ head/sys/dev/cxgbe/adapter.hWed Jun  8 14:15:29 2016
(r301628)
@@ -536,6 +536,7 @@ struct sge_txq {
struct tx_sdesc *sdesc; /* KVA of software descriptor ring */
struct sglist *gl;
__be32 cpl_ctrl0;   /* for convenience */
+   int tc_idx; /* traffic class */
 
struct task tx_reclaim_task;
/* stats for common events first */

Modified: head/sys/dev/cxgbe/t4_sge.c
==
--- head/sys/dev/cxgbe/t4_sge.c Wed Jun  8 14:07:43 2016(r301627)
+++ head/sys/dev/cxgbe/t4_sge.c Wed Jun  8 14:15:29 2016(r301628)
@@ -248,6 +248,7 @@ static void drain_wrq_wr_list(struct ada
 
 static int sysctl_uint16(SYSCTL_HANDLER_ARGS);
 static int sysctl_bufsizes(SYSCTL_HANDLER_ARGS);
+static int sysctl_tc(SYSCTL_HANDLER_ARGS);
 
 static counter_u64_t extfree_refs;
 static counter_u64_t extfree_rels;
@@ -3434,6 +3435,7 @@ alloc_txq(struct vi_info *vi, struct sge
txq->cpl_ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT) |
V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_VF_VLD(1) |
V_TXPKT_VF(vi->viid));
+   txq->tc_idx = -1;
txq->sdesc = malloc(eq->sidx * sizeof(struct tx_sdesc), M_CXGBE,
M_ZERO | M_WAITOK);
 
@@ -3451,6 +3453,10 @@ alloc_txq(struct vi_info *vi, struct sge
CTLTYPE_INT | CTLFLAG_RD, &eq->pidx, 0, sysctl_uint16, "I",
"producer index");
 
+   SYSCTL_ADD_PROC(&vi->ctx, children, OID_AUTO, "tc",
+   CTLTYPE_INT | CTLFLAG_RW, vi, idx, sysctl_tc, "I",
+   "traffic class (-1 means none)");
+
SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "txcsum", CTLFLAG_RD,
&txq->txcsum, "# of times hardware assisted with checksum");
SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "vlan_insertion",
@@ -4684,3 +4690,78 @@ sysctl_bufsizes(SYSCTL_HANDLER_ARGS)
sbuf_delete(&sb);
return (rc);
 }
+
+static int
+sysctl_tc(SYSCTL_HANDLER_ARGS)
+{
+   struct vi_info *vi = arg1;
+   struct port_info *pi;
+   struct adapter *sc;
+   struct sge_txq *txq;
+   struct tx_sched_class *tc;
+   int qidx = arg2, rc, tc_idx;
+   uint32_t fw_queue, fw_class;
+
+   MPASS(qidx >= 0 && qidx < vi->ntxq);
+   pi = vi->pi;
+   sc = pi->adapter;
+   txq = &sc->sge.txq[vi->first_txq + qidx];
+
+   tc_idx = txq->tc_idx;
+   rc = sysctl_handle_int(oidp, &tc_idx, 0, req);
+   if (rc != 0 || req->newptr == NULL)
+   return (rc);
+
+   /* Note that -1 is legitimate input (it means unbind). */
+   if (tc_idx < -1 || tc_idx >= sc->chip_params->nsched_cls)
+   return (EINVAL);
+
+   rc = begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4stc");
+   if (rc)
+   return (rc);
+
+   if (tc_idx == txq->tc_idx) {
+   rc = 0; /* No change, nothing to do. */
+   goto done;
+   }
+
+   fw_queue = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) |
+   V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH) |
+   V_FW_PARAMS_PARAM_YZ(txq->eq.cntxt_id);
+
+   if (tc_idx == -1)
+   fw_class = 0x;  /* Unbind. */
+   else {
+   /*
+* Bind to a different class.  Ethernet txq's are only allowed
+* to bind to cl-rl mode-class for now.  XXX: too restrictive.
+*/
+   tc = &pi->tc[tc_idx];
+   if (tc->flags & TX_SC_OK &&
+   tc->params.level == SCHED_CLASS_LEVEL_CL_RL &&
+   tc->params.mode == SCHED_CLASS_MODE_CLASS) {
+   /* Ok to proceed. */
+   fw_class = tc_idx;
+   } else {
+   rc = tc->flags & TX_SC_OK ? EBUSY : ENXIO;
+   goto done;
+   }
+   }
+
+   rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &fw_queue, &fw_class);
+   if (rc == 0) {
+   if (txq->tc_idx != -1) {
+   tc = &pi->tc[txq->tc_idx];
+   MPASS(tc->refcount > 0);
+   tc->refcount--;
+   }
+   if (tc_idx != -1) {
+   tc = &pi->tc[tc_idx];
+   tc->refcount++;
+   }
+   txq->tc_idx = tc_idx;
+   }
+done:
+   end_synchronized_op(sc, 0);
+   return (rc);
+}

svn commit: r301632 - in head/sys/dev: flash mii

2016-06-08 Thread Baptiste Daroussin
Author: bapt
Date: Wed Jun  8 14:22:16 2016
New Revision: 301632
URL: https://svnweb.freebsd.org/changeset/base/301632

Log:
  Add support for Atmel at25df641 flash
  
  Submitted by: Grégory Soutadé  (via github pull request)

Modified:
  head/sys/dev/flash/mx25l.c
  head/sys/dev/mii/miidevs
  head/sys/dev/mii/smscphy.c

Modified: head/sys/dev/flash/mx25l.c
==
--- head/sys/dev/flash/mx25l.c  Wed Jun  8 14:21:48 2016(r301631)
+++ head/sys/dev/flash/mx25l.c  Wed Jun  8 14:22:16 2016(r301632)
@@ -130,6 +130,9 @@ struct mx25l_flash_ident flash_devices[]
{ "w25q64bv",   0xef, 0x4017, 64 * 1024, 128, FL_ERASE_4K },
{ "w25q128",0xef, 0x4018, 64 * 1024, 256, FL_ERASE_4K },
{ "w25q256",0xef, 0x4019, 64 * 1024, 512, FL_ERASE_4K },
+
+/* Atmel */
+   { "at25df641",  0x1f, 0x4800, 64 * 1024, 128, FL_ERASE_4K },
 };
 
 static uint8_t

Modified: head/sys/dev/mii/miidevs
==
--- head/sys/dev/mii/miidevsWed Jun  8 14:21:48 2016(r301631)
+++ head/sys/dev/mii/miidevsWed Jun  8 14:22:16 2016(r301632)
@@ -343,3 +343,4 @@ model xxXAQTI XMACII0x XaQti Corp.
 
 /* SMC */
 model SMC LAN8710A 0x000F SMC LAN8710A 10/100 interface
+model SMC LAN8700  0x000C SMC LAN8700  10/100 interface

Modified: head/sys/dev/mii/smscphy.c
==
--- head/sys/dev/mii/smscphy.c  Wed Jun  8 14:21:48 2016(r301631)
+++ head/sys/dev/mii/smscphy.c  Wed Jun  8 14:22:16 2016(r301632)
@@ -77,6 +77,7 @@ DRIVER_MODULE(smscphy, miibus, smscphy_d
 
 static const struct mii_phydesc smscphys[] = {
MII_PHY_DESC(SMC, LAN8710A),
+   MII_PHY_DESC(SMC, LAN8700),
MII_PHY_END
 };
 
___
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: r301630 - stable/9/lib/libc/rpc

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 14:20:54 2016
New Revision: 301630
URL: https://svnweb.freebsd.org/changeset/base/301630

Log:
  MFstable/10 r301629:
  
  MFC r300387,r300388,r300389:
  
  r300387:
  
  getnetid(..): consistently fclose fd at the end of the function
  
  This mutes a false positive with cppcheck, but also helps eliminate future
  potential issues with this variable
  
  r300388:
  
  Call endnetconfig on nc_handle sooner to avoid leaking nc_handle if tmpnconf
  was NULL
  
  This would theoretically happen if the netconfig protocol family and protocol
  semantics were never matched.
  
  CID: 978179
  
  r300389:
  
  nis_rpcent: don't leak resultbuf from yp_first(..)/yp_next(..)
  
  If the buffer couldn't be adequately resized to accomodate an additional "\n",
  it would leak resultbuf by breaking from the loop early
  
  CID: 1016702

Modified:
  stable/9/lib/libc/rpc/getrpcent.c
  stable/9/lib/libc/rpc/netnamer.c
  stable/9/lib/libc/rpc/rpcb_clnt.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/lib/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/rpc/getrpcent.c
==
--- stable/9/lib/libc/rpc/getrpcent.c   Wed Jun  8 14:18:47 2016
(r301629)
+++ stable/9/lib/libc/rpc/getrpcent.c   Wed Jun  8 14:20:54 2016
(r301630)
@@ -512,6 +512,7 @@ nis_rpcent(void *retval, void *mdata, va
sizeof(char *)) {
*errnop = ERANGE;
rv = NS_RETURN;
+   free(resultbuf);
break;
}
 
@@ -521,6 +522,7 @@ nis_rpcent(void *retval, void *mdata, va
if (aliases_size < 1) {
*errnop = ERANGE;
rv = NS_RETURN;
+   free(resultbuf);
break;
}
 

Modified: stable/9/lib/libc/rpc/netnamer.c
==
--- stable/9/lib/libc/rpc/netnamer.cWed Jun  8 14:18:47 2016
(r301629)
+++ stable/9/lib/libc/rpc/netnamer.cWed Jun  8 14:20:54 2016
(r301630)
@@ -253,6 +253,9 @@ getnetid(key, ret)
char   *lookup;
int len;
 #endif
+   int rv;
+
+   rv = 0;
 
fd = fopen(NETIDFILE, "r");
if (fd == NULL) {
@@ -263,13 +266,11 @@ getnetid(key, ret)
return (0);
 #endif
}
-   for (;;) {
-   if (fd == NULL)
-   return (0); /* getnetidyp brings us here */
+   while (fd != NULL) {
res = fgets(buf, sizeof(buf), fd);
if (res == NULL) {
-   fclose(fd);
-   return (0);
+   rv = 0;
+   goto done;
}
if (res[0] == '#')
continue;
@@ -292,9 +293,8 @@ getnetid(key, ret)
lookup[len] = 0;
strcpy(ret, lookup);
free(lookup);
-   if (fd != NULL)
-   fclose(fd);
-   return (2);
+   rv = 2;
+   goto done;
 #else  /* YP */
 #ifdef DEBUG
fprintf(stderr,
@@ -320,10 +320,14 @@ getnetid(key, ret)
}
if (strcmp(mkey, key) == 0) {
strcpy(ret, mval);
-   fclose(fd);
-   return (1);
-
+   rv = 1;
+   goto done;
}
}
}
+
+done:
+   if (fd != NULL)
+   fclose(fd);
+   return (rv);
 }

Modified: stable/9/lib/libc/rpc/rpcb_clnt.c
==
--- stable/9/lib/libc/rpc/rpcb_clnt.c   Wed Jun  8 14:18:47 2016
(r301629)
+++ stable/9/lib/libc/rpc/rpcb_clnt.c   Wed Jun  8 14:20:54 2016
(r301630)
@@ -508,6 +508,7 @@ try_nconf:
hostname = IN6_LOCALHOST_STRING;
}
}
+   endnetconfig(nc_handle);
if (tmpnconf == NULL) {
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
mutex_unlock(&loopnconf_lock);
@@ -515,7 +516,6 @@ try_nconf:
}
loopnconf = getnetconfigent(tmpnconf->nc_netid);
/* loopnconf is never freed */
-   endnetconfig(nc_handle);
}
mutex_unlock(&loopnconf_lock);
client = getclnthandle(hostname, loopnconf, NULL);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscrib

svn commit: r301629 - stable/10/lib/libc/rpc

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 14:18:47 2016
New Revision: 301629
URL: https://svnweb.freebsd.org/changeset/base/301629

Log:
  MFC r300387,r300388,r300389:
  
  r300387:
  
  getnetid(..): consistently fclose fd at the end of the function
  
  This mutes a false positive with cppcheck, but also helps eliminate future
  potential issues with this variable
  
  r300388:
  
  Call endnetconfig on nc_handle sooner to avoid leaking nc_handle if tmpnconf
  was NULL
  
  This would theoretically happen if the netconfig protocol family and protocol
  semantics were never matched.
  
  CID: 978179
  
  r300389:
  
  nis_rpcent: don't leak resultbuf from yp_first(..)/yp_next(..)
  
  If the buffer couldn't be adequately resized to accomodate an additional "\n",
  it would leak resultbuf by breaking from the loop early
  
  CID: 1016702

Modified:
  stable/10/lib/libc/rpc/getrpcent.c
  stable/10/lib/libc/rpc/netnamer.c
  stable/10/lib/libc/rpc/rpcb_clnt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/rpc/getrpcent.c
==
--- stable/10/lib/libc/rpc/getrpcent.c  Wed Jun  8 14:15:29 2016
(r301628)
+++ stable/10/lib/libc/rpc/getrpcent.c  Wed Jun  8 14:18:47 2016
(r301629)
@@ -512,6 +512,7 @@ nis_rpcent(void *retval, void *mdata, va
sizeof(char *)) {
*errnop = ERANGE;
rv = NS_RETURN;
+   free(resultbuf);
break;
}
 
@@ -521,6 +522,7 @@ nis_rpcent(void *retval, void *mdata, va
if (aliases_size < 1) {
*errnop = ERANGE;
rv = NS_RETURN;
+   free(resultbuf);
break;
}
 

Modified: stable/10/lib/libc/rpc/netnamer.c
==
--- stable/10/lib/libc/rpc/netnamer.c   Wed Jun  8 14:15:29 2016
(r301628)
+++ stable/10/lib/libc/rpc/netnamer.c   Wed Jun  8 14:18:47 2016
(r301629)
@@ -253,6 +253,9 @@ getnetid(key, ret)
char   *lookup;
int len;
 #endif
+   int rv;
+
+   rv = 0;
 
fd = fopen(NETIDFILE, "r");
if (fd == NULL) {
@@ -263,13 +266,11 @@ getnetid(key, ret)
return (0);
 #endif
}
-   for (;;) {
-   if (fd == NULL)
-   return (0); /* getnetidyp brings us here */
+   while (fd != NULL) {
res = fgets(buf, sizeof(buf), fd);
if (res == NULL) {
-   fclose(fd);
-   return (0);
+   rv = 0;
+   goto done;
}
if (res[0] == '#')
continue;
@@ -292,9 +293,8 @@ getnetid(key, ret)
lookup[len] = 0;
strcpy(ret, lookup);
free(lookup);
-   if (fd != NULL)
-   fclose(fd);
-   return (2);
+   rv = 2;
+   goto done;
 #else  /* YP */
 #ifdef DEBUG
fprintf(stderr,
@@ -320,10 +320,14 @@ getnetid(key, ret)
}
if (strcmp(mkey, key) == 0) {
strcpy(ret, mval);
-   fclose(fd);
-   return (1);
-
+   rv = 1;
+   goto done;
}
}
}
+
+done:
+   if (fd != NULL)
+   fclose(fd);
+   return (rv);
 }

Modified: stable/10/lib/libc/rpc/rpcb_clnt.c
==
--- stable/10/lib/libc/rpc/rpcb_clnt.c  Wed Jun  8 14:15:29 2016
(r301628)
+++ stable/10/lib/libc/rpc/rpcb_clnt.c  Wed Jun  8 14:18:47 2016
(r301629)
@@ -508,6 +508,7 @@ try_nconf:
hostname = IN6_LOCALHOST_STRING;
}
}
+   endnetconfig(nc_handle);
if (tmpnconf == NULL) {
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
mutex_unlock(&loopnconf_lock);
@@ -515,7 +516,6 @@ try_nconf:
}
loopnconf = getnetconfigent(tmpnconf->nc_netid);
/* loopnconf is never freed */
-   endnetconfig(nc_handle);
}
mutex_unlock(&loopnconf_lock);
client = getclnthandle(hostname, loopnconf, 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: r301627 - stable/10/bin/ls/tests

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 14:07:43 2016
New Revision: 301627
URL: https://svnweb.freebsd.org/changeset/base/301627

Log:
  MFC r300939:
  
  Use require.progs with bc instead of require.files with /usr/bin/bc
  
  This will make things more flexible if the program path changes in the future,
  and the test in and of itself doesn't call /usr/bin/bc -- it just calls bc

Modified:
  stable/10/bin/ls/tests/ls_tests.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/ls/tests/ls_tests.sh
==
--- stable/10/bin/ls/tests/ls_tests.sh  Wed Jun  8 14:06:34 2016
(r301626)
+++ stable/10/bin/ls/tests/ls_tests.sh  Wed Jun  8 14:07:43 2016
(r301627)
@@ -535,7 +535,7 @@ atf_test_case h_flag
 h_flag_head()
 {
atf_set "descr" "Verify that -h prints out the humanized units for file 
sizes with ls -l"
-   atf_set "require.files" "/usr/bin/bc"
+   atf_set "require.progs" "bc"
 }
 
 h_flag_body()
___
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: r301626 - stable/10/tools/build/mk

2016-06-08 Thread Garrett Cooper
Author: ngie
Date: Wed Jun  8 14:06:34 2016
New Revision: 301626
URL: https://svnweb.freebsd.org/changeset/base/301626

Log:
  MFC r300938:
  
  Remove the sa(8) tests if MK_ACCT == no when "make delete-old" is run
  
  sa(8) is conditionally installed based on MK_ACCT != no today

Modified:
  stable/10/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/10/tools/build/mk/OptionalObsoleteFiles.inc  Wed Jun  8 14:05:08 
2016(r301625)
+++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc  Wed Jun  8 14:06:34 
2016(r301626)
@@ -12,6 +12,33 @@ OLD_FILES+=usr/sbin/accton
 OLD_FILES+=usr/sbin/sa
 OLD_FILES+=usr/share/man/man8/accton.8.gz
 OLD_FILES+=usr/share/man/man8/sa.8.gz
+OLD_FILES+=usr/tests/usr.sbin/sa/Kyuafile
+OLD_FILES+=usr/tests/usr.sbin/sa/legacy_test
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-amd64-sav.in
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-amd64-sav.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-amd64-u.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-amd64-usr.in
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-amd64-usr.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-i386-sav.in
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-i386-sav.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-i386-u.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-i386-usr.in
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-i386-usr.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-sav.in
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-sav.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-u.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-usr.in
+OLD_FILES+=usr/tests/usr.sbin/sa/v1-sparc64-usr.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v2-amd64-sav.in
+OLD_FILES+=usr/tests/usr.sbin/sa/v2-amd64-u.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v2-amd64-usr.in
+OLD_FILES+=usr/tests/usr.sbin/sa/v2-i386-sav.in
+OLD_FILES+=usr/tests/usr.sbin/sa/v2-i386-u.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v2-i386-usr.in
+OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-sav.in
+OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-u.out
+OLD_FILES+=usr/tests/usr.sbin/sa/v2-sparc64-usr.in
+OLD_FILES+=usr/tests/usr.sbin/sa
 .endif
 
 .if ${MK_ACPI} == no
___
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   >