Re: svn commit: r290603 - in head/sys: net netgraph netinet

2015-11-14 Thread Alexander V . Chernikov
14.11.2015, 01:54, "Gleb Smirnoff" :
>   Alexander,
>
> On Mon, Nov 09, 2015 at 10:11:15AM +, Alexander V. Chernikov wrote:
> A> Author: melifaro
> A> Date: Mon Nov 9 10:11:14 2015
> A> New Revision: 290603
> A> URL: https://svnweb.freebsd.org/changeset/base/290603
> A>
> A> Log:
> A> Use lladdr_event to propagate gratiotus arp.
> A>
> A> Differential Revision: https://reviews.freebsd.org/D4019
>
> Looking into a diff a lame question emerges: why can't the call
> to EVENTHANDLER_INVOKE() moved right into the end of the
> if_setlladdr()?
Well, initially (in r202588) it was not done due to "risk of the loop" (there 
was no lagg handler taskqueue).
It was not possible until r290239 due to strange lagg(4) logic where 
eventhandler was not always called after if_setlladdr()).
It is possible now. I simply forgot to convert D4019 back to 
EVENTHANDLER_INVOKE() being inside if_setlladdr() after if_lagg(4) changes.
Will commit soon, thanks for the suggestion.
>
> A> Modified:
> A> head/sys/net/if.c
> A> head/sys/net/if_vlan.c
> A> head/sys/netgraph/ng_eiface.c
> A> head/sys/netgraph/ng_ether.c
> A> head/sys/netinet/if_ether.c
> A>
> A> Modified: head/sys/net/if.c
> A> 
> ==
> A> --- head/sys/net/if.c Mon Nov 9 09:39:59 2015 (r290602)
> A> +++ head/sys/net/if.c Mon Nov 9 10:11:14 2015 (r290603)
> A> @@ -2512,7 +2512,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp,
> A> return (error);
> A> error = if_setlladdr(ifp,
> A> ifr->ifr_addr.sa_data, ifr->ifr_addr.sa_len);
> A> - EVENTHANDLER_INVOKE(iflladdr_event, ifp);
> A> + if (error == 0)
> A> + EVENTHANDLER_INVOKE(iflladdr_event, ifp);
> A> break;
> A>
> A> case SIOCAIFGROUP:
> A> @@ -3375,16 +3376,6 @@ if_setlladdr(struct ifnet *ifp, const u_
> A> ifr.ifr_flagshigh = ifp->if_flags >> 16;
> A> (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t));
> A> }
> A> -#ifdef INET
> A> - /*
> A> - * Also send gratuitous ARPs to notify other nodes about
> A> - * the address change.
> A> - */
> A> - TAILQ_FOREACH(ifa, >if_addrhead, ifa_link) {
> A> - if (ifa->ifa_addr->sa_family == AF_INET)
> A> - arp_ifinit(ifp, ifa);
> A> - }
> A> -#endif
> A> }
> A> return (0);
> A> }
> A>
> A> Modified: head/sys/net/if_vlan.c
> A> 
> ==
> A> --- head/sys/net/if_vlan.c Mon Nov 9 09:39:59 2015 (r290602)
> A> +++ head/sys/net/if_vlan.c Mon Nov 9 10:11:14 2015 (r290603)
> A> @@ -523,7 +523,7 @@ vlan_iflladdr(void *arg __unused, struct
> A> #ifndef VLAN_ARRAY
> A> struct ifvlan *next;
> A> #endif
> A> - int i;
> A> + int error, i;
> A>
> A> /*
> A> * Check if it's a trunk interface first of all
> A> @@ -544,8 +544,11 @@ vlan_iflladdr(void *arg __unused, struct
> A> LIST_FOREACH_SAFE(ifv, >if_vlantrunk->hash[i], ifv_list, next) {
> A> #endif /* VLAN_ARRAY */
> A> VLAN_UNLOCK();
> A> - if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp),
> A> + error = if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp),
> A> ifp->if_addrlen);
> A> + if (error == 0)
> A> + EVENTHANDLER_INVOKE(iflladdr_event,
> A> + ifv->ifv_ifp);
> A> VLAN_LOCK();
> A> }
> A> VLAN_UNLOCK();
> A>
> A> Modified: head/sys/netgraph/ng_eiface.c
> A> 
> ==
> A> --- head/sys/netgraph/ng_eiface.c Mon Nov 9 09:39:59 2015 (r290602)
> A> +++ head/sys/netgraph/ng_eiface.c Mon Nov 9 10:11:14 2015 (r290603)
> A> @@ -489,7 +489,8 @@ ng_eiface_rcvmsg(node_p node, item_p ite
> A> }
> A> error = if_setlladdr(priv->ifp,
> A> (u_char *)msg->data, ETHER_ADDR_LEN);
> A> - EVENTHANDLER_INVOKE(iflladdr_event, priv->ifp);
> A> + if (error == 0)
> A> + EVENTHANDLER_INVOKE(iflladdr_event, priv->ifp);
> A> break;
> A> }
> A>
> A>
> A> Modified: head/sys/netgraph/ng_ether.c
> A> 
> ==
> A> --- head/sys/netgraph/ng_ether.c Mon Nov 9 09:39:59 2015 (r290602)
> A> +++ head/sys/netgraph/ng_ether.c Mon Nov 9 10:11:14 2015 (r290603)
> A> @@ -534,7 +534,8 @@ ng_ether_rcvmsg(node_p node, item_p item
> A> }
> A> error = if_setlladdr(priv->ifp,
> A> (u_char *)msg->data, ETHER_ADDR_LEN);
> A> - EVENTHANDLER_INVOKE(iflladdr_event, priv->ifp);
> A> + if (error == 0)
> A> + EVENTHANDLER_INVOKE(iflladdr_event, priv->ifp);
> A> break;
> A> }
> A> case NGM_ETHER_GET_PROMISC:
> A>
> A> Modified: head/sys/netinet/if_ether.c
> A> 
> ==
> A> --- head/sys/netinet/if_ether.c Mon Nov 9 09:39:59 2015 (r290602)
> A> +++ head/sys/netinet/if_ether.c Mon Nov 9 10:11:14 2015 (r290603)
> A> @@ -142,7 +142,9 @@ static void in_arpinput(struct mbuf *);
> A> static void arp_check_update_lle(struct arphdr *ah, struct in_addr isaddr,
> A> struct ifnet *ifp, int bridged, struct llentry *la);
> A> static void arp_mark_lle_reachable(struct llentry *la);
> A> +static void arp_iflladdr(void *arg __unused, struct ifnet *ifp);
> A>
> 

Re: svn commit: r290809 - in stable: 10/share/man/man9 10/sys/dev/pci 9/share/man/man9 9/sys/dev/pci

2015-11-14 Thread Michal Meloun
This commit breaks installworld.

Index: share/man/man9/Makefile
===
--- share/man/man9/Makefile (revision 290818)
+++ share/man/man9/Makefile (working copy)
@@ -1032,7 +1032,7 @@
pci.9 pci_write_config.9 \
pci.9 pcie_adjust_config.9 \
pci.9 pcie_read_config.9 \
-   pci.9 pcie_write_config.9 \
+   pci.9 pcie_write_config.9
 MLINKS+=pfil.9 pfil_add_hook.9 \
pfil.9 pfil_hook_get.9 \
pfil.9 pfil_remove_hook.9


Dne 14.11.2015 v 2:06 John Baldwin napsal(a):
> Author: jhb
> Date: Sat Nov 14 01:06:45 2015
> New Revision: 290809
> URL: https://svnweb.freebsd.org/changeset/base/290809
> 
> Log:
>   MFC 290414,290415:
>   Additional PCI helper functions.
>   
>   290414:
>   Add helper routines for PCI device drivers to read, write, and modify
>   PCI-Express capability registers (that is, PCI config registers in the
>   standard PCI config space belonging to the PCI-Express capability
>   register set).
>   
>   Note that all of the current PCI-e registers are either 16 or 32-bits,
>   so only widths of 2 or 4 bytes are supported.
>   
>   290415:
>   Add a new helper function for PCI devices to locate the upstream
>   PCI-express root port of a given PCI device.
> 
> Modified:
>   stable/10/share/man/man9/Makefile
>   stable/10/share/man/man9/pci.9
>   stable/10/sys/dev/pci/pci.c
>   stable/10/sys/dev/pci/pcivar.h
> Directory Properties:
>   stable/10/   (props changed)
> 
> Changes in other areas also in this revision:
> Modified:
>   stable/9/share/man/man9/Makefile
>   stable/9/share/man/man9/pci.9
>   stable/9/sys/dev/pci/pci.c
>   stable/9/sys/dev/pci/pcivar.h
> Directory Properties:
>   stable/9/share/man/man9/   (props changed)
>   stable/9/sys/   (props changed)
>   stable/9/sys/dev/   (props changed)
> 
> Modified: stable/10/share/man/man9/Makefile
> ==
> --- stable/10/share/man/man9/Makefile Sat Nov 14 00:04:42 2015
> (r290808)
> +++ stable/10/share/man/man9/Makefile Sat Nov 14 01:06:45 2015
> (r290809)
> @@ -1014,6 +1014,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \
>   pci.9 pci_find_device.9 \
>   pci.9 pci_find_extcap.9 \
>   pci.9 pci_find_htcap.9 \
> + pci.9 pci_find_pcie_root_port.9 \
>   pci.9 pci_get_max_read_req.9 \
>   pci.9 pci_get_powerstate.9 \
>   pci.9 pci_get_vpd_ident.9 \
> @@ -1028,7 +1029,10 @@ MLINKS+=pci.9 pci_alloc_msi.9 \
>   pci.9 pci_save_state.9 \
>   pci.9 pci_set_powerstate.9 \
>   pci.9 pci_set_max_read_req.9 \
> - pci.9 pci_write_config.9
> + pci.9 pci_write_config.9 \
> + pci.9 pcie_adjust_config.9 \
> + pci.9 pcie_read_config.9 \
> + pci.9 pcie_write_config.9 \
>  MLINKS+=pfil.9 pfil_add_hook.9 \
>   pfil.9 pfil_hook_get.9 \
>   pfil.9 pfil_remove_hook.9
> 
> Modified: stable/10/share/man/man9/pci.9
> ==
> --- stable/10/share/man/man9/pci.9Sat Nov 14 00:04:42 2015
> (r290808)
> +++ stable/10/share/man/man9/pci.9Sat Nov 14 01:06:45 2015
> (r290809)
> @@ -25,7 +25,7 @@
>  .\"
>  .\" $FreeBSD$
>  .\"
> -.Dd March 5, 2012
> +.Dd November 5, 2015
>  .Dt PCI 9
>  .Os
>  .Sh NAME
> @@ -42,6 +42,7 @@
>  .Nm pci_find_device ,
>  .Nm pci_find_extcap ,
>  .Nm pci_find_htcap ,
> +.Nm pci_find_pcie_root_port ,
>  .Nm pci_get_max_read_req ,
>  .Nm pci_get_powerstate ,
>  .Nm pci_get_vpd_ident ,
> @@ -56,7 +57,10 @@
>  .Nm pci_save_state ,
>  .Nm pci_set_max_read_req ,
>  .Nm pci_set_powerstate ,
> -.Nm pci_write_config
> +.Nm pci_write_config ,
> +.Nm pcie_adjust_config ,
> +.Nm pcie_read_config ,
> +.Nm pcie_write_config
>  .Nd PCI bus interface
>  .Sh SYNOPSIS
>  .In sys/bus.h
> @@ -86,6 +90,8 @@
>  .Fn pci_find_extcap "device_t dev" "int capability" "int *capreg"
>  .Ft int
>  .Fn pci_find_htcap "device_t dev" "int capability" "int *capreg"
> +.Ft device_t
> +.Fn pci_find_pcie_root_port "device_t dev"
>  .Ft int
>  .Fn pci_get_max_read_req "device_t dev"
>  .Ft int
> @@ -116,6 +122,18 @@
>  .Fn pci_set_powerstate "device_t dev" "int state"
>  .Ft void
>  .Fn pci_write_config "device_t dev" "int reg" "uint32_t val" "int width"
> +.Ft uint32_t
> +.Fo pcie_adjust_config
> +.Fa "device_t dev"
> +.Fa "int reg"
> +.Fa "uint32_t mask"
> +.Fa "uint32_t val"
> +.Fa "int width"
> +.Fc
> +.Ft uint32_t
> +.Fn pcie_read_config "device_t dev" "int reg" "int width"
> +.Ft void
> +.Fn pcie_write_config "device_t dev" "int reg" "uint32_t val" "int width"
>  .Sh DESCRIPTION
>  The
>  .Nm
> @@ -152,6 +170,48 @@ with
>  .Fa width
>  specifying the size of the access.
>  .Pp
> +The
> +.Fn pcie_adjust_config
> +function is used to modify the value of a register in the PCI-express
> +capability register set of device
> +.Fa dev .
> +The offset
> +.Fa reg
> +specifies a relative offset in the register set with
> +.Fa width
> +specifying the 

svn commit: r290848 - head/lib/libc/tests/gen

2015-11-14 Thread Garrett Cooper
Author: ngie
Date: Sun Nov 15 05:02:41 2015
New Revision: 290848
URL: https://svnweb.freebsd.org/changeset/base/290848

Log:
  Fix -Wunused warnings
  
  MFC after: 1 week
  X-MFC with: r290572
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/tests/gen/ftw_test.c
  head/lib/libc/tests/gen/popen_test.c

Modified: head/lib/libc/tests/gen/ftw_test.c
==
--- head/lib/libc/tests/gen/ftw_test.c  Sun Nov 15 05:00:32 2015
(r290847)
+++ head/lib/libc/tests/gen/ftw_test.c  Sun Nov 15 05:02:41 2015
(r290848)
@@ -49,7 +49,6 @@ extern char **environ;
 
 static char template[] = "testftw.XX";
 static char dir[PATH_MAX];
-static int failures;
 static int ftwflags;
 
 static int

Modified: head/lib/libc/tests/gen/popen_test.c
==
--- head/lib/libc/tests/gen/popen_test.cSun Nov 15 05:00:32 2015
(r290847)
+++ head/lib/libc/tests/gen/popen_test.cSun Nov 15 05:02:41 2015
(r290848)
@@ -71,7 +71,7 @@ check_cloexec(FILE *fp, const char *mode
 ATF_TC_WITHOUT_HEAD(popen_all_modes_test);
 ATF_TC_BODY(popen_all_modes_test, tc)
 {
-   FILE *fp, *fp2;
+   FILE *fp;
int i, status;
const char *mode;
const char *allmodes[] = { "r", "w", "r+", "re", "we", "r+e", "re+" };
@@ -92,7 +92,7 @@ ATF_TC_BODY(popen_all_modes_test, tc)
 ATF_TC_WITHOUT_HEAD(popen_rmodes_test);
 ATF_TC_BODY(popen_rmodes_test, tc)
 {
-   FILE *fp, *fp2;
+   FILE *fp;
const char *rmodes[] = { "r", "r+", "re", "r+e", "re+" };
const char *mode;
char buf[80];
@@ -211,7 +211,7 @@ ATF_TC_WITHOUT_HEAD(popen_rwmodes_test);
 ATF_TC_BODY(popen_rwmodes_test, tc)
 {
const char *rwmodes[] = { "r+", "r+e", "re+" };
-   FILE *fp, *fp2;
+   FILE *fp;
const char *mode;
char *sres;
char buf[80];
___
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: r290847 - in head/contrib/netbsd-tests/lib/libc: gen regex

2015-11-14 Thread Garrett Cooper
Author: ngie
Date: Sun Nov 15 05:00:32 2015
New Revision: 290847
URL: https://svnweb.freebsd.org/changeset/base/290847

Log:
  Fix -Wunused warnings with variables used unlit code by adding appropriate 
#ifdef
  guards around the variables
  
  MFC after: 3 days
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/contrib/netbsd-tests/lib/libc/gen/t_glob.c
  head/contrib/netbsd-tests/lib/libc/regex/debug.c

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_glob.c
==
--- head/contrib/netbsd-tests/lib/libc/gen/t_glob.c Sun Nov 15 04:51:14 
2015(r290846)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_glob.c Sun Nov 15 05:00:32 
2015(r290847)
@@ -91,9 +91,11 @@ static struct gl_dir d[] = {
{ "a/b", b, __arraycount(b), 0 },
 };
 
+#ifndef __FreeBSD__
 static const char *glob_star[] = {
 "a/1", "a/3", "a/4", "a/b", "a/b/w", "a/b/x", "a/b/y", "a/b/z",
 };
+#endif
 
 static const char *glob_star_not[] = {
"a/1", "a/3", "a/4", "a/b",

Modified: head/contrib/netbsd-tests/lib/libc/regex/debug.c
==
--- head/contrib/netbsd-tests/lib/libc/regex/debug.cSun Nov 15 04:51:14 
2015(r290846)
+++ head/contrib/netbsd-tests/lib/libc/regex/debug.cSun Nov 15 05:00:32 
2015(r290847)
@@ -126,11 +126,15 @@ static void
 s_print(struct re_guts *g, FILE *d)
 {
sop *s;
+#ifdef __NetBSD__
cset *cs;
+#endif
int done = 0;
sop opnd;
int col = 0;
+#ifdef __NetBSD__
ssize_t last;
+#endif
sopno offset = 2;
 #  define  GAP()   {   if (offset % 5 == 0) { \
if (col > 40) { \
___
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: r290840 - head/etc

2015-11-14 Thread Garrett Cooper
Author: ngie
Date: Sun Nov 15 03:04:39 2015
New Revision: 290840
URL: https://svnweb.freebsd.org/changeset/base/290840

Log:
  Setup the symlink to /sys to mirror one's current source, e.g. if my source
  tree was /usr/src/svn, /sys would point to usr/src/svn
  
  This fixes the assumption that the source tree will always exist at
  ${DESTDIR}/usr/src
  
  MFC after: 1 week
  PR: 76362
  Reported by: Scot Hetzel 
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/etc/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Sun Nov 15 01:50:17 2015(r290839)
+++ head/etc/Makefile   Sun Nov 15 03:04:39 2015(r290840)
@@ -408,7 +408,7 @@ distrib-dirs: ${MTREES:N/*} distrib-clea
${METALOG.add} ; \
done; true
 .endif
-   ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys
+   ${INSTALL_SYMLINK} ${SRCTOP:C/^\///}/sys ${DESTDIR}/sys
 .if ${MK_MAN} != "no"
cd ${DESTDIR}${SHAREDIR}/man; \
for mandir in man*; do \
___
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: r290843 - head/lib/libc/tests/locale

2015-11-14 Thread Garrett Cooper
Author: ngie
Date: Sun Nov 15 04:33:14 2015
New Revision: 290843
URL: https://svnweb.freebsd.org/changeset/base/290843

Log:
  Polish up the tests a bit more after projects/collation was merged to head
  
  Provide more meaningful diagnostic messages if LC_CTYPE can't be set properly
  instead of segfaulting, because setlocale returns NULL and strcmp(NULL, b) 
will
  always segfault
  
  Split up the testcases so one failing (in this case en_US.ISO8859-15) won't
  cause the rest of the testcases to be skipped
  
  Remove some unused variables
  
  MFC after: 1 week
  X-MFC with: r290532
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/tests/locale/c16rtomb_test.c
  head/lib/libc/tests/locale/mbrtoc16_test.c

Modified: head/lib/libc/tests/locale/c16rtomb_test.c
==
--- head/lib/libc/tests/locale/c16rtomb_test.c  Sun Nov 15 03:56:09 2015
(r290842)
+++ head/lib/libc/tests/locale/c16rtomb_test.c  Sun Nov 15 04:33:14 2015
(r290843)
@@ -42,13 +42,27 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-ATF_TC_WITHOUT_HEAD(c16rtomb_test);
-ATF_TC_BODY(c16rtomb_test, tc)
+static void
+require_lc_ctype(const char *locale_name)
 {
-   mbstate_t s;
-   char buf[MB_LEN_MAX + 1];
+   char *lc_ctype_set;
 
-   /* C/POSIX locale. */
+   lc_ctype_set = setlocale(LC_CTYPE, locale_name);
+   if (lc_ctype_set == NULL)
+   atf_tc_fail("setlocale(LC_CTYPE, \"%s\") failed; errno=%d",
+   locale_name, errno);
+
+   ATF_REQUIRE(strcmp(lc_ctype_set, locale_name) == 0);
+}
+
+static mbstate_t s;
+static char buf[MB_LEN_MAX + 1];
+
+ATF_TC_WITHOUT_HEAD(c16rtomb_c_locale_test);
+ATF_TC_BODY(c16rtomb_c_locale_test, tc)
+{
+
+   require_lc_ctype("C");
 
/*
 * If the buffer argument is NULL, c16 is implicitly 0,
@@ -80,11 +94,13 @@ ATF_TC_BODY(c16rtomb_test, tc)
ATF_REQUIRE(c16rtomb(buf, 0xdca9, ) == (size_t)-1);
ATF_REQUIRE(errno == EILSEQ);
ATF_REQUIRE((unsigned char)buf[0] == 0xcc);
+}
 
-   /* ISO8859-1. */
+ATF_TC_WITHOUT_HEAD(c16rtomb_iso_8859_1_test);
+ATF_TC_BODY(c16rtomb_iso_8859_1_test, tc)
+{
 
-   ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-1"),
-   "en_US.ISO8859-1") == 0);
+   require_lc_ctype("en_US.ISO8859-1");
 
/* Unicode character 'Euro sign'. */
memset(, 0, sizeof(s));
@@ -92,21 +108,26 @@ ATF_TC_BODY(c16rtomb_test, tc)
ATF_REQUIRE(c16rtomb(buf, 0x20ac, ) == (size_t)-1);
ATF_REQUIRE(errno == EILSEQ);
ATF_REQUIRE((unsigned char)buf[0] == 0xcc);
+}
 
-   /* ISO8859-15. */
+ATF_TC_WITHOUT_HEAD(c16rtomb_iso_8859_15_test);
+ATF_TC_BODY(c16rtomb_iso_8859_15_test, tc)
+{
 
-   ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-15"),
-   "en_US.ISO8859-15") == 0);
+   require_lc_ctype("en_US.ISO8859-15");
 
/* Unicode character 'Euro sign'. */
memset(, 0, sizeof(s));
memset(buf, 0xcc, sizeof(buf));
ATF_REQUIRE(c16rtomb(buf, 0x20ac, ) == 1);
ATF_REQUIRE((unsigned char)buf[0] == 0xa4 && (unsigned char)buf[1] == 
0xcc);
+}
 
-   /* UTF-8. */
+ATF_TC_WITHOUT_HEAD(c16rtomb_utf_8_test);
+ATF_TC_BODY(c16rtomb_utf_8_test, tc)
+{
 
-   ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "en_US.UTF-8"), "en_US.UTF-8") 
== 0);
+   require_lc_ctype("en_US.UTF-8");
 
/* Unicode character 'Pile of poo'. */
memset(, 0, sizeof(s));
@@ -136,7 +157,10 @@ ATF_TC_BODY(c16rtomb_test, tc)
 ATF_TP_ADD_TCS(tp)
 {
 
-   ATF_TP_ADD_TC(tp, c16rtomb_test);
+   ATF_TP_ADD_TC(tp, c16rtomb_c_locale_test);
+   ATF_TP_ADD_TC(tp, c16rtomb_iso_8859_1_test);
+   ATF_TP_ADD_TC(tp, c16rtomb_iso_8859_15_test);
+   ATF_TP_ADD_TC(tp, c16rtomb_utf_8_test);
 
return (atf_no_error());
 }

Modified: head/lib/libc/tests/locale/mbrtoc16_test.c
==
--- head/lib/libc/tests/locale/mbrtoc16_test.c  Sun Nov 15 03:56:09 2015
(r290842)
+++ head/lib/libc/tests/locale/mbrtoc16_test.c  Sun Nov 15 04:33:14 2015
(r290843)
@@ -42,16 +42,27 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-ATF_TC_WITHOUT_HEAD(mbrtoc16_test);
-ATF_TC_BODY(mbrtoc16_test, tc)
+static void
+require_lc_ctype(const char *locale_name)
 {
-   mbstate_t s;
-   size_t len;
-   char16_t c16;
-
-   /*
-* C/POSIX locale.
-*/
+   char *lc_ctype_set;
+
+   lc_ctype_set = setlocale(LC_CTYPE, locale_name);
+   if (lc_ctype_set == NULL)
+   atf_tc_fail("setlocale(LC_CTYPE, \"%s\") failed; errno=%d",
+   locale_name, errno);
+
+   ATF_REQUIRE(strcmp(lc_ctype_set, locale_name) == 0);
+}
+
+static mbstate_t s;
+static char16_t c16;
+
+ATF_TC_WITHOUT_HEAD(mbrtoc16_c_locale_test);
+ATF_TC_BODY(mbrtoc16_c_locale_test, tc)
+{
+
+   require_lc_ctype("C");
 
/* Null wide character, 

svn commit: r290850 - head/contrib/netbsd-tests/lib/libc/rpc

2015-11-14 Thread Garrett Cooper
Author: ngie
Date: Sun Nov 15 05:19:41 2015
New Revision: 290850
URL: https://svnweb.freebsd.org/changeset/base/290850

Log:
  Cast xdr_void to xdrproc_t to mute -Wincompatible-pointer-types warnings from
  clang
  
  This pattern is used in other areas of lib/libc/rpc
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c

Modified: head/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
==
--- head/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c  Sun Nov 15 05:13:33 
2015(r290849)
+++ head/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c  Sun Nov 15 05:19:41 
2015(r290850)
@@ -73,8 +73,14 @@ onehost(const char *host, const char *tr
 
tv.tv_sec = 1;
tv.tv_usec = 0;
+#ifdef __FreeBSD__
+   if (clnt_call(clnt, RPCBPROC_NULL, (xdrproc_t)xdr_void, NULL,
+   (xdrproc_t)xdr_void, NULL, tv)
+   != RPC_SUCCESS)
+#else
if (clnt_call(clnt, RPCBPROC_NULL, xdr_void, NULL, xdr_void, NULL, tv)
!= RPC_SUCCESS)
+#endif
ERRX(EXIT_FAILURE, "clnt_call (%s)", clnt_sperror(clnt, ""));
clnt_control(clnt, CLGET_SVC_ADDR, (char *) );
reply(NULL, , 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: r290851 - in head/lib/libc/tests: . locale

2015-11-14 Thread Garrett Cooper
Author: ngie
Date: Sun Nov 15 05:21:58 2015
New Revision: 290851
URL: https://svnweb.freebsd.org/changeset/base/290851

Log:
  Change WARNS to 2 across the board with all the libc testcases
  
  This effectively "reverts" r290846
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/tests/Makefile.netbsd-tests
  head/lib/libc/tests/locale/Makefile

Modified: head/lib/libc/tests/Makefile.netbsd-tests
==
--- head/lib/libc/tests/Makefile.netbsd-tests   Sun Nov 15 05:19:41 2015
(r290850)
+++ head/lib/libc/tests/Makefile.netbsd-tests   Sun Nov 15 05:21:58 2015
(r290851)
@@ -4,4 +4,6 @@ TESTSRC:=   ${SRCTOP}/contrib/netbsd-tests
 
 TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/}
 
+WARNS?=2
+
 .include 

Modified: head/lib/libc/tests/locale/Makefile
==
--- head/lib/libc/tests/locale/Makefile Sun Nov 15 05:19:41 2015
(r290850)
+++ head/lib/libc/tests/locale/Makefile Sun Nov 15 05:21:58 2015
(r290851)
@@ -39,8 +39,6 @@ SRCS.wctomb_2_test=   wctomb_test.c
 
 CFLAGS.t_wctomb.c+=-Wno-stack-protector
 
-WARNS?=2
-
 .include "../Makefile.netbsd-tests"
 
 .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: r290853 - stable/10/usr.sbin/rtadvd

2015-11-14 Thread Xin LI
Author: delphij
Date: Sun Nov 15 07:10:02 2015
New Revision: 290853
URL: https://svnweb.freebsd.org/changeset/base/290853

Log:
  MFC r290173:
  
  Use strlcpy().

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

Modified: stable/10/usr.sbin/rtadvd/if.c
==
--- stable/10/usr.sbin/rtadvd/if.c  Sun Nov 15 06:38:38 2015
(r290852)
+++ stable/10/usr.sbin/rtadvd/if.c  Sun Nov 15 07:10:02 2015
(r290853)
@@ -359,8 +359,7 @@ update_persist_ifinfo(struct ifilist_hea
 
ELM_MALLOC(ifi, exit(1));
ifi->ifi_ifindex = 0;
-   strncpy(ifi->ifi_ifname, ifname, sizeof(ifi->ifi_ifname)-1);
-   ifi->ifi_ifname[sizeof(ifi->ifi_ifname)-1] = '\0';
+   strlcpy(ifi->ifi_ifname, ifname, sizeof(ifi->ifi_ifname));
ifi->ifi_rainfo = NULL;
ifi->ifi_state = IFI_STATE_UNCONFIGURED;
TAILQ_INSERT_TAIL(ifi_head, ifi, ifi_next);
___
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: r290854 - stable/10/usr.sbin/pw

2015-11-14 Thread Xin LI
Author: delphij
Date: Sun Nov 15 07:14:17 2015
New Revision: 290854
URL: https://svnweb.freebsd.org/changeset/base/290854

Log:
  MFC r290174:
  
  In pw_userlock, set 'name' to NULL when we encounter an all number string
  because it is also used as an indicator of whether a name or an UID is
  being used and we may have undefined results as 'name' may contain
  uninitialized stack contents.

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

Modified: stable/10/usr.sbin/pw/pw_user.c
==
--- stable/10/usr.sbin/pw/pw_user.c Sun Nov 15 07:10:02 2015
(r290853)
+++ stable/10/usr.sbin/pw/pw_user.c Sun Nov 15 07:14:17 2015
(r290854)
@@ -280,9 +280,10 @@ pw_userlock(char *arg1, int mode)
if (arg1 == NULL)
errx(EX_DATAERR, "username or id required");
 
-   if (arg1[strspn(arg1, "0123456789")] == '\0')
+   if (arg1[strspn(arg1, "0123456789")] == '\0') {
id = pw_checkid(arg1, UID_MAX);
-   else
+   name = NULL;
+   } else
name = arg1;
 
pwd = (name != NULL) ? GETPWNAM(pw_checkname(name, 0)) : GETPWUID(id);
___
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: r290844 - head/lib/libc/tests/locale

2015-11-14 Thread Garrett Cooper
Author: ngie
Date: Sun Nov 15 04:50:08 2015
New Revision: 290844
URL: https://svnweb.freebsd.org/changeset/base/290844

Log:
  Polish up iswctype_test
  
  - Split up the testcases into C locale and ja_JP.eucJP testcases.
  - Avoid a segfault in the event that setlocale fails, similar to r290843
  - Replace `sizeof(x) / sizeof(*x)` pattern with `nitems(x)`
  
  MFC after: 1 week
  X-MFC with: r290532
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/tests/locale/iswctype_test.c

Modified: head/lib/libc/tests/locale/iswctype_test.c
==
--- head/lib/libc/tests/locale/iswctype_test.c  Sun Nov 15 04:33:14 2015
(r290843)
+++ head/lib/libc/tests/locale/iswctype_test.c  Sun Nov 15 04:50:08 2015
(r290844)
@@ -34,6 +34,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -42,31 +44,45 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-ATF_TC_WITHOUT_HEAD(iswctype_test);
-ATF_TC_BODY(iswctype_test, tc)
+static void
+require_lc_ctype(const char *locale_name)
 {
-   wctype_t t;
-   int i, j;
-   struct {
-   const char *name;
-   int (*func)(wint_t);
-   } cls[] = {
-   { "alnum", iswalnum },
-   { "alpha", iswalpha },
-   { "blank", iswblank },
-   { "cntrl", iswcntrl },
-   { "digit", iswdigit },
-   { "graph", iswgraph },
-   { "lower", iswlower },
-   { "print", iswprint },
-   { "punct", iswpunct },
-   { "space", iswspace },
-   { "upper", iswupper },
-   { "xdigit", iswxdigit }
-   };
+   char *lc_ctype_set;
 
-   /* C/POSIX locale. */
-   for (i = 0; i < sizeof(cls) / sizeof(*cls); i++) {
+   lc_ctype_set = setlocale(LC_CTYPE, locale_name);
+   if (lc_ctype_set == NULL)
+   atf_tc_fail("setlocale(LC_CTYPE, \"%s\") failed; errno=%d",
+   locale_name, errno);
+
+   ATF_REQUIRE(strcmp(lc_ctype_set, locale_name) == 0);
+}
+
+static wctype_t t;
+static int i, j;
+static struct {
+   const char *name;
+   int (*func)(wint_t);
+} cls[] = {
+   { "alnum", iswalnum },
+   { "alpha", iswalpha },
+   { "blank", iswblank },
+   { "cntrl", iswcntrl },
+   { "digit", iswdigit },
+   { "graph", iswgraph },
+   { "lower", iswlower },
+   { "print", iswprint },
+   { "punct", iswpunct },
+   { "space", iswspace },
+   { "upper", iswupper },
+   { "xdigit", iswxdigit }
+};
+
+ATF_TC_WITHOUT_HEAD(iswctype_c_locale_test);
+ATF_TC_BODY(iswctype_c_locale_test, tc)
+{
+
+   require_lc_ctype("C");
+   for (i = 0; i < nitems(cls); i++) {
t = wctype(cls[i].name);
ATF_REQUIRE(t != 0);
for (j = 0; j < 256; j++)
@@ -76,10 +92,15 @@ ATF_TC_BODY(iswctype_test, tc)
ATF_REQUIRE(t == 0);
for (i = 0; i < 256; i++)
ATF_REQUIRE(iswctype(i, t) == 0);
+}
+
+ATF_TC_WITHOUT_HEAD(iswctype_euc_jp_test);
+ATF_TC_BODY(iswctype_euc_jp_test, tc)
+{
+
+   require_lc_ctype("ja_JP.eucJP");
 
-   /* Japanese (EUC) locale. */
-   ATF_REQUIRE(strcmp(setlocale(LC_CTYPE, "ja_JP.eucJP"), "ja_JP.eucJP") 
== 0);
-   for (i = 0; i < sizeof(cls) / sizeof(*cls); i++) {
+   for (i = 0; i < nitems(cls); i++) {
t = wctype(cls[i].name);
ATF_REQUIRE(t != 0);
for (j = 0; j < 65536; j++)
@@ -94,7 +115,8 @@ ATF_TC_BODY(iswctype_test, tc)
 ATF_TP_ADD_TCS(tp)
 {
 
-   ATF_TP_ADD_TC(tp, iswctype_test);
+   ATF_TP_ADD_TC(tp, iswctype_c_locale_test);
+   ATF_TP_ADD_TC(tp, iswctype_euc_jp_test);
 
return (atf_no_error());
 }
___
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: r290846 - head/lib/libc/tests/locale

2015-11-14 Thread Garrett Cooper
Author: ngie
Date: Sun Nov 15 04:51:14 2015
New Revision: 290846
URL: https://svnweb.freebsd.org/changeset/base/290846

Log:
  Bump WARNS to 2
  
  MFC after: 1 week
  X-MFC with: r290532
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/tests/locale/Makefile

Modified: head/lib/libc/tests/locale/Makefile
==
--- head/lib/libc/tests/locale/Makefile Sun Nov 15 04:50:54 2015
(r290845)
+++ head/lib/libc/tests/locale/Makefile Sun Nov 15 04:51:14 2015
(r290846)
@@ -39,6 +39,8 @@ SRCS.wctomb_2_test=   wctomb_test.c
 
 CFLAGS.t_wctomb.c+=-Wno-stack-protector
 
+WARNS?=2
+
 .include "../Makefile.netbsd-tests"
 
 .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: r290845 - head/lib/libc/tests/locale

2015-11-14 Thread Garrett Cooper
Author: ngie
Date: Sun Nov 15 04:50:54 2015
New Revision: 290845
URL: https://svnweb.freebsd.org/changeset/base/290845

Log:
  Remove unused variables; sort by alignment where needed
  
  MFC after: 1 week
  X-MFC with: r290532
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/tests/locale/mblen_test.c
  head/lib/libc/tests/locale/mbrlen_test.c
  head/lib/libc/tests/locale/mbrtowc_test.c
  head/lib/libc/tests/locale/mbtowc_test.c

Modified: head/lib/libc/tests/locale/mblen_test.c
==
--- head/lib/libc/tests/locale/mblen_test.c Sun Nov 15 04:50:08 2015
(r290844)
+++ head/lib/libc/tests/locale/mblen_test.c Sun Nov 15 04:50:54 2015
(r290845)
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
 ATF_TC_WITHOUT_HEAD(mblen_test);
 ATF_TC_BODY(mblen_test, tc)
 {
-   size_t len;
char buf[MB_LEN_MAX + 1];
 
/*

Modified: head/lib/libc/tests/locale/mbrlen_test.c
==
--- head/lib/libc/tests/locale/mbrlen_test.cSun Nov 15 04:50:08 2015
(r290844)
+++ head/lib/libc/tests/locale/mbrlen_test.cSun Nov 15 04:50:54 2015
(r290845)
@@ -49,7 +49,6 @@ ATF_TC_WITHOUT_HEAD(mbrlen_test);
 ATF_TC_BODY(mbrlen_test, tc)
 {
mbstate_t s;
-   size_t len;
char buf[MB_LEN_MAX + 1];
 
/* C/POSIX locale. */

Modified: head/lib/libc/tests/locale/mbrtowc_test.c
==
--- head/lib/libc/tests/locale/mbrtowc_test.c   Sun Nov 15 04:50:08 2015
(r290844)
+++ head/lib/libc/tests/locale/mbrtowc_test.c   Sun Nov 15 04:50:54 2015
(r290845)
@@ -49,7 +49,6 @@ ATF_TC_WITHOUT_HEAD(mbrtowc_test);
 ATF_TC_BODY(mbrtowc_test, tc)
 {
mbstate_t s;
-   size_t len;
wchar_t wc;
char buf[MB_LEN_MAX + 1];
 

Modified: head/lib/libc/tests/locale/mbtowc_test.c
==
--- head/lib/libc/tests/locale/mbtowc_test.cSun Nov 15 04:50:08 2015
(r290844)
+++ head/lib/libc/tests/locale/mbtowc_test.cSun Nov 15 04:50:54 2015
(r290845)
@@ -46,9 +46,8 @@ __FBSDID("$FreeBSD$");
 ATF_TC_WITHOUT_HEAD(mbtowc_test);
 ATF_TC_BODY(mbtowc_test, tc)
 {
-   size_t len;
-   wchar_t wc;
char buf[MB_LEN_MAX + 1];
+   wchar_t wc;
 
/* C/POSIX locale. */
 
___
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: r290849 - head/lib/libc/tests/gen

2015-11-14 Thread Garrett Cooper
Author: ngie
Date: Sun Nov 15 05:13:33 2015
New Revision: 290849
URL: https://svnweb.freebsd.org/changeset/base/290849

Log:
  Fix -Wmissing-braces warnings by adding braces around all the
  testcase inputs
  
  MFC after: 1 week
  X-MFC with: r290572
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/tests/gen/fnmatch_testcases.h

Modified: head/lib/libc/tests/gen/fnmatch_testcases.h
==
--- head/lib/libc/tests/gen/fnmatch_testcases.h Sun Nov 15 05:02:41 2015
(r290848)
+++ head/lib/libc/tests/gen/fnmatch_testcases.h Sun Nov 15 05:13:33 2015
(r290849)
@@ -35,142 +35,142 @@ struct testcase {
int flags;
int result;
 } testcases[] = {
-   "", "", 0, 0,
-   "a", "a", 0, 0,
-   "a", "b", 0, FNM_NOMATCH,
-   "a", "A", 0, FNM_NOMATCH,
-   "*", "a", 0, 0,
-   "*", "aa", 0, 0,
-   "*a", "a", 0, 0,
-   "*a", "b", 0, FNM_NOMATCH,
-   "*a*", "b", 0, FNM_NOMATCH,
-   "*a*b*", "ab", 0, 0,
-   "*a*b*", "qaqbq", 0, 0,
-   "*a*bb*", "qaqbqbbq", 0, 0,
-   "*a*bc*", "qaqbqbcq", 0, 0,
-   "*a*bb*", "qaqbqbb", 0, 0,
-   "*a*bc*", "qaqbqbc", 0, 0,
-   "*a*bb", "qaqbqbb", 0, 0,
-   "*a*bc", "qaqbqbc", 0, 0,
-   "*a*bb", "qaqbqbbq", 0, FNM_NOMATCH,
-   "*a*bc", "qaqbqbcq", 0, FNM_NOMATCH,
-   "*a*a*a*a*a*a*a*a*a*a*", "a", 0, FNM_NOMATCH,
-   "*a*a*a*a*a*a*a*a*a*a*", "aa", 0, 0,
-   "*a*a*a*a*a*a*a*a*a*a*", "aaa", 0, 0,
-   ".*.*.*.*.*.*.*.*.*.*", ".", 0, FNM_NOMATCH,
-   ".*.*.*.*.*.*.*.*.*.*", "..", 0, 0,
-   ".*.*.*.*.*.*.*.*.*.*", "...", 0, 0,
-   "*?*?*?*?*?*?*?*?*?*?*", "123456789", 0, FNM_NOMATCH,
-   "??*", "123456789", 0, FNM_NOMATCH,
-   "*??", "123456789", 0, FNM_NOMATCH,
-   "*?*?*?*?*?*?*?*?*?*?*", "1234567890", 0, 0,
-   "??*", "1234567890", 0, 0,
-   "*??", "1234567890", 0, 0,
-   "*?*?*?*?*?*?*?*?*?*?*", "12345678901", 0, 0,
-   "??*", "12345678901", 0, 0,
-   "*??", "12345678901", 0, 0,
-   "[x]", "x", 0, 0,
-   "[*]", "*", 0, 0,
-   "[?]", "?", 0, 0,
-   "[", "[", 0, 0,
-   "[[]", "[", 0, 0,
-   "[[]", "x", 0, FNM_NOMATCH,
-   "[*]", "", 0, FNM_NOMATCH,
-   "[*]", "x", 0, FNM_NOMATCH,
-   "[?]", "x", 0, FNM_NOMATCH,
-   "*[*]*", "foo*foo", 0, 0,
-   "*[*]*", "foo", 0, FNM_NOMATCH,
-   "[0-9]", "0", 0, 0,
-   "[0-9]", "5", 0, 0,
-   "[0-9]", "9", 0, 0,
-   "[0-9]", "/", 0, FNM_NOMATCH,
-   "[0-9]", ":", 0, FNM_NOMATCH,
-   "[0-9]", "*", 0, FNM_NOMATCH,
-   "[!0-9]", "0", 0, FNM_NOMATCH,
-   "[!0-9]", "5", 0, FNM_NOMATCH,
-   "[!0-9]", "9", 0, FNM_NOMATCH,
-   "[!0-9]", "/", 0, 0,
-   "[!0-9]", ":", 0, 0,
-   "[!0-9]", "*", 0, 0,
-   "*[0-9]", "a0", 0, 0,
-   "*[0-9]", "a5", 0, 0,
-   "*[0-9]", "a9", 0, 0,
-   "*[0-9]", "a/", 0, FNM_NOMATCH,
-   "*[0-9]", "a:", 0, FNM_NOMATCH,
-   "*[0-9]", "a*", 0, FNM_NOMATCH,
-   "*[!0-9]", "a0", 0, FNM_NOMATCH,
-   "*[!0-9]", "a5", 0, FNM_NOMATCH,
-   "*[!0-9]", "a9", 0, FNM_NOMATCH,
-   "*[!0-9]", "a/", 0, 0,
-   "*[!0-9]", "a:", 0, 0,
-   "*[!0-9]", "a*", 0, 0,
-   "*[0-9]", "a00", 0, 0,
-   "*[0-9]", "a55", 0, 0,
-   "*[0-9]", "a99", 0, 0,
-   "*[0-9]", "a0a0", 0, 0,
-   "*[0-9]", "a5a5", 0, 0,
-   "*[0-9]", "a9a9", 0, 0,
-   "\\*", "*", 0, 0,
-   "\\?", "?", 0, 0,
-   "\\[x]", "[x]", 0, 0,
-   "\\[", "[", 0, 0,
-   "", "\\", 0, 0,
-   "*\\**", "foo*foo", 0, 0,
-   "*\\**", "foo", 0, FNM_NOMATCH,
-   "**", "foo\\foo", 0, 0,
-   "**", "foo", 0, FNM_NOMATCH,
-   "\\(", "(", 0, 0,
-   "\\a", "a", 0, 0,
-   "\\*", "a", 0, FNM_NOMATCH,
-   "\\?", "a", 0, FNM_NOMATCH,
-   "\\*", "\\*", 0, FNM_NOMATCH,
-   "\\?", "\\?", 0, FNM_NOMATCH,
-   "\\[x]", "\\[x]", 0, FNM_NOMATCH,
-   "\\[x]", "\\x", 0, FNM_NOMATCH,
-   "\\[", "\\[", 0, FNM_NOMATCH,
-   "\\(", "\\(", 0, FNM_NOMATCH,
-   "\\a", "\\a", 0, FNM_NOMATCH,
-   "\\", "\\", 0, FNM_NOMATCH,
-   "\\", "", 0, 0,
-   "\\*", "\\*", FNM_NOESCAPE, 0,
-   "\\?", "\\?", FNM_NOESCAPE, 0,
-   "\\", "\\", FNM_NOESCAPE, 0,
-   "", "\\", FNM_NOESCAPE, FNM_NOMATCH,
-   "", "", FNM_NOESCAPE, 0,
-   "*\\*", "foo\\foo", FNM_NOESCAPE, 0,
-   "*\\*", "foo", FNM_NOESCAPE, FNM_NOMATCH,
-   "*", ".", FNM_PERIOD, FNM_NOMATCH,
-   "?", ".", FNM_PERIOD, FNM_NOMATCH,
-   ".*", ".", 0, 0,
-   ".*", "..", 0, 0,
-   ".*", ".a", 0, 0,
-   "[0-9]", ".", FNM_PERIOD, FNM_NOMATCH,
-   "a*", "a.", 0, 0,
-   "a/a", "a/a", FNM_PATHNAME, 0,
-   "a/*", "a/a", FNM_PATHNAME, 0,
-   "*/a", "a/a", FNM_PATHNAME, 0,
-   "*/*", "a/a", FNM_PATHNAME, 0,
-   "a*b/*", "abbb/x", 

svn commit: r290842 - head/lib/libc/tests/stdio

2015-11-14 Thread Garrett Cooper
Author: ngie
Date: Sun Nov 15 03:56:09 2015
New Revision: 290842
URL: https://svnweb.freebsd.org/changeset/base/290842

Log:
  Fix the Indian numbering system (hi_IN.ISCII-DEV) tests
  
  Submitted by: ache
  X-MFC with: r290494 (if that ever happens)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/tests/stdio/printfloat_test.c

Modified: head/lib/libc/tests/stdio/printfloat_test.c
==
--- head/lib/libc/tests/stdio/printfloat_test.c Sun Nov 15 03:18:50 2015
(r290841)
+++ head/lib/libc/tests/stdio/printfloat_test.c Sun Nov 15 03:56:09 2015
(r290842)
@@ -178,10 +178,10 @@ ATF_TC_BODY(thousands_separator_and_othe
testfmt("0012345678.0625", "%'015.4F", 12345678.0625);
 
ATF_REQUIRE(setlocale(LC_NUMERIC, "hi_IN.ISCII-DEV")); /* grouping == 
2;3 */
-   testfmt("123,456,78.0625", "%'.4f", 12345678.0625);
-   testfmt("00123,456,78.0625", "%'017.4F", 12345678.0625);
-   testfmt(" 90,00", "%'6.0f", 9000.0);
-   testfmt("90,00.0", "%'.1f", 9000.0);
+   testfmt("1,23,45,678.0625", "%'.4f", 12345678.0625);
+   testfmt("01,23,45,678.0625", "%'017.4F", 12345678.0625);
+   testfmt(" 9,000", "%'6.0f", 9000.0);
+   testfmt("9,000.0", "%'.1f", 9000.0);
 
ATF_REQUIRE(setlocale(LC_NUMERIC, "ru_RU.ISO8859-5")); /* 
decimalpoint==, */
testfmt("3,1415", "%g", 3.1415);
___
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: r290823 - head/usr.sbin/ctld

2015-11-14 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Nov 14 16:15:38 2015
New Revision: 290823
URL: https://svnweb.freebsd.org/changeset/base/290823

Log:
  Cosmetics; no functional changes.
  
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/ctld/keys.c

Modified: head/usr.sbin/ctld/keys.c
==
--- head/usr.sbin/ctld/keys.c   Sat Nov 14 16:12:56 2015(r290822)
+++ head/usr.sbin/ctld/keys.c   Sat Nov 14 16:15:38 2015(r290823)
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+
 #include "ctld.h"
 
 struct keys *
@@ -136,7 +137,7 @@ keys_save(struct keys *keys, struct pdu 
if (keys->keys_names[i] == NULL)
break;
data += sprintf(data, "%s=%s",
-   keys->keys_names[i], keys->keys_values[i]);
+   keys->keys_names[i], keys->keys_values[i]);
data += 1; /* for '\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: r290819 - in head/sys: net netgraph

2015-11-14 Thread Alexander V. Chernikov
Author: melifaro
Date: Sat Nov 14 13:34:03 2015
New Revision: 290819
URL: https://svnweb.freebsd.org/changeset/base/290819

Log:
  Move iflladdr_event eventhandler invocation to if_setlladdr.
  
  Suggested by: glebius

Modified:
  head/sys/net/if.c
  head/sys/net/if_lagg.c
  head/sys/net/if_vlan.c
  head/sys/netgraph/ng_eiface.c
  head/sys/netgraph/ng_ether.c

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Sat Nov 14 06:18:50 2015(r290818)
+++ head/sys/net/if.c   Sat Nov 14 13:34:03 2015(r290819)
@@ -2512,8 +2512,6 @@ ifhwioctl(u_long cmd, struct ifnet *ifp,
return (error);
error = if_setlladdr(ifp,
ifr->ifr_addr.sa_data, ifr->ifr_addr.sa_len);
-   if (error == 0)
-   EVENTHANDLER_INVOKE(iflladdr_event, ifp);
break;
 
case SIOCAIFGROUP:
@@ -3377,6 +3375,7 @@ if_setlladdr(struct ifnet *ifp, const u_
(*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t));
}
}
+   EVENTHANDLER_INVOKE(iflladdr_event, ifp);
return (0);
 }
 

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Sat Nov 14 06:18:50 2015(r290818)
+++ head/sys/net/if_lagg.c  Sat Nov 14 13:34:03 2015(r290819)
@@ -690,7 +690,6 @@ lagg_port_setlladdr(void *arg, int pendi
struct lagg_softc *sc = (struct lagg_softc *)arg;
struct lagg_llq *llq, *head;
struct ifnet *ifp;
-   int error;
 
/* Grab a local reference of the queue and remove it from the softc */
LAGG_WLOCK(sc);
@@ -706,7 +705,6 @@ lagg_port_setlladdr(void *arg, int pendi
ifp = llq->llq_ifp;
 
CURVNET_SET(ifp->if_vnet);
-   error = 0;
 
/*
 * Set the link layer address on the laggport interface.
@@ -714,11 +712,8 @@ lagg_port_setlladdr(void *arg, int pendi
 * may result in arp transmission / lltable updates.
 */
if (llq->llq_type == LAGG_LLQTYPE_PHYS)
-   error = if_setlladdr(ifp, llq->llq_lladdr,
+   if_setlladdr(ifp, llq->llq_lladdr,
ETHER_ADDR_LEN);
-   if (error)
-   printf("%s: setlladdr failed on %s\n", __func__,
-   ifp->if_xname);
else
EVENTHANDLER_INVOKE(iflladdr_event, ifp);
CURVNET_RESTORE();

Modified: head/sys/net/if_vlan.c
==
--- head/sys/net/if_vlan.c  Sat Nov 14 06:18:50 2015(r290818)
+++ head/sys/net/if_vlan.c  Sat Nov 14 13:34:03 2015(r290819)
@@ -523,7 +523,7 @@ vlan_iflladdr(void *arg __unused, struct
 #ifndef VLAN_ARRAY
struct ifvlan *next;
 #endif
-   int error, i;
+   int i;
 
/*
 * Check if it's a trunk interface first of all
@@ -544,11 +544,8 @@ vlan_iflladdr(void *arg __unused, struct
LIST_FOREACH_SAFE(ifv, >if_vlantrunk->hash[i], ifv_list, 
next) {
 #endif /* VLAN_ARRAY */
VLAN_UNLOCK();
-   error = if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp),
+   if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp),
ifp->if_addrlen);
-   if (error == 0)
-   EVENTHANDLER_INVOKE(iflladdr_event,
-   ifv->ifv_ifp);
VLAN_LOCK();
}
VLAN_UNLOCK();

Modified: head/sys/netgraph/ng_eiface.c
==
--- head/sys/netgraph/ng_eiface.c   Sat Nov 14 06:18:50 2015
(r290818)
+++ head/sys/netgraph/ng_eiface.c   Sat Nov 14 13:34:03 2015
(r290819)
@@ -489,8 +489,6 @@ ng_eiface_rcvmsg(node_p node, item_p ite
}
error = if_setlladdr(priv->ifp,
(u_char *)msg->data, ETHER_ADDR_LEN);
-   if (error == 0)
-   EVENTHANDLER_INVOKE(iflladdr_event, priv->ifp);
break;
}
 

Modified: head/sys/netgraph/ng_ether.c
==
--- head/sys/netgraph/ng_ether.cSat Nov 14 06:18:50 2015
(r290818)
+++ head/sys/netgraph/ng_ether.cSat Nov 14 13:34:03 2015
(r290819)
@@ -534,8 +534,6 @@ ng_ether_rcvmsg(node_p node, item_p item
}
error = if_setlladdr(priv->ifp,
(u_char *)msg->data, ETHER_ADDR_LEN);
-   if (error == 0)

svn commit: r290822 - head/usr.sbin/iscsid

2015-11-14 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Nov 14 16:12:56 2015
New Revision: 290822
URL: https://svnweb.freebsd.org/changeset/base/290822

Log:
  Remove unneeded includes.
  
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/iscsid/keys.c
  head/usr.sbin/iscsid/pdu.c

Modified: head/usr.sbin/iscsid/keys.c
==
--- head/usr.sbin/iscsid/keys.c Sat Nov 14 16:06:01 2015(r290821)
+++ head/usr.sbin/iscsid/keys.c Sat Nov 14 16:12:56 2015(r290822)
@@ -32,7 +32,6 @@
 __FBSDID("$FreeBSD$");
 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: head/usr.sbin/iscsid/pdu.c
==
--- head/usr.sbin/iscsid/pdu.c  Sat Nov 14 16:06:01 2015(r290821)
+++ head/usr.sbin/iscsid/pdu.c  Sat Nov 14 16:12:56 2015(r290822)
@@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #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: r290820 - head/sys/cam/ctl

2015-11-14 Thread Alexander Motin
Author: mav
Date: Sat Nov 14 14:56:01 2015
New Revision: 290820
URL: https://svnweb.freebsd.org/changeset/base/290820

Log:
  Add NULL check to make Coverity happy.

Modified:
  head/sys/cam/ctl/ctl.c

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Sat Nov 14 13:34:03 2015(r290819)
+++ head/sys/cam/ctl/ctl.c  Sat Nov 14 14:56:01 2015(r290820)
@@ -9760,7 +9760,8 @@ ctl_inquiry_evpd_devid(struct ctl_scsiio
desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT |
SVPD_ID_TYPE_TPORTGRP;
desc->length = 4;
-   if (softc->is_single || port->status & CTL_PORT_STATUS_HA_SHARED)
+   if (softc->is_single ||
+   (port && port->status & CTL_PORT_STATUS_HA_SHARED))
g = 1;
else
g = 2 + ctsio->io_hdr.nexus.targ_port / softc->port_cnt;
___
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: r290821 - head/usr.sbin/ctld

2015-11-14 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Nov 14 16:06:01 2015
New Revision: 290821
URL: https://svnweb.freebsd.org/changeset/base/290821

Log:
  Don't try to avoid calling free(3) with NULL argument.
  
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/ctld/kernel.c

Modified: head/usr.sbin/ctld/kernel.c
==
--- head/usr.sbin/ctld/kernel.c Sat Nov 14 14:56:01 2015(r290820)
+++ head/usr.sbin/ctld/kernel.c Sat Nov 14 16:06:01 2015(r290821)
@@ -515,8 +515,7 @@ retry_port:
STAILQ_FOREACH(port, _list, links) {
if (strcmp(port->port_frontend, "ha") == 0)
continue;
-   if (name)
-   free(name);
+   free(name);
if (port->pp == 0 && port->vp == 0)
name = checked_strdup(port->port_name);
else if (port->vp == 0)
@@ -583,8 +582,7 @@ retry_port:
}
cp->p_ctl_port = port->port_id;
}
-   if (name)
-   free(name);
+   free(name);
 
STAILQ_FOREACH(lun, _list, links) {
struct cctl_lun_nv *nv;
___
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: r290824 - head/usr.sbin/ctld

2015-11-14 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Nov 14 16:18:22 2015
New Revision: 290824
URL: https://svnweb.freebsd.org/changeset/base/290824

Log:
  Add missing error checks.
  
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/ctld/kernel.c

Modified: head/usr.sbin/ctld/kernel.c
==
--- head/usr.sbin/ctld/kernel.c Sat Nov 14 16:15:38 2015(r290823)
+++ head/usr.sbin/ctld/kernel.c Sat Nov 14 16:18:22 2015(r290824)
@@ -516,13 +516,19 @@ retry_port:
if (strcmp(port->port_frontend, "ha") == 0)
continue;
free(name);
-   if (port->pp == 0 && port->vp == 0)
+   if (port->pp == 0 && port->vp == 0) {
name = checked_strdup(port->port_name);
-   else if (port->vp == 0)
-   asprintf(, "%s/%d", port->port_name, port->pp);
-   else
-   asprintf(, "%s/%d/%d", port->port_name, port->pp,
-   port->vp);
+   } else if (port->vp == 0) {
+   retval = asprintf(, "%s/%d",
+   port->port_name, port->pp);
+   if (retval <= 0)
+   log_err(1, "asprintf");
+   } else {
+   retval = asprintf(, "%s/%d/%d",
+   port->port_name, port->pp, port->vp);
+   if (retval <= 0)
+   log_err(1, "asprintf");
+   }
 
if (port->cfiscsi_target == NULL) {
log_debugx("CTL port %u \"%s\" wasn't managed by ctld; 
",
___
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: r290821 - head/usr.sbin/ctld

2015-11-14 Thread Andrew Turner
On Sat, 14 Nov 2015 09:22:30 -0800
Bryan Drewery  wrote:

> On 11/14/2015 9:20 AM, Andrew Turner wrote:
> > On Sat, 14 Nov 2015 16:06:01 + (UTC)
> > Edward Tomasz Napierala  wrote:
> >   
> >> Author: trasz
> >> Date: Sat Nov 14 16:06:01 2015
> >> New Revision: 290821
> >> URL: https://svnweb.freebsd.org/changeset/base/290821
> >>
> >> Log:
> >>   Don't try to avoid calling free(3) with NULL argument.  
> > 
> > Why? free(NULL) is documented to be a nop and is safe to rely on
> > this behaviour.
> >   
> 
> You read it backwards, see the change. It's doing what you want.

Yes, I should read the change more than briefly.

Andrew
___
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: r290821 - head/usr.sbin/ctld

2015-11-14 Thread Warner Losh
On Sat, Nov 14, 2015 at 10:22 AM, Bryan Drewery 
wrote:

> On 11/14/2015 9:20 AM, Andrew Turner wrote:
> > On Sat, 14 Nov 2015 16:06:01 + (UTC)
> > Edward Tomasz Napierala  wrote:
> >
> >> Author: trasz
> >> Date: Sat Nov 14 16:06:01 2015
> >> New Revision: 290821
> >> URL: https://svnweb.freebsd.org/changeset/base/290821
> >>
> >> Log:
> >>   Don't try to avoid calling free(3) with NULL argument.
> >
> > Why? free(NULL) is documented to be a nop and is safe to rely on this
> > behaviour.
> >
>
> You read it backwards, see the change. It's doing what you want.
>

Or rather, its failing to not do what you want. The double negative can
be tricky :)

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


Re: svn commit: r290821 - head/usr.sbin/ctld

2015-11-14 Thread Bryan Drewery
On 11/14/2015 9:20 AM, Andrew Turner wrote:
> On Sat, 14 Nov 2015 16:06:01 + (UTC)
> Edward Tomasz Napierala  wrote:
> 
>> Author: trasz
>> Date: Sat Nov 14 16:06:01 2015
>> New Revision: 290821
>> URL: https://svnweb.freebsd.org/changeset/base/290821
>>
>> Log:
>>   Don't try to avoid calling free(3) with NULL argument.
> 
> Why? free(NULL) is documented to be a nop and is safe to rely on this
> behaviour.
> 

You read it backwards, see the change. It's doing what you want.


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r290827 - stable/9/share/man/man9

2015-11-14 Thread Bryan Drewery
Author: bdrewery
Date: Sat Nov 14 17:32:38 2015
New Revision: 290827
URL: https://svnweb.freebsd.org/changeset/base/290827

Log:
  MFC r290428:
  
remove \, it confuses things.

Modified:
  stable/9/share/man/man9/Makefile
Directory Properties:
  stable/9/share/man/man9/   (props changed)

Modified: stable/9/share/man/man9/Makefile
==
--- stable/9/share/man/man9/MakefileSat Nov 14 17:30:52 2015
(r290826)
+++ stable/9/share/man/man9/MakefileSat Nov 14 17:32:38 2015
(r290827)
@@ -996,7 +996,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \
pci.9 pci_write_config.9 \
pci.9 pcie_adjust_config.9 \
pci.9 pcie_read_config.9 \
-   pci.9 pcie_write_config.9 \
+   pci.9 pcie_write_config.9
 MLINKS+=pfil.9 pfil_add_hook.9 \
pfil.9 pfil_hook_get.9 \
pfil.9 pfil_remove_hook.9
___
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: r290828 - head/sys/net

2015-11-14 Thread Alexander V. Chernikov
Author: melifaro
Date: Sat Nov 14 18:16:17 2015
New Revision: 290828
URL: https://svnweb.freebsd.org/changeset/base/290828

Log:
  Pass provided af instead of AF_UNSPEC to setwa_f callback.

Modified:
  head/sys/net/route.c

Modified: head/sys/net/route.c
==
--- head/sys/net/route.cSat Nov 14 17:32:38 2015(r290827)
+++ head/sys/net/route.cSat Nov 14 18:16:17 2015(r290828)
@@ -845,7 +845,7 @@ rt_foreach_fib_walk(int af, rt_setwarg_t
if (rnh == NULL)
continue;
if (setwa_f != NULL)
-   setwa_f(rnh, fibnum, AF_UNSPEC, arg);
+   setwa_f(rnh, fibnum, af, arg);
 
RADIX_NODE_HEAD_LOCK(rnh);
rnh->rnh_walktree(rnh, (walktree_f_t *)wa_f, arg);
___
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: r290014 - in stable/10: lib/libthr/arch/amd64 lib/libthr/arch/i386 libexec/rtld-elf/amd64 libexec/rtld-elf/i386 share/mk

2015-11-14 Thread David Chisnall
On 26 Oct 2015, at 16:21, Eric van Gyzen  wrote:
> 
> One counter-argument to this change is that most applications already
>  use SIMD, and the number of applications and amount of SIMD usage
>  are only increasing.

Note that SSE and SIMD are not the same thing.  The x86-64 ABI uses SSE 
registers for floating point arguments, so even a purely scalar application 
that uses floating point will end up faulting in the SSE state.  This is not 
the case on IA32, where x87 registers are used (though when compiling for i686, 
SSE is used by default because register allocation for x87 is a huge pain).

I believe that the no-sse option for clang is ABI-preserving, so will not 
actually disable all SSE unless you also specify -msoft-float.  I don’t think 
that libthr uses floating point anywhere, but libc does and you only need to 
call one function that takes a floating point argument in between context 
switches to lose this gain on x86-64.  With this change, we’re making the 
compiler emit less efficient code, on the assumption that nothing will touch 
the fpu in the quantum before the next context switch.  I’d really like to see 
the set of applications that you benchmarked the change with on x86-64 to reach 
the conclusion that this is a net win overall. 

Or, to put it another way: How many applications are multithreaded but don’t 
use any floating point code?

David

___
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: r290821 - head/usr.sbin/ctld

2015-11-14 Thread Andrew Turner
On Sat, 14 Nov 2015 16:06:01 + (UTC)
Edward Tomasz Napierala  wrote:

> Author: trasz
> Date: Sat Nov 14 16:06:01 2015
> New Revision: 290821
> URL: https://svnweb.freebsd.org/changeset/base/290821
> 
> Log:
>   Don't try to avoid calling free(3) with NULL argument.

Why? free(NULL) is documented to be a nop and is safe to rely on this
behaviour.

Andrew
___
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: r290826 - stable/10/share/man/man9

2015-11-14 Thread Bryan Drewery
Author: bdrewery
Date: Sat Nov 14 17:30:52 2015
New Revision: 290826
URL: https://svnweb.freebsd.org/changeset/base/290826

Log:
  MFC r290428:
  
remove \, it confuses things.

Modified:
  stable/10/share/man/man9/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man9/Makefile
==
--- stable/10/share/man/man9/Makefile   Sat Nov 14 17:21:17 2015
(r290825)
+++ stable/10/share/man/man9/Makefile   Sat Nov 14 17:30:52 2015
(r290826)
@@ -1032,7 +1032,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \
pci.9 pci_write_config.9 \
pci.9 pcie_adjust_config.9 \
pci.9 pcie_read_config.9 \
-   pci.9 pcie_write_config.9 \
+   pci.9 pcie_write_config.9
 MLINKS+=pfil.9 pfil_add_hook.9 \
pfil.9 pfil_hook_get.9 \
pfil.9 pfil_remove_hook.9
___
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: r290809 - in stable: 10/share/man/man9 10/sys/dev/pci 9/share/man/man9 9/sys/dev/pci

2015-11-14 Thread Bryan Drewery
On 11/14/2015 12:25 AM, Michal Meloun wrote:
> This commit breaks installworld.

Fixed.

> 
> Index: share/man/man9/Makefile
> ===
> --- share/man/man9/Makefile (revision 290818)
> +++ share/man/man9/Makefile (working copy)
> @@ -1032,7 +1032,7 @@
> pci.9 pci_write_config.9 \
> pci.9 pcie_adjust_config.9 \
> pci.9 pcie_read_config.9 \
> -   pci.9 pcie_write_config.9 \
> +   pci.9 pcie_write_config.9
>  MLINKS+=pfil.9 pfil_add_hook.9 \
> pfil.9 pfil_hook_get.9 \
> pfil.9 pfil_remove_hook.9
> 
> 
> Dne 14.11.2015 v 2:06 John Baldwin napsal(a):
>> Author: jhb
>> Date: Sat Nov 14 01:06:45 2015
>> New Revision: 290809
>> URL: https://svnweb.freebsd.org/changeset/base/290809
>>
>> Log:
>>   MFC 290414,290415:
>>   Additional PCI helper functions.
>>   


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r290834 - head/sys/arm/freescale/imx

2015-11-14 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Nov 14 22:46:50 2015
New Revision: 290834
URL: https://svnweb.freebsd.org/changeset/base/290834

Log:
  Replace magic numbers for CCGRx registers with more descriptive names

Modified:
  head/sys/arm/freescale/imx/imx6_ccm.c
  head/sys/arm/freescale/imx/imx6_ccmreg.h

Modified: head/sys/arm/freescale/imx/imx6_ccm.c
==
--- head/sys/arm/freescale/imx/imx6_ccm.c   Sat Nov 14 22:22:18 2015
(r290833)
+++ head/sys/arm/freescale/imx/imx6_ccm.c   Sat Nov 14 22:46:50 2015
(r290834)
@@ -88,14 +88,42 @@ WR4(struct ccm_softc *sc, bus_size_t off
 static void
 ccm_init_gates(struct ccm_softc *sc)
 {
-/* Turns on... */
-   WR4(sc, CCM_CCGR0, 0x003f); /* ahpbdma, aipstz 1 & 2 busses */
-   WR4(sc, CCM_CCGR1, 0x00300c00); /* gpt, enet */
-   WR4(sc, CCM_CCGR2, 0x0fc0); /* ipmux & ipsync (bridges), iomux, i2c 
*/
-   WR4(sc, CCM_CCGR3, 0x3ff0); /* DDR memory controller */
-   WR4(sc, CCM_CCGR4, 0xf300); /* pl301 bus crossbar */
-   WR4(sc, CCM_CCGR5, 0x0ffc00c0); /* uarts, ssi, sdma */
-   WR4(sc, CCM_CCGR6, 0x03ff); /* usdhc 1-4, usboh3 */
+   uint32_t reg;
+
+   /* ahpbdma, aipstz 1 & 2 busses */
+   reg = CCGR0_AIPS_TZ1 | CCGR0_AIPS_TZ2 | CCGR0_ABPHDMA;
+   WR4(sc, CCM_CCGR0, reg);
+
+   /* gpt, enet */
+   reg = CCGR1_ENET | CCGR1_GPT;
+   WR4(sc, CCM_CCGR1, reg);
+
+   /* ipmux & ipsync (bridges), iomux, i2c */
+   reg = CCGR2_I2C1 | CCGR2_I2C2 | CCGR2_I2C3 | CCGR2_IIM |
+   CCGR2_IOMUX_IPT | CCGR2_IPMUX1 | CCGR2_IPMUX2 | CCGR2_IPMUX3 |
+   CCGR2_IPSYNC_IP2APB_TZASC1 | CCGR2_IPSYNC_IP2APB_TZASC2 |
+   CCGR2_IPSYNC_VDOA;
+   WR4(sc, CCM_CCGR2, reg);
+
+   /* DDR memory controller */
+   reg = CCGR3_OCRAM | CCGR3_MMDC_CORE_IPG |
+   CCGR3_MMDC_CORE_ACLK_FAST | CCGR3_CG11 | CCGR3_CG13;
+   WR4(sc, CCM_CCGR3, reg);
+
+   /* pl301 bus crossbar */
+   reg = CCGR4_PL301_MX6QFAST1_S133 |
+   CCGR4_PL301_MX6QPER1_BCH | CCGR4_PL301_MX6QPER2_MAIN;
+   WR4(sc, CCM_CCGR4, reg);
+
+   /* uarts, ssi, sdma */
+   reg = CCGR5_SDMA | CCGR5_SSI1 | CCGR5_SSI2 | CCGR5_SSI3 |
+   CCGR5_UART | CCGR5_UART_SERIAL;
+   WR4(sc, CCM_CCGR5, reg);
+
+   /* usdhc 1-4, usboh3 */
+   reg = CCGR6_USBOH3 | CCGR6_USDHC1 | CCGR6_USDHC2 |
+   CCGR6_USDHC3 | CCGR6_USDHC4;
+   WR4(sc, CCM_CCGR6, reg);
 }
 
 static int

Modified: head/sys/arm/freescale/imx/imx6_ccmreg.h
==
--- head/sys/arm/freescale/imx/imx6_ccmreg.hSat Nov 14 22:22:18 2015
(r290833)
+++ head/sys/arm/freescale/imx/imx6_ccmreg.hSat Nov 14 22:46:50 2015
(r290834)
@@ -58,12 +58,57 @@
 #defineCCM_CGPR0x064
 #define  CCM_CGPR_INT_MEM_CLK_LPM(1 << 17)
 #defineCCM_CCGR0   0x068
+#defineCCGR0_AIPS_TZ1  (0x3 << 0)
+#defineCCGR0_AIPS_TZ2  (0x3 << 2)
+#defineCCGR0_ABPHDMA   (0x3 << 4)
 #defineCCM_CCGR1   0x06C
+#defineCCGR1_ENET  (0x3 << 10)
+#defineCCGR1_GPT   (0x3 << 20)
 #defineCCM_CCGR2   0x070
+#defineCCGR2_HDMI_TX   (0x3 << 0)
+#defineCCGR2_HDMI_TX_ISFR  (0x3 << 4)
+#defineCCGR2_I2C1  (0x3 << 6)
+#defineCCGR2_I2C2  (0x3 << 8)
+#defineCCGR2_I2C3  (0x3 << 10)
+#defineCCGR2_IIM   (0x3 << 12)
+#defineCCGR2_IOMUX_IPT (0x3 << 14)
+#defineCCGR2_IPMUX1(0x3 << 16)
+#defineCCGR2_IPMUX2(0x3 << 18)
+#defineCCGR2_IPMUX3(0x3 << 20)
+#defineCCGR2_IPSYNC_IP2APB_TZASC1  (0x3 << 22)
+#defineCCGR2_IPSYNC_IP2APB_TZASC2  (0x3 << 24)
+#defineCCGR2_IPSYNC_VDOA   (0x3 << 26)
 #defineCCM_CCGR3   0x074
+#defineCCGR3_IPU1_IPU  (0x3 << 0)
+#defineCCGR3_IPU1_DI0  (0x3 << 2)
+#defineCCGR3_IPU1_DI1  (0x3 << 4)
+#defineCCGR3_IPU2_IPU  (0x3 << 6)
+#defineCCGR3_IPU2_DI0  (0x3 << 8)
+#defineCCGR3_IPU2_DI1  (0x3 << 10)
+#defineCCGR3_LDB_DI0   (0x3 << 12)
+#defineCCGR3_LDB_DI1   (0x3 << 14)
+#define   

svn commit: r290835 - head/lib/libopenbsd

2015-11-14 Thread Craig Rodrigues
Author: rodrigc
Date: Sat Nov 14 23:07:38 2015
New Revision: 290835
URL: https://svnweb.freebsd.org/changeset/base/290835

Log:
  Implemtn getdtablecount() to count open file descriptors for current process.
  
  Use underlying sysctl implemented by mjg in r290473.
  
  PR:194985
  Reviewed by:   bapt, mjg
  Differential Revision: https://reviews.freebsd.org/D4084

Added:
  head/lib/libopenbsd/getdtablecount.c   (contents, props changed)
  head/lib/libopenbsd/unistd.h   (contents, props changed)
Modified:
  head/lib/libopenbsd/Makefile

Modified: head/lib/libopenbsd/Makefile
==
--- head/lib/libopenbsd/MakefileSat Nov 14 22:46:50 2015
(r290834)
+++ head/lib/libopenbsd/MakefileSat Nov 14 23:07:38 2015
(r290835)
@@ -1,9 +1,12 @@
 # $FreeBSD$
 
 LIB=   openbsd
-SRCS=  ohash.c
+SRCS=  getdtablecount.c \
+   ohash.c
 INTERNALLIB=
 
+CFLAGS+= -I${.CURDIR}
+
 WARNS= 3
 
 .include 

Added: head/lib/libopenbsd/getdtablecount.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libopenbsd/getdtablecount.cSat Nov 14 23:07:38 2015
(r290835)
@@ -0,0 +1,58 @@
+/*-
+ * Copyright (c) 2015 Craig Rodrigues
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * 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$");
+
+#include 
+#include 
+#include 
+
+int getdtablecount(void);
+
+/* 
+ * Return the count of open file descriptors for this process.
+ *
+ */
+int
+getdtablecount(void)
+{
+   int mib[4];
+   int error;
+   int nfds;
+   size_t len;
+
+   len = sizeof(nfds);
+   mib[0] = CTL_KERN;
+   mib[1] = KERN_PROC;
+   mib[2] = KERN_PROC_NFDS;
+   mib[3] = 0;
+
+   error = sysctl(mib, 4, , , NULL, 0);
+   if (error)
+   return (-1);
+   return (nfds);
+}

Added: head/lib/libopenbsd/unistd.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libopenbsd/unistd.hSat Nov 14 23:07:38 2015
(r290835)
@@ -0,0 +1,36 @@
+/*-
+ * Copyright (c) 2015 Craig Rodrigues
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _LIBOPENBSD_UNISTD_H_
+#define 

svn commit: r290836 - head/lib/libopenbsd

2015-11-14 Thread Craig Rodrigues
Author: rodrigc
Date: Sat Nov 14 23:13:15 2015
New Revision: 290836
URL: https://svnweb.freebsd.org/changeset/base/290836

Log:
  Add imsg to libopenbsd.
  
  This will help with importing OpenBSD programs such as ypldap
  into the base system.

Modified:
  head/lib/libopenbsd/Makefile

Modified: head/lib/libopenbsd/Makefile
==
--- head/lib/libopenbsd/MakefileSat Nov 14 23:07:38 2015
(r290835)
+++ head/lib/libopenbsd/MakefileSat Nov 14 23:13:15 2015
(r290836)
@@ -2,6 +2,8 @@
 
 LIB=   openbsd
 SRCS=  getdtablecount.c \
+   imsg-buffer.c \
+   imsg.c \
ohash.c
 INTERNALLIB=
 
@@ -9,4 +11,5 @@ CFLAGS+= -I${.CURDIR}
 
 WARNS= 3
 
+NO_WERROR=
 .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"


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

2015-11-14 Thread Bryan Drewery
On 11/14/2015 10:16 AM, Alexander V. Chernikov wrote:
> Author: melifaro
> Date: Sat Nov 14 18:16:17 2015
> New Revision: 290828
> URL: https://svnweb.freebsd.org/changeset/base/290828
> 
> Log:
>   Pass provided af instead of AF_UNSPEC to setwa_f callback.
> 
> Modified:
>   head/sys/net/route.c
> 
> Modified: head/sys/net/route.c
> ==
> --- head/sys/net/route.c  Sat Nov 14 17:32:38 2015(r290827)
> +++ head/sys/net/route.c  Sat Nov 14 18:16:17 2015(r290828)
> @@ -845,7 +845,7 @@ rt_foreach_fib_walk(int af, rt_setwarg_t
>   if (rnh == NULL)
>   continue;
>   if (setwa_f != NULL)
> - setwa_f(rnh, fibnum, AF_UNSPEC, arg);
> + setwa_f(rnh, fibnum, af, arg);
>  
>   RADIX_NODE_HEAD_LOCK(rnh);
>   rnh->rnh_walktree(rnh, (walktree_f_t *)wa_f, arg);
> 

Ah damn. I mis-read the 'if' a few lines up when fixing the coverity
warning. Sorry about that. At least none of the callbacks were using it yet.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r290830 - head/sys/dev/isp

2015-11-14 Thread Alexander Motin
Author: mav
Date: Sat Nov 14 19:47:17 2015
New Revision: 290830
URL: https://svnweb.freebsd.org/changeset/base/290830

Log:
  Fix/improve CRN tracking.

Modified:
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/isp_freebsd.h

Modified: head/sys/dev/isp/isp_freebsd.c
==
--- head/sys/dev/isp/isp_freebsd.c  Sat Nov 14 19:45:04 2015
(r290829)
+++ head/sys/dev/isp/isp_freebsd.c  Sat Nov 14 19:47:17 2015
(r290830)
@@ -4249,16 +4249,9 @@ isp_action(struct cam_sim *sim, union cc
break;
 #endif
case XPT_RESET_DEV: /* BDR the specified SCSI device */
-   {
-   struct isp_fc *fc;
-
bus = cam_sim_bus(xpt_path_sim(ccb->ccb_h.path));
tgt = ccb->ccb_h.target_id;
tgt |= (bus << 16);
-   if (IS_FC(isp))
-   fc = ISP_FC_PC(isp, bus);
-   else
-   fc = NULL;
 
error = isp_control(isp, ISPCTL_RESET_DEV, bus, tgt);
if (error) {
@@ -4269,14 +4262,13 @@ isp_action(struct cam_sim *sim, union cc
 * Reference Number, because the target will expect
 * that we re-start the CRN at 1 after a reset.
 */
-   if (fc != NULL)
-   isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1);
+   if (IS_FC(isp))
+   isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1);
 
ccb->ccb_h.status = CAM_REQ_CMP;
}
xpt_done(ccb);
break;
-   }
case XPT_ABORT: /* Abort the specified CCB */
{
union ccb *accb = ccb->cab.abort_ccb;
@@ -4854,7 +4846,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, 
"Starting Loop Down Timer @ %lu", (unsigned long) time_uptime);
}
}
-   isp_fcp_reset_crn(fc, /*tgt*/0, /*tgt_set*/ 0);
+   isp_fcp_reset_crn(isp, bus, /*tgt*/0, /*tgt_set*/ 0);
 
isp_prt(isp, ISP_LOGINFO, "Chan %d: %s", bus, msg);
break;
@@ -4887,7 +4879,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
if ((FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) &&
(lp->prli_word3 & PRLI_WD3_TARGET_FUNCTION)) {
lp->is_target = 1;
-   isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1);
+   isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1);
isp_make_here(isp, lp, bus, tgt);
}
if ((FCPARAM(isp, bus)->role & ISP_ROLE_TARGET) &&
@@ -4917,11 +4909,11 @@ changed:
 (lp->new_prli_word3 & PRLI_WD3_TARGET_FUNCTION))) {
lp->is_target = !lp->is_target;
if (lp->is_target) {
-   isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1);
+   isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1);
isp_make_here(isp, lp, bus, tgt);
} else {
isp_make_gone(isp, lp, bus, tgt);
-   isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1);
+   isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1);
}
}
if (lp->is_initiator !=
@@ -5490,23 +5482,23 @@ isp_common_dmateardown(ispsoftc_t *isp, 
  * (needed for events like a LIP).
  */
 void
-isp_fcp_reset_crn(struct isp_fc *fc, uint32_t tgt, int tgt_set)
+isp_fcp_reset_crn(ispsoftc_t *isp, int chan, uint32_t tgt, int tgt_set)
 {
-   int i;
+   struct isp_fc *fc = ISP_FC_PC(isp, chan);
struct isp_nexus *nxp;
+   int i;
 
if (tgt_set == 0)
-   isp_prt(fc->isp, ISP_LOG_SANCFG, "resetting CRN on all 
targets");
+   isp_prt(isp, ISP_LOGDEBUG0,
+   "Chan %d resetting CRN on all targets", chan);
else
-   isp_prt(fc->isp, ISP_LOG_SANCFG, "resetting CRN target %u", 
tgt);
+   isp_prt(isp, ISP_LOGDEBUG0,
+   "Chan %d resetting CRN on target %u", chan, tgt);
 
for (i = 0; i < NEXUS_HASH_WIDTH; i++) {
-   nxp = fc->nexus_hash[i];
-   while (nxp) {
-   if ((tgt_set != 0) && (tgt == nxp->tgt))
+   for (nxp = fc->nexus_hash[i]; nxp != NULL; nxp = nxp->next) {
+   if (tgt_set == 0 || tgt == nxp->tgt)
nxp->crnseed = 0;
-
-   nxp = nxp->next;
}
}
 }
@@ -5550,15 +5542,11 @@ isp_fcp_next_crn(ispsoftc_t *isp, uint8_
nxp->next = fc->nexus_hash[idx];

svn commit: r290831 - in head/sys/arm: arm ti/am335x

2015-11-14 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Nov 14 21:01:35 2015
New Revision: 290831
URL: https://svnweb.freebsd.org/changeset/base/290831

Log:
  Somewhat improve HDMI event API
  
  - Pass device_t for HDMI framer as an argument for event hook
  - Use #define for event values, instead of opaque (and unused) 0

Modified:
  head/sys/arm/arm/hdmi_if.m
  head/sys/arm/ti/am335x/am335x_lcd.c
  head/sys/arm/ti/am335x/tda19988.c

Modified: head/sys/arm/arm/hdmi_if.m
==
--- head/sys/arm/arm/hdmi_if.m  Sat Nov 14 19:47:17 2015(r290830)
+++ head/sys/arm/arm/hdmi_if.m  Sat Nov 14 21:01:35 2015(r290831)
@@ -35,8 +35,10 @@ INTERFACE hdmi;
 HEADER {
#include 
 
-   typedef void (*hdmi_event_hook)(void *, int);
+   typedef void (*hdmi_event_hook)(void *, device_t, int);
EVENTHANDLER_DECLARE(hdmi_event, hdmi_event_hook);
+
+   #define HDMI_EVENT_CONNECTED0
 }
 
 #

Modified: head/sys/arm/ti/am335x/am335x_lcd.c
==
--- head/sys/arm/ti/am335x/am335x_lcd.c Sat Nov 14 19:47:17 2015
(r290830)
+++ head/sys/arm/ti/am335x/am335x_lcd.c Sat Nov 14 21:01:35 2015
(r290831)
@@ -800,7 +800,7 @@ done:
 }
 
 static void
-am335x_lcd_hdmi_event(void *arg)
+am335x_lcd_hdmi_event(void *arg, device_t hdmi, int event)
 {
struct am335x_lcd_softc *sc;
const struct videomode *videomode;
@@ -1001,7 +1001,7 @@ am335x_lcd_attach(device_t dev)
am335x_lcd_configure(sc);
else
sc->sc_hdmi_evh = EVENTHANDLER_REGISTER(hdmi_event,
-   am335x_lcd_hdmi_event, sc, 0);
+   am335x_lcd_hdmi_event, sc, EVENTHANDLER_PRI_ANY);
 
return (0);
 }

Modified: head/sys/arm/ti/am335x/tda19988.c
==
--- head/sys/arm/ti/am335x/tda19988.c   Sat Nov 14 19:47:17 2015
(r290830)
+++ head/sys/arm/ti/am335x/tda19988.c   Sat Nov 14 21:01:35 2015
(r290831)
@@ -635,7 +635,7 @@ tda19988_read_edid(struct tda19988_softc
}
}
 
-   EVENTHANDLER_INVOKE(hdmi_event, 0);
+   EVENTHANDLER_INVOKE(hdmi_event, sc->sc_dev, HDMI_EVENT_CONNECTED);
 done:
if (sc->sc_version == TDA19988)
tda19988_reg_set(sc, TDA_TX4, TX4_PD_RAM);
___
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: r290835 - head/lib/libopenbsd

2015-11-14 Thread NGie Cooper

> On Nov 14, 2015, at 15:07, Craig Rodrigues  wrote:
> 
> Author: rodrigc
> Date: Sat Nov 14 23:07:38 2015
> New Revision: 290835
> URL: https://svnweb.freebsd.org/changeset/base/290835
> 
> Log:
>  Implemtn getdtablecount() to count open file descriptors for current process.
> 
>  Use underlying sysctl implemented by mjg in r290473.
> 
>  PR:194985
>  Reviewed by:   bapt, mjg
>  Differential Revision: https://reviews.freebsd.org/D4084

This broke the build on old versions of the OS because sys/sysctl.h isn't 
installed to WORLDTMP before bootstrap-tools:

 231 # 1. legacy stage [BMAKE]
 232 #   This stage is responsible for creating compatibility
 233 #   shims that are needed by the bootstrap-tools,
 234 #   build-tools and cross-tools stages. These are generally
 235 #   APIs that tools from one of those three stages need to
 236 #   build that aren't present on the host.
 237 # 1. bootstrap-tools stage [BMAKE]
 238 #   This stage is responsible for creating programs that
 239 #   are needed for backward compatibility reasons. They
 240 #   are not built as cross-tools.

See: https://jenkins.freebsd.org/job/FreeBSD_HEAD_i386/1663/consoleFull

Cheers,
-NGie
___
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: r290835 - head/lib/libopenbsd

2015-11-14 Thread NGie Cooper

> On Nov 14, 2015, at 15:24, NGie Cooper  wrote:
> 
> 
>> On Nov 14, 2015, at 15:07, Craig Rodrigues  wrote:
>> 
>> Author: rodrigc
>> Date: Sat Nov 14 23:07:38 2015
>> New Revision: 290835
>> URL: https://svnweb.freebsd.org/changeset/base/290835
>> 
>> Log:
>> Implemtn getdtablecount() to count open file descriptors for current process.
>> 
>> Use underlying sysctl implemented by mjg in r290473.
>> 
>> PR:194985
>> Reviewed by:   bapt, mjg
>> Differential Revision: https://reviews.freebsd.org/D4084
> 
> This broke the build on old versions of the OS because sys/sysctl.h isn't 
> installed to WORLDTMP before bootstrap-tools:
> 
> 231 # 1. legacy stage [BMAKE]
> 232 #   This stage is responsible for creating compatibility
> 233 #   shims that are needed by the bootstrap-tools,
> 234 #   build-tools and cross-tools stages. These are generally
> 235 #   APIs that tools from one of those three stages need to
> 236 #   build that aren't present on the host.
> 237 # 1. bootstrap-tools stage [BMAKE]
> 238 #   This stage is responsible for creating programs that
> 239 #   are needed for backward compatibility reasons. They
> 240 #   are not built as cross-tools.
> 
> See: https://jenkins.freebsd.org/job/FreeBSD_HEAD_i386/1663/consoleFull

This should fix it (and other style bugs / other issues): 
https://people.freebsd.org/~ngie/fix-r290835.patch . Going to try it out on 
ref11-amd64..
___
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: r290838 - head/lib/libopenbsd/sys

2015-11-14 Thread Craig Rodrigues
Author: rodrigc
Date: Sat Nov 14 23:43:59 2015
New Revision: 290838
URL: https://svnweb.freebsd.org/changeset/base/290838

Log:
  Fix bootstrapping of libopenbsd on build hosts where KERN_PROC_NFDS
  it not defined.

Added:
  head/lib/libopenbsd/sys/
  head/lib/libopenbsd/sys/sysctl.h   (contents, props changed)

Added: head/lib/libopenbsd/sys/sysctl.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libopenbsd/sys/sysctl.hSat Nov 14 23:43:59 2015
(r290838)
@@ -0,0 +1,38 @@
+/*-
+ * Copyright (c) 2015 Craig Rodrigues
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _LIBOPENBSD_SYS_SYSCTL_H_
+#define _LIBOPENBSD_SYS_SYSCTL_H_
+
+#include_next 
+
+#ifndef KERN_PROC_NFDS
+#defineKERN_PROC_NFDS  43  /* number of open file 
descriptors */
+#endif
+
+#endif /* _LIBOPENBSD_SYS_SYSCTL_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"


Re: svn commit: r290836 - head/lib/libopenbsd

2015-11-14 Thread NGie Cooper

> On Nov 14, 2015, at 15:13, Craig Rodrigues  wrote:

…

> +NO_WERROR=

NO_WERROR? Really :(? It’s just a -Wsign-compare issue...

___
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"