Re: svn commit: r290475 - in head: share/man/man9 sys/kern sys/sys

2015-11-08 Thread Hans Petter Selasky

On 11/07/15 19:26, Conrad Meyer wrote:

Can do — fixed in r290505.

Thanks,
Conrad


Thank you. Looks good!

--HPS

___
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: r290543 - head/sys/netpfil/ipfw

2015-11-08 Thread Alexander V. Chernikov
Author: melifaro
Date: Sun Nov  8 12:24:19 2015
New Revision: 290543
URL: https://svnweb.freebsd.org/changeset/base/290543

Log:
  Fix setfib target.
  Problem was introduced in r272840 when converting tablearg value to 0.
  
  Submitted by: Denis Schneider 

Modified:
  head/sys/netpfil/ipfw/ip_fw2.c
  head/sys/netpfil/ipfw/ip_fw_sockopt.c

Modified: head/sys/netpfil/ipfw/ip_fw2.c
==
--- head/sys/netpfil/ipfw/ip_fw2.c  Sun Nov  8 09:37:26 2015
(r290542)
+++ head/sys/netpfil/ipfw/ip_fw2.c  Sun Nov  8 12:24:19 2015
(r290543)
@@ -2476,7 +2476,7 @@ do {  
\
uint32_t fib;
 
IPFW_INC_RULE_COUNTER(f, pktlen);
-   fib = TARG(cmd->arg1, fib) & 0x7;
+   fib = TARG(cmd->arg1, fib) & 0x7FFF;
if (fib >= rt_numfibs)
fib = 0;
M_SETFIB(m, fib);

Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c
==
--- head/sys/netpfil/ipfw/ip_fw_sockopt.c   Sun Nov  8 09:37:26 2015
(r290542)
+++ head/sys/netpfil/ipfw/ip_fw_sockopt.c   Sun Nov  8 12:24:19 2015
(r290543)
@@ -1497,9 +1497,9 @@ check_ipfw_rule_body(ipfw_insn *cmd, int
if (cmdlen != F_INSN_SIZE(ipfw_insn))
goto bad_size;
if ((cmd->arg1 != IP_FW_TARG) &&
-   ((cmd->arg1 & 0x7) >= rt_numfibs)) {
+   ((cmd->arg1 & 0x7FFF) >= rt_numfibs)) {
printf("ipfw: invalid fib number %d\n",
-   cmd->arg1 & 0x7);
+   cmd->arg1 & 0x7FFF);
return EINVAL;
}
goto check_action;
___
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: r290547 - in head/sys: arm/annapurna/alpine arm/mv/armadaxp arm/qemu arm/ti/omap4 arm/xilinx kern x86/x86

2015-11-08 Thread Tijl Coosemans
Author: tijl
Date: Sun Nov  8 14:26:50 2015
New Revision: 290547
URL: https://svnweb.freebsd.org/changeset/base/290547

Log:
  Since r289279 bufinit() uses mp_ncpus, but some architectures set this
  variable during mp_start() which is too late.  Move this to mp_setmaxid()
  where other architectures set it and move x86 assertions to MI code.
  
  Reviewed by:  kib (x86 part)

Modified:
  head/sys/arm/annapurna/alpine/alpine_machdep_mp.c
  head/sys/arm/mv/armadaxp/armadaxp_mp.c
  head/sys/arm/qemu/virt_mp.c
  head/sys/arm/ti/omap4/omap4_mp.c
  head/sys/arm/xilinx/zy7_mp.c
  head/sys/kern/subr_smp.c
  head/sys/x86/x86/mp_x86.c

Modified: head/sys/arm/annapurna/alpine/alpine_machdep_mp.c
==
--- head/sys/arm/annapurna/alpine/alpine_machdep_mp.c   Sun Nov  8 14:22:57 
2015(r290546)
+++ head/sys/arm/annapurna/alpine/alpine_machdep_mp.c   Sun Nov  8 14:26:50 
2015(r290547)
@@ -128,16 +128,14 @@ platform_mp_init_secondary(void)
 void
 platform_mp_setmaxid(void)
 {
-   int core_cnt;
 
-   core_cnt = platform_mp_get_core_cnt();
-   mp_maxid = core_cnt - 1;
+   mp_ncpus = platform_mp_get_core_cnt();
+   mp_maxid = mp_ncpus - 1;
 }
 
 int
 platform_mp_probe(void)
 {
-   mp_ncpus = platform_mp_get_core_cnt();
return (1);
 }
 

Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c
==
--- head/sys/arm/mv/armadaxp/armadaxp_mp.c  Sun Nov  8 14:22:57 2015
(r290546)
+++ head/sys/arm/mv/armadaxp/armadaxp_mp.c  Sun Nov  8 14:26:50 2015
(r290547)
@@ -82,15 +82,14 @@ void
 platform_mp_setmaxid(void)
 {
 
-   mp_maxid = 3;
+   mp_ncpus = platform_get_ncpus();
+   mp_maxid = mp_ncpus - 1;
 }
 
 int
 platform_mp_probe(void)
 {
 
-   mp_ncpus = platform_get_ncpus();
-
return (mp_ncpus > 1);
 }
 

Modified: head/sys/arm/qemu/virt_mp.c
==
--- head/sys/arm/qemu/virt_mp.c Sun Nov  8 14:22:57 2015(r290546)
+++ head/sys/arm/qemu/virt_mp.c Sun Nov  8 14:26:50 2015(r290547)
@@ -49,17 +49,8 @@ static int running_cpus;
 int
 platform_mp_probe(void)
 {
-   int ncpus;
 
-   ncpus = ofw_cpu_early_foreach(NULL, true);
-   if (ncpus <= 1) {
-   mp_ncpus = 1;
-   return (0);
-   }
-
-   mp_ncpus = MIN(ncpus, MAXCPU);
-
-   return (1);
+   return (mp_ncpus > 1);
 }
 
 static boolean_t
@@ -77,7 +68,10 @@ platform_mp_setmaxid(void)
 {
 
mp_maxid = PCPU_GET(cpuid);
-   ofw_cpu_early_foreach(virt_maxid, true);
+   mp_ncpus = ofw_cpu_early_foreach(virt_maxid, true);
+   if (mp_ncpus < 1)
+   mp_ncpus = 1;
+   mp_ncpus = MIN(ncpus, MAXCPU);
 }
 
 static boolean_t

Modified: head/sys/arm/ti/omap4/omap4_mp.c
==
--- head/sys/arm/ti/omap4/omap4_mp.cSun Nov  8 14:22:57 2015
(r290546)
+++ head/sys/arm/ti/omap4/omap4_mp.cSun Nov  8 14:26:50 2015
(r290547)
@@ -51,14 +51,14 @@ void
 platform_mp_setmaxid(void)
 {
 
-mp_maxid = 1;
+   mp_maxid = 1;
+   mp_ncpus = 2;
 }
 
 int
 platform_mp_probe(void)
 {
 
-   mp_ncpus = 2;
return (1);
 }
 

Modified: head/sys/arm/xilinx/zy7_mp.c
==
--- head/sys/arm/xilinx/zy7_mp.cSun Nov  8 14:22:57 2015
(r290546)
+++ head/sys/arm/xilinx/zy7_mp.cSun Nov  8 14:26:50 2015
(r290547)
@@ -57,13 +57,13 @@ platform_mp_setmaxid(void)
 {
 
mp_maxid = 1;
+   mp_ncpus = 2;
 }
 
 int
 platform_mp_probe(void)
 {
 
-   mp_ncpus = 2;
return (1);
 }
 

Modified: head/sys/kern/subr_smp.c
==
--- head/sys/kern/subr_smp.cSun Nov  8 14:22:57 2015(r290546)
+++ head/sys/kern/subr_smp.cSun Nov  8 14:26:50 2015(r290547)
@@ -125,7 +125,15 @@ struct mtx smp_ipi_mtx;
 static void
 mp_setmaxid(void *dummy)
 {
+
cpu_mp_setmaxid();
+
+   KASSERT(mp_ncpus >= 1, ("%s: CPU count < 1", __func__));
+   KASSERT(mp_ncpus > 1 || mp_maxid == 0,
+   ("%s: one CPU but mp_maxid is not zero", __func__));
+   KASSERT(mp_maxid >= mp_ncpus - 1,
+   ("%s: counters out of sync: max %d, count %d", __func__,
+   mp_maxid, mp_ncpus));
 }
 SYSINIT(cpu_mp_setmaxid, SI_SUB_TUNABLES, SI_ORDER_FIRST, mp_setmaxid, NULL);
 

Modified: head/sys/x86/x86/mp_x86.c
==
--- head/sys/x86/x86/mp_x86.c   Sun Nov  8 14:22:57 2015(r290546)
+++ head/sys/x86/x86/mp_x86.c   Sun Nov  8 14:26:50 2015(r290547)
@@ -425,18 +425,11 @@ cpu_mp_setmaxid(void)
 {
 
/*
-* mp_maxid should be 

svn commit: r290542 - head/sys/dev/usb/controller

2015-11-08 Thread Hans Petter Selasky
Author: hselasky
Date: Sun Nov  8 09:37:26 2015
New Revision: 290542
URL: https://svnweb.freebsd.org/changeset/base/290542

Log:
  Avoid using the bounce buffer when the source or destination buffer is
  32-bits aligned. Merge the two bounce buffers into a single one. Some
  rough tests showed that the DWC OTG throughput on RPI2 increased by
  10% after this patch.
  
  MFC after:1 week

Modified:
  head/sys/dev/usb/controller/dwc_otg.c
  head/sys/dev/usb/controller/dwc_otg.h

Modified: head/sys/dev/usb/controller/dwc_otg.c
==
--- head/sys/dev/usb/controller/dwc_otg.c   Sun Nov  8 08:31:34 2015
(r290541)
+++ head/sys/dev/usb/controller/dwc_otg.c   Sun Nov  8 09:37:26 2015
(r290542)
@@ -181,6 +181,110 @@ dwc_otg_get_hw_ep_profile(struct usb_dev
 }
 
 static void
+dwc_otg_write_fifo(struct dwc_otg_softc *sc, struct usb_page_cache *pc,
+uint32_t offset, uint32_t fifo, uint32_t count)
+{
+   uint32_t temp;
+
+   /* round down length to nearest 4-bytes */
+   temp = count & ~3;
+
+   /* check if we can write the data directly */
+   if (temp != 0 && usb_pc_buffer_is_aligned(pc, offset, temp, 3)) {
+   struct usb_page_search buf_res;
+
+   /* pre-subtract length */
+   count -= temp;
+
+   /* iterate buffer list */
+   do {
+   /* get current buffer pointer */
+   usbd_get_page(pc, offset, _res);
+
+   if (buf_res.length > temp)
+   buf_res.length = temp;
+
+   /* transfer data into FIFO */
+   bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl,
+   fifo, buf_res.buffer, buf_res.length / 4);
+
+   offset += buf_res.length;
+   fifo += buf_res.length;
+   temp -= buf_res.length;
+   } while (temp != 0);
+   }
+
+   /* check for remainder */
+   if (count != 0) {
+   /* clear topmost word before copy */
+   sc->sc_bounce_buffer[(count - 1) / 4] = 0;
+
+   /* copy out data */
+   usbd_copy_out(pc, offset,
+   sc->sc_bounce_buffer, count);
+
+   /* transfer data into FIFO */
+   bus_space_write_region_4(sc->sc_io_tag,
+   sc->sc_io_hdl, fifo, sc->sc_bounce_buffer,
+   (count + 3) / 4);
+   }
+}
+
+static void
+dwc_otg_read_fifo(struct dwc_otg_softc *sc, struct usb_page_cache *pc,
+uint32_t offset, uint32_t count)
+{
+   uint32_t temp;
+
+   /* round down length to nearest 4-bytes */
+   temp = count & ~3;
+
+   /* check if we can read the data directly */
+   if (temp != 0 && usb_pc_buffer_is_aligned(pc, offset, temp, 3)) {
+   struct usb_page_search buf_res;
+
+   /* pre-subtract length */
+   count -= temp;
+
+   /* iterate buffer list */
+   do {
+   /* get current buffer pointer */
+   usbd_get_page(pc, offset, _res);
+
+   if (buf_res.length > temp)
+   buf_res.length = temp;
+
+   /* transfer data from FIFO */
+   bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl,
+   sc->sc_current_rx_fifo, buf_res.buffer, 
buf_res.length / 4);
+
+   offset += buf_res.length;
+   sc->sc_current_rx_fifo += buf_res.length;
+   sc->sc_current_rx_bytes -= buf_res.length;
+   temp -= buf_res.length;
+   } while (temp != 0);
+   }
+
+   /* check for remainder */
+   if (count != 0) {
+   /* read data into bounce buffer */
+   bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl,
+   sc->sc_current_rx_fifo,
+   sc->sc_bounce_buffer, (count + 3) / 4);
+
+   /* store data into proper buffer */
+   usbd_copy_in(pc, offset, sc->sc_bounce_buffer, count);
+
+   /* round length up to nearest 4 bytes */
+   count = (count + 3) & ~3;
+
+   /* update counters */
+   sc->sc_current_rx_bytes -= count;
+   sc->sc_current_rx_fifo += count;
+   }
+}
+
+static void
 dwc_otg_tx_fifo_reset(struct dwc_otg_softc *sc, uint32_t value)
 {
uint32_t temp;
@@ -579,6 +683,14 @@ dwc_otg_common_rx_ack(struct dwc_otg_sof
sc->sc_irq_mask |= GINTMSK_RXFLVLMSK;
DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask);
 
+   if (sc->sc_current_rx_bytes != 0) {
+   /* need to dump remaining data */
+   bus_space_read_region_4(sc->sc_io_tag, sc->sc_io_hdl,
+   

Re: svn commit: r290522 - head/share/timedef

2015-11-08 Thread Hajimu UMEMOTO
Hi,

> On Sun, 8 Nov 2015 01:08:18 +0100
> Baptiste Daroussin  said:

bapt> They are auto generated, I will try to have a look to fix the generation 
tool so
bapt> we won't get hit by it next time.

Oops, I dodn't notice that.
It seems that Linux does similar way.
I think it should be fixed by the origin data rather than by the
generation tool.
I don't test it, but perhaps the attached change should fix it:

bapt> Thanks for the fix!

You are welcome.

Sincerely,

Index: ja_JP.UTF-8.src
diff -u ja_JP.UTF-8.src.orig ja_JP.UTF-8.src
--- ja_JP.UTF-8.src.orig	2015-11-08 20:26:46.948186000 +0900
+++ ja_JP.UTF-8.src	2015-11-08 20:29:37.892220775 +0900
@@ -68015,15 +68015,15 @@
 "";/
 ""
 
-abmon   "";/
-"";/
-"";/
-"";/
-"";/
-"";/
-"";/
-"";/
-"";/
+abmon   "";/
+"";/
+"";/
+"";/
+"";/
+"";/
+"";/
+"";/
+"";/
 "";/
 "";/
 ""

--
Hajimu UMEMOTO
u...@mahoroba.org  u...@freebsd.org
http://www.mahoroba.org/~ume/
___
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: r290545 - head/sys/netpfil/ipfw

2015-11-08 Thread Alexander V. Chernikov
Author: melifaro
Date: Sun Nov  8 13:44:21 2015
New Revision: 290545
URL: https://svnweb.freebsd.org/changeset/base/290545

Log:
  Print proper setfib values in ipfw log.
  
  Submitted by: Denis Schneider 

Modified:
  head/sys/netpfil/ipfw/ip_fw_log.c

Modified: head/sys/netpfil/ipfw/ip_fw_log.c
==
--- head/sys/netpfil/ipfw/ip_fw_log.c   Sun Nov  8 13:37:16 2015
(r290544)
+++ head/sys/netpfil/ipfw/ip_fw_log.c   Sun Nov  8 13:44:21 2015
(r290545)
@@ -352,7 +352,7 @@ ipfw_log(struct ip_fw_chain *chain, stru
break;
case O_SETFIB:
snprintf(SNPARGS(action2, 0), "SetFib %d",
-   TARG(cmd->arg1, fib));
+   TARG(cmd->arg1, fib) & 0x7FFF);
break;
case O_SKIPTO:
snprintf(SNPARGS(action2, 0), "SkipTo %d",
___
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: r290546 - stable/10/usr.bin/bsdiff/bsdiff

2015-11-08 Thread Andrey A. Chernov
Author: ache
Date: Sun Nov  8 14:22:57 2015
New Revision: 290546
URL: https://svnweb.freebsd.org/changeset/base/290546

Log:
  MFC: r290329,r290336
  PR: 204230
  
  r290329:
  
  Use meaningful errno for ssize_t overflow in read().
  Catch size_t overflow in malloc().
  
  r290336:
  
  Check for (old|new)size + 1 overflows off_t.

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

Modified: stable/10/usr.bin/bsdiff/bsdiff/bsdiff.c
==
--- stable/10/usr.bin/bsdiff/bsdiff/bsdiff.cSun Nov  8 13:44:21 2015
(r290545)
+++ stable/10/usr.bin/bsdiff/bsdiff/bsdiff.cSun Nov  8 14:22:57 2015
(r290546)
@@ -31,7 +31,10 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -221,8 +224,17 @@ int main(int argc,char *argv[])
/* Allocate oldsize+1 bytes instead of oldsize bytes to ensure
that we never try to malloc(0) and get a NULL pointer */
if(((fd=open(argv[1],O_RDONLY|O_BINARY,0))<0) ||
-   ((oldsize=lseek(fd,0,SEEK_END))==-1) ||
-   ((old=malloc(oldsize+1))==NULL) ||
+   ((oldsize=lseek(fd,0,SEEK_END))==-1))
+   err(1, "%s", argv[1]);
+
+   if (oldsize > SSIZE_MAX ||
+   (uintmax_t)oldsize >= SIZE_T_MAX / sizeof(off_t) ||
+   oldsize == OFF_MAX) {
+   errno = EFBIG;
+   err(1, "%s", argv[1]);
+   }
+
+   if (((old=malloc(oldsize+1))==NULL) ||
(lseek(fd,0,SEEK_SET)!=0) ||
(read(fd,old,oldsize)!=oldsize) ||
(close(fd)==-1)) err(1,"%s",argv[1]);
@@ -237,8 +249,16 @@ int main(int argc,char *argv[])
/* Allocate newsize+1 bytes instead of newsize bytes to ensure
that we never try to malloc(0) and get a NULL pointer */
if(((fd=open(argv[2],O_RDONLY|O_BINARY,0))<0) ||
-   ((newsize=lseek(fd,0,SEEK_END))==-1) ||
-   ((new=malloc(newsize+1))==NULL) ||
+   ((newsize=lseek(fd,0,SEEK_END))==-1))
+   err(1, "%s", argv[2]);
+
+   if (newsize > SSIZE_MAX || (uintmax_t)newsize >= SIZE_T_MAX ||
+   newsize == OFF_MAX) {
+   errno = EFBIG;
+   err(1, "%s", argv[2]);
+   }
+
+   if (((new=malloc(newsize+1))==NULL) ||
(lseek(fd,0,SEEK_SET)!=0) ||
(read(fd,new,newsize)!=newsize) ||
(close(fd)==-1)) err(1,"%s",argv[2]);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r290549 - head/lib/libc/stdio

2015-11-08 Thread Andrey A. Chernov
Author: ache
Date: Sun Nov  8 18:00:44 2015
New Revision: 290549
URL: https://svnweb.freebsd.org/changeset/base/290549

Log:
  Reorganize code to elimitate one _sseek() call for append modes.
  
  MFC after:  1 week

Modified:
  head/lib/libc/stdio/ftell.c

Modified: head/lib/libc/stdio/ftell.c
==
--- head/lib/libc/stdio/ftell.c Sun Nov  8 17:33:48 2015(r290548)
+++ head/lib/libc/stdio/ftell.c Sun Nov  8 18:00:44 2015(r290549)
@@ -98,7 +98,20 @@ _ftello(FILE *fp, fpos_t *offset)
 * Find offset of underlying I/O object, then
 * adjust for buffered bytes.
 */
-   if (fp->_flags & __SOFF)
+   if (!(fp->_flags & __SRD) && (fp->_flags & __SWR) &&
+   fp->_p != NULL && fp->_p - fp->_bf._base > 0 &&
+   ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP))) {
+   if ((pos = _sseek(fp, (fpos_t)0, SEEK_END)) == -1) {
+   if (errno == ESPIPE ||
+   (fp->_flags & __SOPT) || __sflush(fp) ||
+   (pos = _sseek(fp, (fpos_t)0, SEEK_CUR)) == -1)
+   return (1);
+   else {
+   *offset = pos;
+   return (0);
+   }
+   }
+   } else if (fp->_flags & __SOFF)
pos = fp->_offset;
else {
pos = _sseek(fp, (fpos_t)0, SEEK_CUR);
@@ -125,26 +138,6 @@ _ftello(FILE *fp, fpos_t *offset)
 * position to be greater than that in the
 * underlying object.
 */
-   if ((fp->_flags & __SAPP) || (fp->_flags2 & __S2OAP)) {
-   int serrno = errno;
-
-   errno = 0;
-   if ((pos = _sseek(fp, (fpos_t)0, SEEK_END)) == -1) {
-   if (errno == ESPIPE ||
-   (fp->_flags & __SOPT) || __sflush(fp) ||
-   (pos =
-   _sseek(fp, (fpos_t)0, SEEK_CUR)) == -1)
-   return (1);
-   else {
-   errno = serrno;
-   *offset = pos;
-   return (0);
-   }
-   }
-   errno = serrno;
-   /* fp->_p can be changed in _sseek(), recalculate. */
-   n = fp->_p - fp->_bf._base;
-   }
if (pos > OFF_MAX - n) {
errno = EOVERFLOW;
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"


Re: svn commit: r290522 - head/share/timedef

2015-11-08 Thread Baptiste Daroussin
On Sat, Nov 07, 2015 at 04:15:08PM -0800, Bryan Drewery wrote:
> On 11/7/2015 4:08 PM, Baptiste Daroussin wrote:
> > On Sat, Nov 07, 2015 at 11:54:14PM +, Hajimu UMEMOTO wrote:
> >> Author: ume
> >> Date: Sat Nov  7 23:54:14 2015
> >> New Revision: 290522
> >> URL: https://svnweb.freebsd.org/changeset/base/290522
> >>
> >> Log:
> >>   Fix alignment of the short month names for CJK locales,
> >>   as far as I could edit them.
> >>
> > 
> > They are auto generated, I will try to have a look to fix the generation 
> > tool so
> > we won't get hit by it next time.
> > 
> > Thanks for the fix!
> > 
> 
> How much effort is involved to generate them? Should the build generate
> them instead?
> 
The effort is really easy now, all the work was to get the proper tools which we
now have on tools/tools/locales this work was already done by edwin@ there is a
wiki page about it (forgot the link) and extended by marino@ on dfly.

Best regards,
Bapt


signature.asc
Description: PGP signature


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

2015-11-08 Thread Oliver Pinter
On 8/19/15, Renato Botelho  wrote:
>> On Aug 19, 2015, at 18:31, Adrian Chadd  wrote:
>>
>> jim asked me again to do the MFC, so once I've finished doing some
>> more tidying up of bits and pieces I'll do the MFC.

What's the status of this MFC? You need a tester or you have a patch?

>
> Thank you very much!
>
> --
> Renato Botelho
>
>
___
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: r290555 - head/sys/dev/drm2/i915

2015-11-08 Thread Jean-Sébastien Pédron
Author: dumbbell
Date: Sun Nov  8 19:29:34 2015
New Revision: 290555
URL: https://svnweb.freebsd.org/changeset/base/290555

Log:
  drm/i915: Reduce diff with Linux 3.8
  
  There is no functional change. The goal is to ease the future update to
  Linux 3.8's i915 driver.
  
  MFC after:2 months

Modified:
  head/sys/dev/drm2/i915/intel_fb.c

Modified: head/sys/dev/drm2/i915/intel_fb.c
==
--- head/sys/dev/drm2/i915/intel_fb.c   Sun Nov  8 19:08:38 2015
(r290554)
+++ head/sys/dev/drm2/i915/intel_fb.c   Sun Nov  8 19:29:34 2015
(r290555)
@@ -32,9 +32,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
-#include 
 
 static int intelfb_create(struct intel_fbdev *ifbdev,
  struct drm_fb_helper_surface_size *sizes)
@@ -45,7 +45,7 @@ static int intelfb_create(struct intel_f
 #endif
struct fb_info *info;
struct drm_framebuffer *fb;
-   struct drm_mode_fb_cmd2 mode_cmd;
+   struct drm_mode_fb_cmd2 mode_cmd = {};
struct drm_i915_gem_object *obj;
int size, ret;
 
@@ -57,7 +57,7 @@ static int intelfb_create(struct intel_f
mode_cmd.height = sizes->surface_height;
 
mode_cmd.pitches[0] = roundup2(mode_cmd.width * ((sizes->surface_bpp + 
7) /
-8), 64);
+ 8), 64);
mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
  sizes->surface_depth);
 
@@ -143,6 +143,7 @@ static int intelfb_create(struct intel_f
drm_fb_helper_fill_var(info, >helper, sizes->fb_width, 
sizes->fb_height);
 
/* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
+
DRM_DEBUG_KMS("allocated %dx%d (s %dbits) fb: 0x%08x, bo %p\n",
  fb->width, fb->height, fb->depth,
  obj->gtt_offset, obj);
@@ -222,8 +223,7 @@ int intel_fbdev_init(struct drm_device *
drm_i915_private_t *dev_priv = dev->dev_private;
int ret;
 
-   ifbdev = malloc(sizeof(struct intel_fbdev), DRM_MEM_KMS,
-   M_WAITOK | M_ZERO);
+   ifbdev = malloc(sizeof(struct intel_fbdev), DRM_MEM_KMS, M_WAITOK | 
M_ZERO);
 
dev_priv->fbdev = ifbdev;
ifbdev->helper.funcs = _fb_helper_funcs;
___
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: r290557 - head/sys/dev/ofw

2015-11-08 Thread Andreas Tobler
Author: andreast
Date: Sun Nov  8 21:06:51 2015
New Revision: 290557
URL: https://svnweb.freebsd.org/changeset/base/290557

Log:
  Improve r290373, do a runtime check rather than a compile time switch. I
  learned that the Power8 and the PS3 have a mix of OFW and FDT. Both have AIM
  defined. But currently they are not affected. They have no I2C devices under
  OFW.
  
  This version was tested on a Quad G5 and build tested for armv6*.
  
  Discussed withnwhitehorn@
  Reviewed by:  ian@

Modified:
  head/sys/dev/ofw/ofw_iicbus.c

Modified: head/sys/dev/ofw/ofw_iicbus.c
==
--- head/sys/dev/ofw/ofw_iicbus.c   Sun Nov  8 20:56:04 2015
(r290556)
+++ head/sys/dev/ofw/ofw_iicbus.c   Sun Nov  8 21:06:51 2015
(r290557)
@@ -101,9 +101,13 @@ ofw_iicbus_attach(device_t dev)
 {
struct iicbus_softc *sc = IICBUS_SOFTC(dev);
struct ofw_iicbus_devinfo *dinfo;
-   phandle_t child, node;
+   phandle_t child, node, root;
pcell_t freq, paddr;
device_t childdev;
+   ssize_t compatlen;
+   char compat[255];
+   char *curstr;
+   u_int iic_addr_8bit = 0;
 
sc->dev = dev;
mtx_init(>lock, "iicbus", NULL, MTX_DEF);
@@ -125,6 +129,21 @@ ofw_iicbus_attach(device_t dev)
bus_enumerate_hinted_children(dev);
 
/*
+* Check if we're running on a PowerMac, needed for the I2C
+* address below.
+*/
+   root = OF_peer(0);
+   compatlen = OF_getprop(root, "compatible", compat,
+   sizeof(compat));
+   if (compatlen != -1) {
+   for (curstr = compat; curstr < compat + compatlen;
+   curstr += strlen(curstr) + 1) {
+   if (strncmp(curstr, "MacRISC", 7) == 0)
+   iic_addr_8bit = 1;
+   }
+   }
+
+   /*
 * Attach those children represented in the device tree.
 */
for (child = OF_child(node); child != 0; child = OF_peer(child)) {
@@ -153,11 +172,11 @@ ofw_iicbus_attach(device_t dev)
 * Linux FDT data contains 7-bit values, so shift them up to
 * 8-bit format.
 */
-#ifdef AIM
-   dinfo->opd_dinfo.addr = paddr;
-#else
-   dinfo->opd_dinfo.addr = paddr << 1;
-#endif
+   if (iic_addr_8bit)
+   dinfo->opd_dinfo.addr = paddr;
+   else
+   dinfo->opd_dinfo.addr = paddr << 1;
+
if (ofw_bus_gen_setup_devinfo(>opd_obdinfo, child) !=
0) {
free(dinfo, M_DEVBUF);
___
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: r290558 - head/sys/arm64/conf

2015-11-08 Thread Ed Maste
Author: emaste
Date: Sun Nov  8 21:08:31 2015
New Revision: 290558
URL: https://svnweb.freebsd.org/changeset/base/290558

Log:
  Sync arm64 GENERIC whitespace/comments with amd64
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/arm64/conf/GENERIC

Modified: head/sys/arm64/conf/GENERIC
==
--- head/sys/arm64/conf/GENERIC Sun Nov  8 21:06:51 2015(r290557)
+++ head/sys/arm64/conf/GENERIC Sun Nov  8 21:08:31 2015(r290558)
@@ -28,7 +28,7 @@ options   SCHED_ULE   # ULE scheduler
 optionsPREEMPTION  # Enable kernel thread preemption
 optionsINET# InterNETworking
 optionsINET6   # IPv6 communications protocols
-optionsIPSEC   # IP (v4/v6) security
+optionsIPSEC   # IP (v4/v6) security
 optionsTCP_OFFLOAD # TCP offload
 optionsSCTP# Stream Control Transmission Protocol
 optionsFFS # Berkeley Fast Filesystem
@@ -38,8 +38,8 @@ options   UFS_DIRHASH # Improve performa
 optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
 optionsQUOTA   # Enable disk quotas for UFS
 optionsMD_ROOT # MD is a potential root device
-optionsNFSCL   # New Network Filesystem Client
-optionsNFSD# New Network Filesystem Server
+optionsNFSCL   # Network Filesystem Client
+optionsNFSD# Network Filesystem Server
 optionsNFSLOCKD# Network Lock Manager
 optionsNFS_ROOT# NFS usable as /, requires NFSCL
 optionsMSDOSFS # MSDOS Filesystem
@@ -95,8 +95,8 @@ devicevirtio_blk
 device vtnet
 
 # Bus drivers
-optionsPCI_IOV
 device pci
+optionsPCI_IOV # PCI SR-IOV support
 
 # Ethernet NICs
 device vnic# Cavium ThunderX NIC
___
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: r290560 - head/lib/libc/tests/stdio

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Sun Nov  8 21:38:46 2015
New Revision: 290560
URL: https://svnweb.freebsd.org/changeset/base/290560

Log:
  Convert print_positional_test over to ATF
  
  Somehow missed in r290537
  
  X-MFC with: r290537
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

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

Modified: head/lib/libc/tests/stdio/print_positional_test.c
==
--- head/lib/libc/tests/stdio/print_positional_test.c   Sun Nov  8 21:22:24 
2015(r290559)
+++ head/lib/libc/tests/stdio/print_positional_test.c   Sun Nov  8 21:38:46 
2015(r290560)
@@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 const char correct[] =
"|xx 01 02 03 04\n"
"|xx 05 06 07 08\n"
@@ -53,15 +55,13 @@ const char correct[] =
 
 const char correct2[] =
"b bs BSD";
+static char buf[1024];
+static wchar_t wbuf1[1024], wbuf2[1024];
+static const char *temp;
 
-int
-main(int argc, char *argv[])
+ATF_TC_WITHOUT_HEAD(positional_normal);
+ATF_TC_BODY(positional_normal, tc)
 {
-   char buf[1024];
-   wchar_t wbuf1[1024], wbuf2[1024];
-   const char *temp;
-
-   printf("1..4\n");
 
/* Test positional arguments */
snprintf(buf, sizeof buf,
@@ -86,8 +86,13 @@ main(int argc, char *argv[])
"37", "38", "39", "40", "41", "42",
"43", "44", 45, -1L, 1LL, -1, 1LL
);
-   printf("%sok 1 - print-positional normal\n",
-  strcmp(buf, correct) == 0 ? "" : "not ");
+   ATF_REQUIRE_MSG(wcscmp(wbuf1, wbuf2) == 0,
+   "buffers didn't match");
+}
+
+ATF_TC_WITHOUT_HEAD(positional_wide);
+ATF_TC_BODY(positional_wide, tc)
+{
 
swprintf(wbuf1, sizeof wbuf1,
L"|xx %1$s %2$s %3$s %4$s\n"
@@ -113,20 +118,39 @@ main(int argc, char *argv[])
);
temp = correct;
mbsrtowcs(wbuf2, , sizeof wbuf2, NULL);
-   printf("%sok 2 - print-positional wide\n",
-  wcscmp(wbuf1, wbuf2) == 0 ? "" : "not ");
+   ATF_REQUIRE_MSG(wcscmp(wbuf1, wbuf2) == 0,
+   "buffers didn't match");
+}
+
+ATF_TC_WITHOUT_HEAD(positional_precision);
+ATF_TC_BODY(positional_precision, tc)
+{
 
snprintf(buf, sizeof buf, "%2$.*4$s %2$.*3$s %1$s",
 "BSD", "bsd", 2, 1);
-   printf("%sok 3 - print-positional precision\n",
-  strcmp(buf, correct2) == 0 ? "" : "not ");
+   ATF_REQUIRE_MSG(strcmp(buf, correct2) == 0,
+   "buffers didn't match");
+}
+
+ATF_TC_WITHOUT_HEAD(positional_precision_wide);
+ATF_TC_BODY(positional_precision_wide, tc)
+{
 
swprintf(wbuf1, sizeof buf, L"%2$.*4$s %2$.*3$s %1$s",
 "BSD", "bsd", 2, 1);
temp = correct2;
mbsrtowcs(wbuf2, , sizeof wbuf2, NULL);
-   printf("%sok 4 - print-positional precision wide\n",
-  wcscmp(wbuf1, wbuf2) == 0 ? "" : "not ");
+   ATF_REQUIRE_MSG(wcscmp(wbuf1, wbuf2) == 0,
+   "buffers didn't match");
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+
+   ATF_TP_ADD_TC(tp, positional_normal);
+   ATF_TP_ADD_TC(tp, positional_wide);
+   ATF_TP_ADD_TC(tp, positional_precision);
+   ATF_TP_ADD_TC(tp, positional_precision_wide);
 
-   exit(0);
+   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: r290548 - in head/sbin: init reboot

2015-11-08 Thread Edward Tomasz Napierala
Author: trasz
Date: Sun Nov  8 17:33:48 2015
New Revision: 290548
URL: https://svnweb.freebsd.org/changeset/base/290548

Log:
  Userspace part of reroot support. This makes it possible to change
  the root filesystem without full reboot, using "reboot -r". This can
  be used to to eg. boot from a temporary md_image preloaded by loader(8),
  setup an iSCSI session, and continue booting from rootfs mounted over
  iSCSI.
  
  Reviewed by:  kib@, bapt@
  MFC after:1 month
  Relnotes: yes
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D3693

Modified:
  head/sbin/init/Makefile
  head/sbin/init/init.c
  head/sbin/init/pathnames.h
  head/sbin/reboot/reboot.8
  head/sbin/reboot/reboot.c

Modified: head/sbin/init/Makefile
==
--- head/sbin/init/Makefile Sun Nov  8 14:26:50 2015(r290547)
+++ head/sbin/init/Makefile Sun Nov  8 17:33:48 2015(r290548)
@@ -2,12 +2,18 @@
 # $FreeBSD$
 
 PROG=  init
+SRCS=  init.c getmntopts.c
 MAN=   init.8
 PRECIOUSPROG=
 INSTALLFLAGS=-b -B.bak
 CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT
 LIBADD=util crypt
 
+# Needed for getmntopts.c
+MOUNT= ${.CURDIR}/../../sbin/mount
+CFLAGS+=-I${MOUNT}
+.PATH: ${MOUNT}
+
 NO_SHARED?=YES
 
 .include 

Modified: head/sbin/init/init.c
==
--- head/sbin/init/init.c   Sun Nov  8 14:26:50 2015(r290547)
+++ head/sbin/init/init.c   Sun Nov  8 17:33:48 2015(r290548)
@@ -46,6 +46,7 @@ static const char rcsid[] =
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -79,6 +80,7 @@ static const char rcsid[] =
 #include 
 #endif
 
+#include "mntopts.h"
 #include "pathnames.h"
 
 /*
@@ -103,6 +105,7 @@ static void warning(const char *, ...) _
 static void emergency(const char *, ...) __printflike(1, 2);
 static void disaster(int);
 static void badsys(int);
+static void revoke_ttys(void);
 static int  runshutdown(void);
 static char *strk(char *);
 
@@ -122,6 +125,8 @@ static state_func_t clean_ttys(void);
 static state_func_t catatonia(void);
 static state_func_t death(void);
 static state_func_t death_single(void);
+static state_func_t reroot(void);
+static state_func_t reroot_phase_two(void);
 
 static state_func_t run_script(const char *);
 
@@ -193,7 +198,7 @@ main(int argc, char *argv[])
 {
state_t initial_transition = runcom;
char kenv_value[PATH_MAX];
-   int c;
+   int c, error;
struct sigaction sa;
sigset_t mask;
 
@@ -226,6 +231,9 @@ main(int argc, char *argv[])
case 'q': /* rescan /etc/ttys */
sig = SIGHUP;
break;
+   case 'r': /* remount root */
+   sig = SIGEMT;
+   break;
default:
goto invalid;
}
@@ -247,7 +255,7 @@ invalid:
/*
 * Create an initial session.
 */
-   if (setsid() < 0)
+   if (setsid() < 0 && (errno != EPERM || getsid(0) != 1))
warning("initial setsid() failed: %m");
 
/*
@@ -261,7 +269,7 @@ invalid:
 * This code assumes that we always get arguments through flags,
 * never through bits set in some random machine register.
 */
-   while ((c = getopt(argc, argv, "dsf")) != -1)
+   while ((c = getopt(argc, argv, "dsfr")) != -1)
switch (c) {
case 'd':
devfs = 1;
@@ -272,6 +280,9 @@ invalid:
case 'f':
runcom_mode = FASTBOOT;
break;
+   case 'r':
+   initial_transition = reroot_phase_two;
+   break;
default:
warning("unrecognized flag '-%c'", c);
break;
@@ -287,13 +298,13 @@ invalid:
handle(badsys, SIGSYS, 0);
handle(disaster, SIGABRT, SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGXCPU,
SIGXFSZ, 0);
-   handle(transition_handler, SIGHUP, SIGINT, SIGTERM, SIGTSTP, SIGUSR1,
-   SIGUSR2, 0);
+   handle(transition_handler, SIGHUP, SIGINT, SIGEMT, SIGTERM, SIGTSTP,
+   SIGUSR1, SIGUSR2, 0);
handle(alrm_handler, SIGALRM, 0);
sigfillset();
delset(, SIGABRT, SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGSYS,
-   SIGXCPU, SIGXFSZ, SIGHUP, SIGINT, SIGTERM, SIGTSTP, SIGALRM,
-   SIGUSR1, SIGUSR2, 0);
+   SIGXCPU, SIGXFSZ, SIGHUP, SIGINT, SIGEMT, SIGTERM, SIGTSTP,
+   SIGALRM, SIGUSR1, SIGUSR2, 0);
sigprocmask(SIG_SETMASK, , (sigset_t *) 0);
sigemptyset(_mask);
sa.sa_flags = 

Re: svn commit: r290522 - head/share/timedef

2015-11-08 Thread Baptiste Daroussin
On Sun, Nov 08, 2015 at 08:49:42PM +0900, Hajimu UMEMOTO wrote:
> Hi,
> 
> > On Sun, 8 Nov 2015 01:08:18 +0100
> > Baptiste Daroussin  said:
> 
> bapt> They are auto generated, I will try to have a look to fix the 
> generation tool so
> bapt> we won't get hit by it next time.
> 
> Oops, I dodn't notice that.
> It seems that Linux does similar way.
> I think it should be fixed by the origin data rather than by the
> generation tool.
> I don't test it, but perhaps the attached change should fix it:
> 
> bapt> Thanks for the fix!
> 
> You are welcome.
> 
> Sincerely,
> 

The origin data are available there http://cldr.unicode.org/ they have a trac
(sorry I do not remember the link :)) to report issues. We are right now at v27
the tools to generate our sources are in tools/tools/locale/*.

In the meantime marino@ has modified the tools to generate CJK correctly I will
bring that to freebsd soon.

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fb572e12d4eae3f415ca6a464aecbd14bdbde4ce

Best regards,
Bapt


signature.asc
Description: PGP signature


svn commit: r290552 - head/sys/kern

2015-11-08 Thread Edward Tomasz Napierala
Author: trasz
Date: Sun Nov  8 18:11:24 2015
New Revision: 290552
URL: https://svnweb.freebsd.org/changeset/base/290552

Log:
  Make naming more consistent; no functional changes.
  
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/kern/kern_rctl.c

Modified: head/sys/kern/kern_rctl.c
==
--- head/sys/kern/kern_rctl.c   Sun Nov  8 18:08:31 2015(r290551)
+++ head/sys/kern/kern_rctl.c   Sun Nov  8 18:11:24 2015(r290552)
@@ -71,13 +71,13 @@ FEATURE(rctl, "Resource Limits");
 #defineHRF_DONT_INHERIT1
 #defineHRF_DONT_ACCUMULATE 2
 
-#defineRCTL_MAX_INBUFLEN   4 * 1024
-#defineRCTL_MAX_OUTBUFLEN  16 * 1024 * 1024
+#defineRCTL_MAX_INBUFSIZE  4 * 1024
+#defineRCTL_MAX_OUTBUFSIZE 16 * 1024 * 1024
 #defineRCTL_LOG_BUFSIZE128
 
 #defineRCTL_PCPU_SHIFT (10 * 100)
 
-unsigned int rctl_maxbufsize = RCTL_MAX_OUTBUFLEN;
+unsigned int rctl_maxbufsize = RCTL_MAX_OUTBUFSIZE;
 
 SYSCTL_NODE(_kern_racct, OID_AUTO, rctl, CTLFLAG_RW, 0, "Resource Limits");
 SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, maxbufsize, CTLFLAG_RWTUN,
@@ -1278,7 +1278,7 @@ rctl_read_inbuf(char **inputstr, const c
 
if (inbuflen <= 0)
return (EINVAL);
-   if (inbuflen > RCTL_MAX_INBUFLEN)
+   if (inbuflen > RCTL_MAX_INBUFSIZE)
return (E2BIG);
 
str = malloc(inbuflen + 1, M_RCTL, M_WAITOK);
___
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: r290494 - in head: . contrib/ipfilter contrib/llvm/lib/Target/Sparc/AsmParser contrib/llvm/lib/Target/Sparc/Disassembler contrib/llvm/lib/Target/Sparc/InstPrinter contrib/netbsd-tests/

2015-11-08 Thread Andrey Chernov
On 07.11.2015 15:43, Baptiste Daroussin wrote:
> Log:
>   Improve collation string and locales support
...
> Deleted:
>   head/lib/libc/locale/ascii.c

BTW, why this one is deleted (along with ASCII locales)? It serves its
job as "strict ASCII checker" right.

-- 
http://ache.vniz.net/
___
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: r290553 - head/sys/contrib/vchiq/interface/vchiq_arm

2015-11-08 Thread Svatopluk Kraus
Author: skra
Date: Sun Nov  8 18:48:35 2015
New Revision: 290553
URL: https://svnweb.freebsd.org/changeset/base/290553

Log:
  Fix pagelist bus_dmamap_t map handling. Memory for pagelist is allocated
  by bus_dmamem_alloc() which creates associated bus_dmamap_t map for us.
  When this memory is freed by bus_dmamem_free(), the map is freed as well.
  
  Thus there is no need to free it explicitly by bus_dmamap_destroy(),
  which leads to double freeing.
  
  Discussed with:   gonzo
  Approved by:  kib (mentor)

Modified:
  head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c

Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
==
--- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Sun Nov  8 
18:11:24 2015(r290552)
+++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Sun Nov  8 
18:48:35 2015(r290553)
@@ -542,9 +542,8 @@ create_pagelist(char __user *buf, size_t
return 0;
 
 failed_load:
-   bus_dmamap_unload(bi->pagelist_dma_tag, bi->pagelist_dma_map);
+   bus_dmamem_free(bi->pagelist_dma_tag, bi->pagelist, 
bi->pagelist_dma_map);
 failed_alloc:
-   bus_dmamap_destroy(bi->pagelist_dma_tag, bi->pagelist_dma_map);
bus_dma_tag_destroy(bi->pagelist_dma_tag);
 
return err;
@@ -613,7 +612,6 @@ free_pagelist(BULKINFO_T *bi, int actual
 
bus_dmamap_unload(bi->pagelist_dma_tag, bi->pagelist_dma_map);
bus_dmamem_free(bi->pagelist_dma_tag, bi->pagelist, 
bi->pagelist_dma_map);
-   bus_dmamap_destroy(bi->pagelist_dma_tag, bi->pagelist_dma_map);
bus_dma_tag_destroy(bi->pagelist_dma_tag);
 
free(bi, M_VCPAGELIST);
___
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: r286337 - head/sys/contrib/dev/ath/ath_hal/ar9300

2015-11-08 Thread Oliver Pinter
On Sun, Nov 8, 2015 at 8:24 PM, Adrian Chadd  wrote:
> i'm burnt out and still too busy fixing issues introduced into -head
> (both wifi and low-memory platform support.)

That's bad to read. :(

>
> Someone else at this stage has to MFC things :(

Renator, Avos anyone else?

>
> Sorry,
>
>
> -a
>
>
> On 8 November 2015 at 10:49, Oliver Pinter
>  wrote:
>> On 8/19/15, Renato Botelho  wrote:
 On Aug 19, 2015, at 18:31, Adrian Chadd  wrote:

 jim asked me again to do the MFC, so once I've finished doing some
 more tidying up of bits and pieces I'll do the MFC.
>>
>> What's the status of this MFC? You need a tester or you have a patch?
>>
>>>
>>> Thank you very much!
>>>
>>> --
>>> Renato Botelho
>>>
>>>
___
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: r286337 - head/sys/contrib/dev/ath/ath_hal/ar9300

2015-11-08 Thread Oliver Pinter
On Sun, Nov 8, 2015 at 8:26 PM, Oliver Pinter
 wrote:
> On Sun, Nov 8, 2015 at 8:24 PM, Adrian Chadd  wrote:
>> i'm burnt out and still too busy fixing issues introduced into -head
>> (both wifi and low-memory platform support.)
>
> That's bad to read. :(
>
>>
>> Someone else at this stage has to MFC things :(
>
> Renator, Avos anyone else?

Sorry, Renato

>
>>
>> Sorry,
>>
>>
>> -a
>>
>>
>> On 8 November 2015 at 10:49, Oliver Pinter
>>  wrote:
>>> On 8/19/15, Renato Botelho  wrote:
> On Aug 19, 2015, at 18:31, Adrian Chadd  wrote:
>
> jim asked me again to do the MFC, so once I've finished doing some
> more tidying up of bits and pieces I'll do the MFC.
>>>
>>> What's the status of this MFC? You need a tester or you have a patch?
>>>

 Thank you very much!

 --
 Renato Botelho


___
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: r290494 - in head: . contrib/ipfilter contrib/llvm/lib/Target/Sparc/AsmParser contrib/llvm/lib/Target/Sparc/Disassembler contrib/llvm/lib/Target/Sparc/InstPrinter contrib/netbsd-tests/

2015-11-08 Thread Baptiste Daroussin
On Sun, Nov 08, 2015 at 11:04:36PM +0300, Andrey Chernov wrote:
> On 07.11.2015 15:43, Baptiste Daroussin wrote:
> > Log:
> >   Improve collation string and locales support
> ...
> > Deleted:
> >   head/lib/libc/locale/ascii.c
> 
> BTW, why this one is deleted (along with ASCII locales)? It serves its
> job as "strict ASCII checker" right.
> 
The ASCII locales are still there, just using the same rules for everything as
their unicode counter part except of course for LC_CTYPE.

There was no left usage for that code so I removed it. If there are strong
opinions for bringing it back, I can do it.

Best regards,
Bapt


signature.asc
Description: PGP signature


svn commit: r290550 - head/release/tools

2015-11-08 Thread Glen Barber
Author: gjb
Date: Sun Nov  8 18:02:39 2015
New Revision: 290550
URL: https://svnweb.freebsd.org/changeset/base/290550

Log:
  Use tmpfs(5) instead of md(4) for '/tmp' mount.
  
  Submitted by: Nikolai Lifanov
  Differential Revision:D3506
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/tools/arm.subr

Modified: head/release/tools/arm.subr
==
--- head/release/tools/arm.subr Sun Nov  8 18:00:44 2015(r290549)
+++ head/release/tools/arm.subr Sun Nov  8 18:02:39 2015(r290550)
@@ -110,7 +110,7 @@ arm_install_base() {
>> ${CHROOTDIR}/${DESTDIR}/etc/fstab
echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \
>> ${CHROOTDIR}/${DESTDIR}/etc/fstab
-   echo "md /tmp mfs rw,noatime,-s30m 0 0" \
+   echo "tmpfs /tmp tmpfs rw,noatime,mode=1777,size=30m 0 0" \ 
>> ${CHROOTDIR}/${DESTDIR}/etc/fstab
 
local hostname
___
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: r290559 - head/usr.bin/localedef

2015-11-08 Thread Baptiste Daroussin
Author: bapt
Date: Sun Nov  8 21:22:24 2015
New Revision: 290559
URL: https://svnweb.freebsd.org/changeset/base/290559

Log:
  Eliminate some gcc pragmas

Modified:
  head/usr.bin/localedef/collate.c
  head/usr.bin/localedef/wide.c

Modified: head/usr.bin/localedef/collate.c
==
--- head/usr.bin/localedef/collate.cSun Nov  8 21:08:31 2015
(r290558)
+++ head/usr.bin/localedef/collate.cSun Nov  8 21:22:24 2015
(r290559)
@@ -435,24 +435,19 @@ subst_compare(const void *n1, const void
 
 RB_GENERATE_STATIC(substs, subst, entry, subst_compare);
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wcast-qual"
-
 static int
 subst_compare_ref(const void *n1, const void *n2)
 {
-   int32_t *c1 = ((subst_t *)n1)->ref;
-   int32_t *c2 = ((subst_t *)n2)->ref;
+   const wchar_t *c1 = ((const subst_t *)n1)->ref;
+   const wchar_t *c2 = ((const subst_t *)n2)->ref;
int rv;
 
-   rv = wcscmp((wchar_t *)c1, (wchar_t *)c2);
+   rv = wcscmp(c1, c2);
return ((rv < 0) ? -1 : (rv > 0) ? 1 : 0);
 }
 
 RB_GENERATE_STATIC(substs_ref, subst, entry_ref, subst_compare_ref);
 
-#pragma GCC diagnostic pop
-
 void
 init_collate(void)
 {

Modified: head/usr.bin/localedef/wide.c
==
--- head/usr.bin/localedef/wide.c   Sun Nov  8 21:08:31 2015
(r290558)
+++ head/usr.bin/localedef/wide.c   Sun Nov  8 21:22:24 2015
(r290559)
@@ -310,15 +310,12 @@ tomb_utf8(char *mb, wchar_t wc)
  * 0x8000 - 0x - 2 byte encoding
  */
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wcast-qual"
-
 static int
 towide_dbcs(wchar_t *wc, const char *mb, unsigned n)
 {
wchar_t c;
 
-   c = *(uint8_t *)mb;
+   c = *(const uint8_t *)mb;
 
if ((c & 0x80) == 0) {
/* 7-bit */
@@ -408,7 +405,7 @@ towide_gb18030(wchar_t *wc, const char *
 {
wchar_t c;
 
-   c = *(uint8_t *)mb;
+   c = *(const uint8_t *)mb;
 
if ((c & 0x80) == 0) {
/* 7-bit */
@@ -451,7 +448,7 @@ towide_mskanji(wchar_t *wc, const char *
 {
wchar_t c;
 
-   c = *(uint8_t *)mb;
+   c = *(const uint8_t *)mb;
 
if ((c < 0x80) || ((c > 0xa0) && (c < 0xe0))) {
/* 7-bit */
@@ -487,7 +484,7 @@ towide_euc_impl(wchar_t *wc, const char 
int width = 2;
wchar_t c;
 
-   c = *(uint8_t *)mb;
+   c = *(const uint8_t *)mb;
 
/*
 * All variations of EUC encode 7-bit ASCII as one byte, and use
@@ -528,8 +525,6 @@ towide_euc_impl(wchar_t *wc, const char 
return (width);
 }
 
-#pragma GCC diagnostic pop
-
 /*
  * EUC-CN encodes as follows:
  *
___
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: r290561 - head/lib/libc/tests/locale

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Sun Nov  8 21:57:35 2015
New Revision: 290561
URL: https://svnweb.freebsd.org/changeset/base/290561

Log:
  Delete leftover printfs from when these were TAP tests
  
  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/mbrtoc16_test.c
  head/lib/libc/tests/locale/mbrtowc_test.c
  head/lib/libc/tests/locale/mbsrtowcs_test.c

Modified: head/lib/libc/tests/locale/mblen_test.c
==
--- head/lib/libc/tests/locale/mblen_test.c Sun Nov  8 21:38:46 2015
(r290560)
+++ head/lib/libc/tests/locale/mblen_test.c Sun Nov  8 21:57:35 2015
(r290561)
@@ -53,8 +53,6 @@ ATF_TC_BODY(mblen_test, tc)
 * C/POSIX locale.
 */
 
-   printf("1..1\n");
-
ATF_REQUIRE(MB_CUR_MAX == 1);
 
/* No shift states in C locale. */

Modified: head/lib/libc/tests/locale/mbrtoc16_test.c
==
--- head/lib/libc/tests/locale/mbrtoc16_test.c  Sun Nov  8 21:38:46 2015
(r290560)
+++ head/lib/libc/tests/locale/mbrtoc16_test.c  Sun Nov  8 21:57:35 2015
(r290561)
@@ -53,8 +53,6 @@ ATF_TC_BODY(mbrtoc16_test, tc)
 * C/POSIX locale.
 */
 
-   printf("1..1\n");
-
/* Null wide character, internal state. */
ATF_REQUIRE(mbrtoc16(, "", 1, NULL) == 0);
ATF_REQUIRE(c16 == 0);

Modified: head/lib/libc/tests/locale/mbrtowc_test.c
==
--- head/lib/libc/tests/locale/mbrtowc_test.c   Sun Nov  8 21:38:46 2015
(r290560)
+++ head/lib/libc/tests/locale/mbrtowc_test.c   Sun Nov  8 21:57:35 2015
(r290561)
@@ -57,8 +57,6 @@ ATF_TC_BODY(mbrtowc_test, tc)
 * C/POSIX locale.
 */
 
-   printf("1..1\n");
-
ATF_REQUIRE(MB_CUR_MAX == 1);
 
/* Null wide character, internal state. */

Modified: head/lib/libc/tests/locale/mbsrtowcs_test.c
==
--- head/lib/libc/tests/locale/mbsrtowcs_test.c Sun Nov  8 21:38:46 2015
(r290560)
+++ head/lib/libc/tests/locale/mbsrtowcs_test.c Sun Nov  8 21:57:35 2015
(r290561)
@@ -57,8 +57,6 @@ ATF_TC_BODY(mbsrtowcs_test, tc)
 * C/POSIX locale.
 */
 
-   printf("1..1\n");
-
/* Simple null terminated string. */
memset(srcbuf, 0xcc, sizeof(srcbuf));
strcpy(srcbuf, "hello");
___
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: r290562 - head/usr.bin/localedef

2015-11-08 Thread Baptiste Daroussin
Author: bapt
Date: Sun Nov  8 22:23:21 2015
New Revision: 290562
URL: https://svnweb.freebsd.org/changeset/base/290562

Log:
  lower again the warnings and remove the pragmas unsupported by gcc 4.2.1

Modified:
  head/usr.bin/localedef/Makefile
  head/usr.bin/localedef/monetary.c
  head/usr.bin/localedef/numeric.c
  head/usr.bin/localedef/time.c

Modified: head/usr.bin/localedef/Makefile
==
--- head/usr.bin/localedef/Makefile Sun Nov  8 21:57:35 2015
(r290561)
+++ head/usr.bin/localedef/Makefile Sun Nov  8 22:23:21 2015
(r290562)
@@ -13,7 +13,7 @@ SRCS= charmap.c \
time.c \
wide.c
 
-WARNS= 5
+WARNS= 3
 ${SRCS:M*.c}: parser.h
 parser.h: parser.y
 

Modified: head/usr.bin/localedef/monetary.c
==
--- head/usr.bin/localedef/monetary.c   Sun Nov  8 21:57:35 2015
(r290561)
+++ head/usr.bin/localedef/monetary.c   Sun Nov  8 22:23:21 2015
(r290562)
@@ -151,9 +151,6 @@ add_monetary_num(int n)
}
 }
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wcast-qual"
-
 void
 reset_monetary_group(void)
 {
@@ -178,8 +175,6 @@ add_monetary_group(int n)
mon.mon_grouping = s;
 }
 
-#pragma GCC diagnostic pop
-
 void
 dump_monetary(void)
 {

Modified: head/usr.bin/localedef/numeric.c
==
--- head/usr.bin/localedef/numeric.cSun Nov  8 21:57:35 2015
(r290561)
+++ head/usr.bin/localedef/numeric.cSun Nov  8 22:23:21 2015
(r290562)
@@ -77,9 +77,6 @@ add_numeric_str(wchar_t *wcs)
}
 }
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wcast-qual"
-
 void
 reset_numeric_group(void)
 {
@@ -104,8 +101,6 @@ add_numeric_group(int n)
numeric.grouping = s;
 }
 
-#pragma GCC diagnostic pop
-
 void
 dump_numeric(void)
 {

Modified: head/usr.bin/localedef/time.c
==
--- head/usr.bin/localedef/time.c   Sun Nov  8 21:57:35 2015
(r290561)
+++ head/usr.bin/localedef/time.c   Sun Nov  8 22:23:21 2015
(r290562)
@@ -187,9 +187,6 @@ check_time_list(void)
fprintf(stderr,"too few items in list (%d)", last_kw);
 }
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wcast-qual"
-
 void
 reset_time_list(void)
 {
@@ -228,8 +225,6 @@ reset_time_list(void)
}
 }
 
-#pragma GCC diagnostic pop
-
 void
 dump_time(void)
 {
___
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: r290494 - in head: . contrib/ipfilter contrib/llvm/lib/Target/Sparc/AsmParser contrib/llvm/lib/Target/Sparc/Disassembler contrib/llvm/lib/Target/Sparc/InstPrinter contrib/netbsd-tests/

2015-11-08 Thread Andrey Chernov
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 09.11.2015 0:41, Baptiste Daroussin wrote:
>>> Deleted: head/lib/libc/locale/ascii.c
>> 
>> BTW, why this one is deleted (along with ASCII locales)? It
>> serves its job as "strict ASCII checker" right.
>> 
> The ASCII locales are still there, just using the same rules for
> everything as their unicode counter part except of course for
> LC_CTYPE.
> 
> There was no left usage for that code so I removed it. If there are
> strong opinions for bringing it back, I can do it.

ascii.c specifically test for bit8 and sets EILSEQ (unlike, say,
ISO-8859-1 Unicode subset or C locale). IMHO it should be restored.

- -- 
http://ache.vniz.net/
-BEGIN PGP SIGNATURE-

iQEcBAEBCAAGBQJWP8tZAAoJEKUckv0MjfbK7KIIAMWRvRbZAA2hHAV2FBOoW5uh
HmKI76M3drrx+em0gtreA3VaZ+kmNDax4u6yS9Wdfz3Ajhotyu0AGzvagX1e6bF4
TjCatprbXZZY/iAMqgvjXtsPCv6Mc62jHXfch+bG2alDhJRFChvNj6Dhg3tMvF5b
WesMy+lKuna3cs5lmV6TbOmBWGivKcNwT+0S4Go3OMcuYxsVYKFwZZKABtpe9HQo
VRdwU8cSwionUnQPgdrf6kLBlT+Ou6NGc6C4eV6TGxlHyDY/MdqgS0qzMEa5BoS4
rBtXYmeZEQ19vp6gJ4x4va6/4bZ3AUFXn6xFAKVEjeKMjLfOTUz0E5jr9WovRj4=
=Hy7z
-END PGP SIGNATURE-
___
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: r290494 - in head: . contrib/ipfilter contrib/llvm/lib/Target/Sparc/AsmParser contrib/llvm/lib/Target/Sparc/Disassembler contrib/llvm/lib/Target/Sparc/InstPrinter contrib/netbsd-tests/

2015-11-08 Thread Baptiste Daroussin
On Mon, Nov 09, 2015 at 01:23:21AM +0300, Andrey Chernov wrote:
> On 09.11.2015 0:41, Baptiste Daroussin wrote:
> >>> Deleted: head/lib/libc/locale/ascii.c
> >> 
> >> BTW, why this one is deleted (along with ASCII locales)? It
> >> serves its job as "strict ASCII checker" right.
> >> 
> > The ASCII locales are still there, just using the same rules for
> > everything as their unicode counter part except of course for
> > LC_CTYPE.
> > 
> > There was no left usage for that code so I removed it. If there are
> > strong opinions for bringing it back, I can do it.
> 
> ascii.c specifically test for bit8 and sets EILSEQ (unlike, say,
> ISO-8859-1 Unicode subset or C locale). IMHO it should be restored.
> 

hum, ok make sense. I'll make some regression tests and bring it back as soon as
I can.

Best regards,
Bapt


signature.asc
Description: PGP signature


Re: svn commit: r290562 - head/usr.bin/localedef

2015-11-08 Thread NGie Cooper

> On Nov 8, 2015, at 14:23, Baptiste Daroussin  wrote:
> 
> Author: bapt
> Date: Sun Nov  8 22:23:21 2015
> New Revision: 290562
> URL: https://svnweb.freebsd.org/changeset/base/290562
> 
> Log:
>  lower again the warnings and remove the pragmas unsupported by gcc 4.2.1

Thank you. Hopefully this will unbreak mips and partially unbreak sparc64 
(sparc64 is still hung up on a mismatched definition between strsignal in 
string.h and contrib/gcc).
___
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: r290551 - in head/sys: kern sys

2015-11-08 Thread Edward Tomasz Napierala
Author: trasz
Date: Sun Nov  8 18:08:31 2015
New Revision: 290551
URL: https://svnweb.freebsd.org/changeset/base/290551

Log:
  Speed up rctl(8) rule retrieval; the difference shows mostly in "rctl -n",
  as otherwise most of the time is spent resolving UIDs to names.
  
  Reviewed by:  mjg@
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D4059

Modified:
  head/sys/kern/kern_rctl.c
  head/sys/sys/racct.h

Modified: head/sys/kern/kern_rctl.c
==
--- head/sys/kern/kern_rctl.c   Sun Nov  8 18:02:39 2015(r290550)
+++ head/sys/kern/kern_rctl.c   Sun Nov  8 18:08:31 2015(r290551)
@@ -71,13 +71,18 @@ FEATURE(rctl, "Resource Limits");
 #defineHRF_DONT_INHERIT1
 #defineHRF_DONT_ACCUMULATE 2
 
-/* Default buffer size for rctl_get_rules(2). */
-#defineRCTL_DEFAULT_BUFSIZE4096
-#defineRCTL_MAX_INBUFLEN   4096
+#defineRCTL_MAX_INBUFLEN   4 * 1024
+#defineRCTL_MAX_OUTBUFLEN  16 * 1024 * 1024
 #defineRCTL_LOG_BUFSIZE128
 
 #defineRCTL_PCPU_SHIFT (10 * 100)
 
+unsigned int rctl_maxbufsize = RCTL_MAX_OUTBUFLEN;
+
+SYSCTL_NODE(_kern_racct, OID_AUTO, rctl, CTLFLAG_RW, 0, "Resource Limits");
+SYSCTL_UINT(_kern_racct_rctl, OID_AUTO, maxbufsize, CTLFLAG_RWTUN,
+_maxbufsize, 0, "Maximum output buffer size");
+
 /*
  * 'rctl_rule_link' connects a rule with every racct it's related to.
  * For example, rule 'user:X:openfiles:deny=N/process' is linked
@@ -1435,7 +1440,7 @@ int
 sys_rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap)
 {
int error;
-   size_t bufsize = RCTL_DEFAULT_BUFSIZE;
+   size_t bufsize;
char *inputstr, *buf;
struct sbuf *sb;
struct rctl_rule *filter;
@@ -1461,12 +1466,16 @@ sys_rctl_get_rules(struct thread *td, st
return (error);
}
 
-again:
+   bufsize = uap->outbuflen;
+   if (bufsize > rctl_maxbufsize) {
+   sx_sunlock(_lock);
+   return (E2BIG);
+   }
+
buf = malloc(bufsize, M_RCTL, M_WAITOK);
sb = sbuf_new(NULL, buf, bufsize, SBUF_FIXEDLEN);
KASSERT(sb != NULL, ("sbuf_new failed"));
 
-   sx_assert(_lock, SA_LOCKED);
FOREACH_PROC_IN_SYSTEM(p) {
rw_rlock(_lock);
LIST_FOREACH(link, >p_racct->r_rule_links, rrl_next) {
@@ -1489,10 +1498,8 @@ again:
ui_racct_foreach(rctl_get_rules_callback, filter, sb);
prison_racct_foreach(rctl_get_rules_callback, filter, sb);
if (sbuf_error(sb) == ENOMEM) {
-   sbuf_delete(sb);
-   free(buf, M_RCTL);
-   bufsize *= 4;
-   goto again;
+   error = ERANGE;
+   goto out;
}
 
/*
@@ -1502,7 +1509,7 @@ again:
sbuf_setpos(sb, sbuf_len(sb) - 1);
 
error = rctl_write_outbuf(sb, uap->outbufp, uap->outbuflen);
-
+out:
rctl_rule_release(filter);
sx_sunlock(_lock);
free(buf, M_RCTL);
@@ -1513,7 +1520,7 @@ int
 sys_rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap)
 {
int error;
-   size_t bufsize = RCTL_DEFAULT_BUFSIZE;
+   size_t bufsize;
char *inputstr, *buf;
struct sbuf *sb;
struct rctl_rule *filter;
@@ -1554,7 +1561,13 @@ sys_rctl_get_limits(struct thread *td, s
return (EINVAL);
}
 
-again:
+   bufsize = uap->outbuflen;
+   if (bufsize > rctl_maxbufsize) {
+   rctl_rule_release(filter);
+   sx_sunlock(_lock);
+   return (E2BIG);
+   }
+
buf = malloc(bufsize, M_RCTL, M_WAITOK);
sb = sbuf_new(NULL, buf, bufsize, SBUF_FIXEDLEN);
KASSERT(sb != NULL, ("sbuf_new failed"));
@@ -1567,10 +1580,8 @@ again:
}
rw_runlock(_lock);
if (sbuf_error(sb) == ENOMEM) {
-   sbuf_delete(sb);
-   free(buf, M_RCTL);
-   bufsize *= 4;
-   goto again;
+   error = ERANGE;
+   goto out;
}
 
/*
@@ -1580,6 +1591,7 @@ again:
sbuf_setpos(sb, sbuf_len(sb) - 1);
 
error = rctl_write_outbuf(sb, uap->outbufp, uap->outbuflen);
+out:
rctl_rule_release(filter);
sx_sunlock(_lock);
free(buf, M_RCTL);

Modified: head/sys/sys/racct.h
==
--- head/sys/sys/racct.hSun Nov  8 18:02:39 2015(r290550)
+++ head/sys/sys/racct.hSun Nov  8 18:08:31 2015(r290551)
@@ -37,9 +37,10 @@
 #define_RACCT_H_
 
 #include 
-#include 
-#include 
 #include 
+#include 
+#include 
+#include 
 
 struct proc;
 struct rctl_rule_link;
@@ -146,6 +147,8 @@ struct racct {
LIST_HEAD(, rctl_rule_link) r_rule_links;
 

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

2015-11-08 Thread Adrian Chadd
i'm burnt out and still too busy fixing issues introduced into -head
(both wifi and low-memory platform support.)

Someone else at this stage has to MFC things :(

Sorry,


-a


On 8 November 2015 at 10:49, Oliver Pinter
 wrote:
> On 8/19/15, Renato Botelho  wrote:
>>> On Aug 19, 2015, at 18:31, Adrian Chadd  wrote:
>>>
>>> jim asked me again to do the MFC, so once I've finished doing some
>>> more tidying up of bits and pieces I'll do the MFC.
>
> What's the status of this MFC? You need a tester or you have a patch?
>
>>
>> Thank you very much!
>>
>> --
>> Renato Botelho
>>
>>
___
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: r290554 - head/tools/tools/locale/tools

2015-11-08 Thread Baptiste Daroussin
Author: bapt
Date: Sun Nov  8 19:08:38 2015
New Revision: 290554
URL: https://svnweb.freebsd.org/changeset/base/290554

Log:
  Modify the tool that generates the locales so that the generated CJK locales
  are padded as expected by the users
  
  Submitted by: marino
  Obtained from:DragonflyBSD

Modified:
  head/tools/tools/locale/tools/cldr2def.pl

Modified: head/tools/tools/locale/tools/cldr2def.pl
==
--- head/tools/tools/locale/tools/cldr2def.pl   Sun Nov  8 18:48:35 2015
(r290553)
+++ head/tools/tools/locale/tools/cldr2def.pl   Sun Nov  8 19:08:38 2015
(r290554)
@@ -1,4 +1,5 @@
 #!/usr/local/bin/perl -wC
+# $FreeBSD$
 
 use strict;
 use File::Copy;
@@ -66,6 +67,7 @@ my %callback = (
mdorder => \_mdorder,
altmon => \_altmon,
cformat => \_cformat,
+   cbabmon => \_abmon,
data => undef,
 );
 
@@ -173,7 +175,7 @@ if ($TYPE eq "msgdef") {
 
 if ($TYPE eq "timedef") {
%keys = (
-   "abmon" => "as",
+   "abmon" => " "as",
"abday" => "as",
"day"   => "as",
@@ -226,6 +228,30 @@ sub callback_altmon {
return $s;
 }
 
+sub callback_abmon {
+   # for specified CJK locales, pad result with a space to enable
+   # columns to line up (style established in FreeBSD in 2001)
+   my $s = shift;
+   my $nl = $callback{data}{l} . "_" . $callback{data}{c};
+
+   if ($nl eq 'ja_JP' || $nl eq 'ko_KR' || $nl eq 'zh_CN' ||
+   $nl eq 'zh_HK' || $nl eq 'zh_TW') {
+   my @monthnames = split(";", $s);
+   my @cleaned;
+   foreach (@monthnames)
+   {
+   if ($_ =~ 
/^"<(two|three|four|five|six|seven|eight|nine)>/ ||
+  ($_ =~ /^"/ && $_ !~ 
/^"(||)/))
+   {
+   $_ =~ s/^"/"/;
+   }
+   push @cleaned, $_;
+   }
+   return join(";",@cleaned);
+   }
+   return $s;
+}
+
 
 
 sub get_unidata {
___
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: r290512 - head/usr.bin/localedef

2015-11-08 Thread Adrian Chadd
hiya,

not enough!



On 7 November 2015 at 12:31, Baptiste Daroussin  wrote:
> Author: bapt
> Date: Sat Nov  7 20:31:23 2015
> New Revision: 290512
> URL: https://svnweb.freebsd.org/changeset/base/290512
>
> Log:
>   Bump warning level
>
> Modified:
>   head/usr.bin/localedef/Makefile
>
> Modified: head/usr.bin/localedef/Makefile
> ==
> --- head/usr.bin/localedef/Makefile Sat Nov  7 20:29:23 2015
> (r290511)
> +++ head/usr.bin/localedef/Makefile Sat Nov  7 20:31:23 2015
> (r290512)
> @@ -13,7 +13,7 @@ SRCS= charmap.c \
> time.c \
> wide.c
>
> -WARNS= 3
> +WARNS= 5
>  ${SRCS:M*.c}: parser.h
>  parser.h: parser.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"


svn commit: r290556 - head/usr.sbin

2015-11-08 Thread Ed Maste
Author: emaste
Date: Sun Nov  8 20:56:04 2015
New Revision: 290556
URL: https://svnweb.freebsd.org/changeset/base/290556

Log:
  arm64: build usr.sbin/acpi subdirectory
  
  The arm64 platform will in general use ACPI so we want these tools built
  there.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/Makefile.arm64

Modified: head/usr.sbin/Makefile.arm64
==
--- head/usr.sbin/Makefile.arm64Sun Nov  8 19:29:34 2015
(r290555)
+++ head/usr.sbin/Makefile.arm64Sun Nov  8 20:56:04 2015
(r290556)
@@ -1,3 +1,6 @@
 # $FreeBSD$
 
+.if ${MK_ACPI} != "no"
+SUBDIR+=   acpi
+.endif
 SUBDIR+=   ofwdump
___
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: r290564 - head/sys/dev/usb/wlan

2015-11-08 Thread Andriy Voskoboinyk
Author: avos
Date: Sun Nov  8 23:21:54 2015
New Revision: 290564
URL: https://svnweb.freebsd.org/changeset/base/290564

Log:
  urtwn(4): improve RX filter.
  
  - Filter out unneeded frames in STA mode.
  - Implement ic_promisc() call.
  
  Tested with RTL8188EU, STA and MONITOR modes.
  
  Reviewed by:  kevlo
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D3999

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_urtwnreg.h

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==
--- head/sys/dev/usb/wlan/if_urtwn.cSun Nov  8 23:06:40 2015
(r290563)
+++ head/sys/dev/usb/wlan/if_urtwn.cSun Nov  8 23:21:54 2015
(r290564)
@@ -269,6 +269,8 @@ static void urtwn_set_gain(struct urtwn
 static voidurtwn_scan_start(struct ieee80211com *);
 static voidurtwn_scan_end(struct ieee80211com *);
 static voidurtwn_set_channel(struct ieee80211com *);
+static voidurtwn_set_promisc(struct urtwn_softc *);
+static voidurtwn_update_promisc(struct ieee80211com *);
 static voidurtwn_update_mcast(struct ieee80211com *);
 static voidurtwn_set_chan(struct urtwn_softc *,
struct ieee80211_channel *,
@@ -457,6 +459,7 @@ urtwn_attach(device_t self)
ic->ic_parent = urtwn_parent;
ic->ic_vap_create = urtwn_vap_create;
ic->ic_vap_delete = urtwn_vap_delete;
+   ic->ic_update_promisc = urtwn_update_promisc;
ic->ic_update_mcast = urtwn_update_mcast;
 
ieee80211_radiotap_attach(ic, >sc_txtap.wt_ihdr,
@@ -1574,22 +1577,6 @@ urtwn_newstate(struct ieee80211vap *vap,
break;
case IEEE80211_S_RUN:
if (vap->iv_opmode == IEEE80211_M_MONITOR) {
-   /* Enable Rx of data frames. */
-   urtwn_write_2(sc, R92C_RXFLTMAP2, 0x);
-
-   /* Enable Rx of ctrl frames. */
-   urtwn_write_2(sc, R92C_RXFLTMAP1, 0x);
-
-   /*
-* Accept data/control/management frames
-* from any BSSID.
-*/
-   urtwn_write_4(sc, R92C_RCR,
-   (urtwn_read_4(sc, R92C_RCR) & ~(R92C_RCR_APM |
-   R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN)) |
-   R92C_RCR_ADF | R92C_RCR_ACF | R92C_RCR_AMF |
-   R92C_RCR_AAP);
-
/* Turn link LED on. */
urtwn_set_led(sc, URTWN_LED_LINK, 1);
break;
@@ -1618,9 +1605,11 @@ urtwn_newstate(struct ieee80211vap *vap,
urtwn_write_2(sc, R92C_BCN_INTERVAL, ni->ni_intval);
 
/* Allow Rx from our BSSID only. */
-   urtwn_write_4(sc, R92C_RCR,
-   urtwn_read_4(sc, R92C_RCR) |
-   R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN);
+   if (ic->ic_promisc == 0) {
+   urtwn_write_4(sc, R92C_RCR,
+   urtwn_read_4(sc, R92C_RCR) |
+   R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN);
+   }
 
/* Enable TSF synchronization. */
urtwn_tsf_sync_enable(sc);
@@ -2755,21 +2744,50 @@ urtwn_pa_bias_init(struct urtwn_softc *s
 static void
 urtwn_rxfilter_init(struct urtwn_softc *sc)
 {
-   /* Initialize Rx filter. */
-   /* TODO: use better filter for monitor mode. */
-   urtwn_write_4(sc, R92C_RCR,
-   R92C_RCR_AAP | R92C_RCR_APM | R92C_RCR_AM | R92C_RCR_AB |
-   R92C_RCR_APP_ICV | R92C_RCR_AMF | R92C_RCR_HTC_LOC_CTRL |
-   R92C_RCR_APP_MIC | R92C_RCR_APP_PHYSTS);
+   struct ieee80211com *ic = >sc_ic;
+   struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
+   uint32_t rcr;
+   uint16_t filter;
+
+   URTWN_ASSERT_LOCKED(sc);
+
/* Accept all multicast frames. */
urtwn_write_4(sc, R92C_MAR + 0, 0x);
urtwn_write_4(sc, R92C_MAR + 4, 0x);
-   /* Accept all management frames. */
-   urtwn_write_2(sc, R92C_RXFLTMAP0, 0x);
+
+   /* Filter for management frames. */
+   filter = 0x7f3f;
+   if (vap->iv_opmode == IEEE80211_M_STA) {
+   filter &= ~(
+   R92C_RXFLTMAP_SUBTYPE(IEEE80211_FC0_SUBTYPE_ASSOC_REQ) |
+   R92C_RXFLTMAP_SUBTYPE(IEEE80211_FC0_SUBTYPE_REASSOC_REQ) |
+   R92C_RXFLTMAP_SUBTYPE(IEEE80211_FC0_SUBTYPE_PROBE_REQ));
+   }
+   urtwn_write_2(sc, R92C_RXFLTMAP0, filter);
+
/* Reject all control frames. */
urtwn_write_2(sc, R92C_RXFLTMAP1, 0x);
-   /* Accept all data frames. */
-   urtwn_write_2(sc, R92C_RXFLTMAP2, 0x);
+
+   /* Reject all data frames. */
+   

svn commit: r290567 - in head: etc/mtree usr.bin/limits usr.bin/limits/tests

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 01:05:31 2015
New Revision: 290567
URL: https://svnweb.freebsd.org/changeset/base/290567

Log:
  Add some basic tests that exercise cputime limits with limits(1)
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/usr.bin/limits/tests/
  head/usr.bin/limits/tests/Makefile   (contents, props changed)
  head/usr.bin/limits/tests/limits_test.sh   (contents, props changed)
Modified:
  head/etc/mtree/BSD.tests.dist
  head/usr.bin/limits/Makefile

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Mon Nov  9 00:19:04 2015
(r290566)
+++ head/etc/mtree/BSD.tests.dist   Mon Nov  9 01:05:31 2015
(r290567)
@@ -554,6 +554,8 @@
 ..
 lastcomm
 ..
+limits
+..
 m4
 ..
 mkimg

Modified: head/usr.bin/limits/Makefile
==
--- head/usr.bin/limits/MakefileMon Nov  9 00:19:04 2015
(r290566)
+++ head/usr.bin/limits/MakefileMon Nov  9 01:05:31 2015
(r290567)
@@ -1,6 +1,12 @@
 # $FreeBSD$
 
+.include 
+
 PROG=  limits
 LIBADD=util
 
+.if ${MK_TESTS} != "no"
+SUBDIR+=   tests
+.endif
+
 .include 

Added: head/usr.bin/limits/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/limits/tests/Makefile  Mon Nov  9 01:05:31 2015
(r290567)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+ATF_TESTS_SH+= limits_test
+
+.include 

Added: head/usr.bin/limits/tests/limits_test.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/limits/tests/limits_test.shMon Nov  9 01:05:31 2015
(r290567)
@@ -0,0 +1,65 @@
+#
+# Copyright 2015 EMC Corp.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# * 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 COPYRIGHT HOLDERS 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 COPYRIGHT
+# OWNER 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$
+#
+
+# Make sure time(1) is consistent with the FreeBSD time command and not the
+# shell interpretation of time(1)
+TIME=/usr/bin/time
+
+atf_test_case cputime_hard_flag
+cputime_hard_flag_body()
+{
+
+   atf_check -e empty -o match:'cputime[[:space:]]+3 secs' -s exit:0 \
+   limits -H -t 3 limits -H
+   atf_check -e empty -o match:'cputime[[:space:]]+3 secs' -s exit:0 \
+   limits -H -t 3 limits -S
+   atf_check -e match:'real[[:space:]]+[34]\.[0-9][0-9]' -o empty -s 
signal:sigkill \
+   limits -H -t 3 $TIME -p sh -c 'while : ; do : ; done'
+}
+
+SIGXCPU=24 # atf_check doesn't know sigxcpu
+
+atf_test_case cputime_soft_flag
+cputime_soft_flag_body()
+{
+
+   atf_check -e empty -o match:'cputime-max[[:space:]]+infinity secs' -s 
exit:0 \
+   limits -S -t 3 limits -H
+   atf_check -e empty -o match:'cputime-cur[[:space:]]+3 secs' -s exit:0 \
+   limits -S -t 3 limits -S
+   atf_check -e match:'real[[:space:]]+[34]\.[0-9][0-9]' -o empty -s 
signal:$SIGXCPU \
+   limits -S -t 3 $TIME -p sh -c 'while : ; do : ; done'
+}
+
+atf_init_test_cases()
+{
+
+   atf_add_test_case cputime_hard_flag
+   atf_add_test_case cputime_soft_flag
+}
___
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: r290568 - head/sys/arm64/arm64

2015-11-08 Thread Ed Maste
Author: emaste
Date: Mon Nov  9 01:49:25 2015
New Revision: 290568
URL: https://svnweb.freebsd.org/changeset/base/290568

Log:
  Fix typo in message from arm64 ITS workaround

Modified:
  head/sys/arm64/arm64/gic_v3_its.c

Modified: head/sys/arm64/arm64/gic_v3_its.c
==
--- head/sys/arm64/arm64/gic_v3_its.c   Mon Nov  9 01:05:31 2015
(r290567)
+++ head/sys/arm64/arm64/gic_v3_its.c   Mon Nov  9 01:49:25 2015
(r290568)
@@ -189,7 +189,7 @@ gic_v3_its_attach(device_t dev)
 */
if (device_get_unit(dev) != 0) {
device_printf(dev,
-   "Only single instance of ITS is supported, exitting...\n");
+   "Only single instance of ITS is supported, exiting...\n");
return (ENXIO);
}
sc->its_socket = 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: r290570 - head/cddl/usr.sbin/dtrace/tests

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 02:29:38 2015
New Revision: 290570
URL: https://svnweb.freebsd.org/changeset/base/290570

Log:
  Reduce the Makefile snippet complexity a bit
  
  - Set BINDIR to TESTSDIR globally (and subsequently, remove all
`${FILESGROUP}DIR` setting because BINDIR is set to `TESTSDIR`)
  - Set MAN to "" globally, instead of per-PROG
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/cddl/usr.sbin/dtrace/tests/Makefile.inc1

Modified: head/cddl/usr.sbin/dtrace/tests/Makefile.inc1
==
--- head/cddl/usr.sbin/dtrace/tests/Makefile.inc1   Mon Nov  9 01:53:54 
2015(r290569)
+++ head/cddl/usr.sbin/dtrace/tests/Makefile.inc1   Mon Nov  9 02:29:38 
2015(r290570)
@@ -10,9 +10,6 @@ ${TESTGROUP}= ${TESTFILES}
 ${TESTGROUP}EXE= ${TESTEXES}
 ${TESTGROUP}EXEMODE= 0555
 
-${TESTGROUP}DIR= ${TESTSDIR}
-${TESTGROUP}EXEDIR= ${TESTSDIR}
-
 TESTWRAPPER=   t_dtrace_contrib
 ATF_TESTS_SH+= ${TESTWRAPPER}
 TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/ksh"
@@ -30,14 +27,15 @@ CLEANFILES+=${TESTWRAPPER}.sh
 PROGS= ${CFILES:T:S/.c$/.exe/g}
 .for prog in ${PROGS}
 SRCS.${prog}+= ${prog:S/.exe$/.c/}
-BINDIR.${prog}= ${TESTSDIR}
-MAN.${prog}=
 
 .if exists(${prog:S/^tst.//:S/.exe$/.d/})
 SRCS.${prog}+= ${prog:S/^tst.//:S/.exe$/.d/}
 .endif
 .endfor
 
+BINDIR=${TESTSDIR}
+MAN=
+
 # Some tests depend on the internals of their corresponding test programs,
 # so make sure the optimizer doesn't interfere with them.
 CFLAGS+=   -O0
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r290565 - head/release/scripts

2015-11-08 Thread Glen Barber
On Sun, Nov 08, 2015 at 11:46:05PM +, Simon J. Gerraty wrote:
> Author: sjg
> Date: Sun Nov  8 23:46:05 2015
> New Revision: 290565
> URL: https://svnweb.freebsd.org/changeset/base/290565
> 
> Log:
>   Ensure TEMPROOT is unique, to guard against multiple builds on same machine.
>   
>   Differential Revision:  D3002
>   Reviewed by:gjb

Technically, I did not review the change, I just did not object to your
proposal.  :)

Glen



signature.asc
Description: PGP signature


svn commit: r290565 - head/release/scripts

2015-11-08 Thread Simon J. Gerraty
Author: sjg
Date: Sun Nov  8 23:46:05 2015
New Revision: 290565
URL: https://svnweb.freebsd.org/changeset/base/290565

Log:
  Ensure TEMPROOT is unique, to guard against multiple builds on same machine.
  
  Differential Revision:D3002
  Reviewed by:  gjb

Modified:
  head/release/scripts/mm-mtree.sh

Modified: head/release/scripts/mm-mtree.sh
==
--- head/release/scripts/mm-mtree.shSun Nov  8 23:21:54 2015
(r290564)
+++ head/release/scripts/mm-mtree.shSun Nov  8 23:46:05 2015
(r290565)
@@ -30,7 +30,7 @@ display_usage () {
 
 # Set the default path for the temporary root environment
 #
-TEMPROOT='/var/tmp/temproot'
+TEMPROOT=`TMPDIR=/var/tmp mktemp -d -t temproot`
 
 # Assign the location of the mtree database
 #
___
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: r290563 - in head: lib/libc/tests/net tools/regression/lib/libc/net

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Sun Nov  8 23:06:40 2015
New Revision: 290563
URL: https://svnweb.freebsd.org/changeset/base/290563

Log:
  Integrate tools/regression/lib/libc/net into the FreeBSD test suite
  as lib/libc/tests/net
  
  Also, fix eui64_aton_test:test_str(..). The test was comparing the result
  of eui64_aton to a pointer of the expected result.
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/lib/libc/tests/net/ether_test.c
 - copied, changed from r290562, 
head/tools/regression/lib/libc/net/test-ether.c
  head/lib/libc/tests/net/eui64_aton_test.c
 - copied, changed from r290562, 
head/tools/regression/lib/libc/net/test-eui64_aton.c
  head/lib/libc/tests/net/eui64_ntoa_test.c
 - copied, changed from r290562, 
head/tools/regression/lib/libc/net/test-eui64_ntoa.c
  head/lib/libc/tests/net/test-eui64.h
 - copied unchanged from r290562, 
head/tools/regression/lib/libc/net/test-eui64.h
Deleted:
  head/tools/regression/lib/libc/net/
Modified:
  head/lib/libc/tests/net/Makefile

Modified: head/lib/libc/tests/net/Makefile
==
--- head/lib/libc/tests/net/MakefileSun Nov  8 22:23:21 2015
(r290562)
+++ head/lib/libc/tests/net/MakefileSun Nov  8 23:06:40 2015
(r290563)
@@ -1,22 +1,23 @@
 # $FreeBSD$
 
-.include 
+ATF_TESTS_C+=  ether_test
+ATF_TESTS_C+=  eui64_aton_test
+ATF_TESTS_C+=  eui64_ntoa_test
 
-BINDIR=${TESTSDIR}
+CFLAGS+=   -I${.CURDIR}
 
-NETBSD_ATF_TESTS_C=getprotoent_test
+NETBSD_ATF_TESTS_C+=   getprotoent_test
 NETBSD_ATF_TESTS_C+=   ether_aton_test
 
-SRCS.t_ether_aton= aton_ether_subr.c t_ether_aton.c
-
-aton_ether_subr.c: gen_ether_subr ${.CURDIR:H:H:H:H}/sys/net/if_ethersubr.c
-   ${HOST_SH} ${.ALLSRC} ${.TARGET}
+SRCS.ether_aton_test=  aton_ether_subr.c t_ether_aton.c
 
 # TODO: hostent_test
 NETBSD_ATF_TESTS_SH=   nsdispatch_test
 NETBSD_ATF_TESTS_SH+=  protoent_test
 NETBSD_ATF_TESTS_SH+=  servent_test
 
+BINDIR=${TESTSDIR}
+
 PROGS= h_nsd_recurse
 PROGS+=h_protoent
 PROGS+=h_servent
@@ -26,12 +27,14 @@ DPADD.h_nsd_recurse+=   ${LIBPTHREAD}
 LDADD.h_nsd_recurse+=  -lpthread
 
 CLEANFILES+=   aton_ether_subr.c
+aton_ether_subr.c: gen_ether_subr ${SRCTOP}/sys/net/if_ethersubr.c
+   ${HOST_SH} ${.ALLSRC} ${.TARGET}
 
 .include "../Makefile.netbsd-tests"
 
 # TODO: the testcases needs to be ported to FreeBSD
 #TESTS_SUBDIRS=getaddrinfo
-FILES= hosts
+FILES+=hosts
 FILES+=resolv.conf
 
 .include 

Copied and modified: head/lib/libc/tests/net/ether_test.c (from r290562, 
head/tools/regression/lib/libc/net/test-ether.c)
==
--- head/tools/regression/lib/libc/net/test-ether.c Sun Nov  8 22:23:21 
2015(r290562, copy source)
+++ head/lib/libc/tests/net/ether_test.cSun Nov  8 23:06:40 2015
(r290563)
@@ -30,206 +30,163 @@
 
 #include 
 
+#include 
 #include 
 #include 
 
-static int testnum;
+#include 
 
-#defineOK()do {
\
-   printf("ok %d %s\n", testnum, __func__);\
-   return; \
-} while (0)
-
-#defineNOTOK(why)  do {
\
-   printf("not ok %d %s # %s\n", testnum, __func__, why);  \
-   return; \
-} while (0)
-
-#defineTODO()  NOTOK("TODO")
-
-static const char  *ether_line_string =
-   "01:23:45:67:89:ab ether_line_hostname";
-static const char  *ether_line_hostname = "ether_line_hostname";
+static const char *ether_line_string = "01:23:45:67:89:ab ether_line_hostname";
+static const char *ether_line_hostname = "ether_line_hostname";
 static const struct ether_addr  ether_line_addr = {
{ 0x01, 0x23, 0x45, 0x67, 0x89, 0xab }
 };
 
-static void
-test_ether_line(void)
+ATF_TC_WITHOUT_HEAD(ether_line);
+ATF_TC_BODY(ether_line, tc)
 {
struct ether_addr e;
char hostname[256];
 
-   testnum++;
-   if (ether_line(ether_line_string, , hostname) != 0)
-   NOTOK("returned error");
-   if (bcmp(, _line_addr, ETHER_ADDR_LEN) != 0)
-   NOTOK("bad address");
-   if (strcmp(hostname, ether_line_hostname) != 0) {
-   printf("hostname: %s\n", hostname);
-   NOTOK("bad hostname");
-   }
-   OK();
+   ATF_REQUIRE_MSG(ether_line(ether_line_string, , hostname) == 0,
+   "ether_line failed; errno=%d", errno);
+   ATF_REQUIRE_MSG(bcmp(, _line_addr, ETHER_ADDR_LEN) == 0,
+   "bad address");
+   ATF_REQUIRE_MSG(strcmp(hostname, ether_line_hostname) == 0,
+   "bad hostname");
 }
 
-static const 

svn commit: r290566 - in head/sys/dev: re rl

2015-11-08 Thread Marius Strobl
Author: marius
Date: Mon Nov  9 00:19:04 2015
New Revision: 290566
URL: https://svnweb.freebsd.org/changeset/base/290566

Log:
  - Although it doesn't make a whole lot of sense to enable RX and TX
before their initial configuration is done, it turns out that r281337
has the inverse effect on some older chips. Moreover, as with newer
chips before, two chips seemingly identical according to their MAC
revisions may behave differently in this regard, with most working
but a few not, making changes extremely hard to test.
Closer inspection of the corresponding Linux code suggests that RX
and TX should only be enabled after their initial configuration with
RTL8168G and later chips, i. e. RTL8106E{,US}, RTL8107E, as well as
RTL8168{EP,G,GU,H}, so limit the new code path to these. [1]
  - Distinguish between RTL8168H and RTL8107E, with the latter being the
10/100-Mbit/s-only variant of the former.
  - For MAC variants that can only do Fast Ethernet at a maximum, ensure
that we don't advertise Gigabit Ethernet speed.
  - In re_stop(), do the inverse of re_init_locked() and enable RXDV
gate on RTL8168G and later chips again, matching what Linux does.
  
  PR:   203422 [1]
  MFC after:1 week

Modified:
  head/sys/dev/re/if_re.c
  head/sys/dev/rl/if_rlreg.h

Modified: head/sys/dev/re/if_re.c
==
--- head/sys/dev/re/if_re.c Sun Nov  8 23:46:05 2015(r290565)
+++ head/sys/dev/re/if_re.c Mon Nov  9 00:19:04 2015(r290566)
@@ -636,9 +636,8 @@ re_miibus_statchg(device_t dev)
}
}
/*
-* RealTek controllers does not provide any interface to
-* Tx/Rx MACs for resolved speed, duplex and flow-control
-* parameters.
+* RealTek controllers do not provide any interface to the RX/TX
+* MACs for resolved speed, duplex and flow-control parameters.
 */
 }
 
@@ -660,7 +659,7 @@ re_set_rxmode(struct rl_softc *sc)
rxfilt = RL_RXCFG_CONFIG | RL_RXCFG_RX_INDIV | RL_RXCFG_RX_BROAD;
if ((sc->rl_flags & RL_FLAG_EARLYOFF) != 0)
rxfilt |= RL_RXCFG_EARLYOFF;
-   else if ((sc->rl_flags & RL_FLAG_EARLYOFFV2) != 0)
+   else if ((sc->rl_flags & RL_FLAG_8168G_PLUS) != 0)
rxfilt |= RL_RXCFG_EARLYOFFV2;
 
if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) {
@@ -1207,11 +1206,10 @@ re_attach(device_t dev)
struct rl_softc *sc;
struct ifnet*ifp;
const struct rl_hwrev   *hw_rev;
+   int capmask, error = 0, hwrev, i, msic, msixc,
+   phy, reg, rid;
u_int32_t   cap, ctl;
-   int hwrev;
u_int16_t   devid, re_did = 0;
-   int error = 0, i, phy, rid;
-   int msic, msixc, reg;
uint8_t cfg;
 
sc = device_get_softc(dev);
@@ -1486,17 +1484,17 @@ re_attach(device_t dev)
break;
case RL_HWREV_8168EP:
case RL_HWREV_8168G:
-   case RL_HWREV_8168H:
case RL_HWREV_8411B:
sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR |
RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP |
RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 |
RL_FLAG_CMDSTOP_WAIT_TXQ | RL_FLAG_WOL_MANLINK |
-   RL_FLAG_EARLYOFFV2 | RL_FLAG_RXDV_GATED;
+   RL_FLAG_8168G_PLUS;
break;
case RL_HWREV_8168GU:
+   case RL_HWREV_8168H:
if (pci_get_device(dev) == RT_DEVICEID_8101E) {
-   /* RTL8106EUS */
+   /* RTL8106E(US), RTL8107E */
sc->rl_flags |= RL_FLAG_FASTETHER;
} else
sc->rl_flags |= RL_FLAG_JUMBOV2 | RL_FLAG_WOL_MANLINK;
@@ -1504,7 +1502,7 @@ re_attach(device_t dev)
sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR |
RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP |
RL_FLAG_AUTOPAD | RL_FLAG_CMDSTOP_WAIT_TXQ |
-   RL_FLAG_EARLYOFFV2 | RL_FLAG_RXDV_GATED;
+   RL_FLAG_8168G_PLUS;
break;
case RL_HWREV_8169_8110SB:
case RL_HWREV_8169_8110SBL:
@@ -1654,8 +1652,11 @@ re_attach(device_t dev)
phy = RE_PHYAD_INTERNAL;
if (sc->rl_type == RL_8169)
phy = 1;
+   capmask = BMSR_DEFCAPMASK;
+   if ((sc->rl_flags & RL_FLAG_FASTETHER) != 0)
+capmask &= ~BMSR_EXTSTAT;
error = mii_attach(dev, >rl_miibus, ifp, re_ifmedia_upd,
-   re_ifmedia_sts, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, MIIF_DOPAUSE);
+   re_ifmedia_sts, capmask, phy, MII_OFFSET_ANY, MIIF_DOPAUSE);
if (error != 0) {
device_printf(dev, 

svn commit: r290569 - stable/10/usr.bin/gzip

2015-11-08 Thread Xin LI
Author: delphij
Date: Mon Nov  9 01:53:54 2015
New Revision: 290569
URL: https://svnweb.freebsd.org/changeset/base/290569

Log:
  MFC r290024,290073:
  
  In gunzip(1), treat trailing garbage as a warning and not an error.  This
  allows scripts to distinguish it between real fatal errors, for instance a
  CRC mismatch.
  
  Update manual page for the behavior change.
  
  PR:   bin/203873
  Submitted by: Eugene Grosbein 

Modified:
  stable/10/usr.bin/gzip/gzip.1
  stable/10/usr.bin/gzip/gzip.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/gzip/gzip.1
==
--- stable/10/usr.bin/gzip/gzip.1   Mon Nov  9 01:49:25 2015
(r290568)
+++ stable/10/usr.bin/gzip/gzip.1   Mon Nov  9 01:53:54 2015
(r290569)
@@ -1,4 +1,4 @@
-.\"$NetBSD: gzip.1,v 1.25 2015/04/06 21:41:17 wiz Exp $
+.\"$NetBSD: gzip.1,v 1.26 2015/10/27 07:36:18 mrg Exp $
 .\"
 .\" Copyright (c) 1997, 2003, 2004 Matthew R. Green
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd April 6, 2015
+.Dd October 26, 2015
 .Dt GZIP 1
 .Os
 .Sh NAME
@@ -136,7 +136,7 @@ option, allowing non-compressed data to 
 .It Fl h , -help
 This option prints a usage summary and exits.
 .It Fl k , -keep
-Keep (don't delete) input files during compression
+Keep (do not delete) input files during compression
 or decompression.
 .It Fl L , -license
 This option prints
@@ -183,6 +183,12 @@ is set, it is parsed as a white-space se
 handled before any options on the command line.
 Options on the command line will override anything in
 .Ev GZIP .
+.Sh EXIT STATUS
+The
+.Nm
+utility exits 0 on success,
+1 on errors,
+and 2 if a warning occurs.
 .Sh SEE ALSO
 .Xr bzip2 1 ,
 .Xr compress 1 ,
@@ -220,7 +226,7 @@ with unpack support written by
 .An Xin LI Aq delp...@freebsd.org .
 .Sh BUGS
 According to RFC 1952, the recorded file size is stored in a 32-bit
-integer, therefore, it can not represent files larger than 4GB.
+integer, therefore, it cannot represent files larger than 4GB.
 This limitation also applies to
 .Fl l
 option of

Modified: stable/10/usr.bin/gzip/gzip.c
==
--- stable/10/usr.bin/gzip/gzip.c   Mon Nov  9 01:49:25 2015
(r290568)
+++ stable/10/usr.bin/gzip/gzip.c   Mon Nov  9 01:53:54 2015
(r290569)
@@ -1,4 +1,4 @@
-/* $NetBSD: gzip.c,v 1.108 2015/04/15 02:29:12 christos Exp $  */
+/* $NetBSD: gzip.c,v 1.109 2015/10/27 07:36:18 mrg Exp $   */
 
 /*-
  * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green
@@ -810,6 +810,7 @@ gz_uncompress(int in, int out, char *pre
if (in_tot > 0) {
maybe_warnx("%s: trailing garbage "
"ignored", filename);
+   exit_value = 2;
goto stop;
}
maybe_warnx("input not gziped (MAGIC0)");
___
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: r290550 - head/release/tools

2015-11-08 Thread Howard Su
tmpfs doesn't support noatime option. please remove it.

On Mon, Nov 9, 2015 at 2:02 AM, Glen Barber  wrote:

> Author: gjb
> Date: Sun Nov  8 18:02:39 2015
> New Revision: 290550
> URL: https://svnweb.freebsd.org/changeset/base/290550
>
> Log:
>   Use tmpfs(5) instead of md(4) for '/tmp' mount.
>
>   Submitted by: Nikolai Lifanov
>   Differential Revision:D3506
>   MFC after:3 days
>   Sponsored by: The FreeBSD Foundation
>
> Modified:
>   head/release/tools/arm.subr
>
> Modified: head/release/tools/arm.subr
>
> ==
> --- head/release/tools/arm.subr Sun Nov  8 18:00:44 2015(r290549)
> +++ head/release/tools/arm.subr Sun Nov  8 18:02:39 2015(r290550)
> @@ -110,7 +110,7 @@ arm_install_base() {
> >> ${CHROOTDIR}/${DESTDIR}/etc/fstab
> echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \
> >> ${CHROOTDIR}/${DESTDIR}/etc/fstab
> -   echo "md /tmp mfs rw,noatime,-s30m 0 0" \
> +   echo "tmpfs /tmp tmpfs rw,noatime,mode=1777,size=30m 0 0" \
> >> ${CHROOTDIR}/${DESTDIR}/etc/fstab
>
> local hostname
> ___
> svn-src-h...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>



-- 
-Howard
___
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: r290571 - head/lib/libc/tests/gen

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 06:16:38 2015
New Revision: 290571
URL: https://svnweb.freebsd.org/changeset/base/290571

Log:
  Fix some TAP -> ATF conversion errors
  
  - Remove a leftover printf from when this was a TAP based testcase
  - Catch mmap failures properly
  
  MFC after: 3 days
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/tests/gen/arc4random_test.c

Modified: head/lib/libc/tests/gen/arc4random_test.c
==
--- head/lib/libc/tests/gen/arc4random_test.c   Mon Nov  9 02:29:38 2015
(r290570)
+++ head/lib/libc/tests/gen/arc4random_test.c   Mon Nov  9 06:16:38 2015
(r290571)
@@ -30,10 +30,12 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+
 #include 
 
 /*
@@ -56,14 +58,9 @@ ATF_TC_BODY(test_arc4random, tc)
pid_t pid;
char c;
 
-   printf("1..1\n");
-
page = mmap(NULL, sizeof(struct shared_page), PROT_READ | PROT_WRITE,
MAP_ANON | MAP_SHARED, -1, 0);
-   if (page == MAP_FAILED) {
-   printf("fail 1 - mmap\n");
-   exit(1);
-   }
+   ATF_REQUIRE_MSG(page != MAP_FAILED, "mmap failed; errno=%d", errno);
 
arc4random_buf(, 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: r290572 - in head: lib/libc/tests/gen tools/regression/lib/libc/gen

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 06:24:11 2015
New Revision: 290572
URL: https://svnweb.freebsd.org/changeset/base/290572

Log:
  Integrate tools/regression/lib/libc/gen into the FreeBSD test suite
  as lib/libc/tests/gen
  
  The code in test-fnmatch that was used for generating:
  
  - bin/sh/tests/builtins/case2.0
  - bin/sh/tests/builtins/case3.0
  
  has been left undisturbed. The target `make sh-tests` has been moved over
  from tools/regression/lib/libc/gen/Makefile to
  lib/libc/tests/gen/Makefile and made into a PHONY target
  
  case2.0 and case3.0 test input generation isn't being done automatically.
  This needs additional discussion.
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/lib/libc/tests/gen/fmtcheck_test.c
 - copied, changed from r290571, 
head/tools/regression/lib/libc/gen/test-fmtcheck.c
  head/lib/libc/tests/gen/fmtmsg_test.c
 - copied, changed from r290571, 
head/tools/regression/lib/libc/gen/test-fmtmsg.c
  head/lib/libc/tests/gen/fnmatch_test.c
 - copied, changed from r290571, 
head/tools/regression/lib/libc/gen/test-fnmatch.c
  head/lib/libc/tests/gen/fnmatch_testcases.h   (contents, props changed)
  head/lib/libc/tests/gen/ftw_test.c
 - copied, changed from r290571, 
head/tools/regression/lib/libc/gen/test-ftw.c
  head/lib/libc/tests/gen/popen_test.c
 - copied, changed from r290571, 
head/tools/regression/lib/libc/gen/test-popen.c
  head/lib/libc/tests/gen/posix_spawn_test.c
 - copied, changed from r290571, 
head/tools/regression/lib/libc/gen/test-posix_spawn.c
  head/lib/libc/tests/gen/test-fnmatch.c   (contents, props changed)
  head/lib/libc/tests/gen/wordexp_test.c
 - copied, changed from r290571, 
head/tools/regression/lib/libc/gen/test-wordexp.c
Deleted:
  head/tools/regression/lib/libc/gen/
Modified:
  head/lib/libc/tests/gen/Makefile

Modified: head/lib/libc/tests/gen/Makefile
==
--- head/lib/libc/tests/gen/MakefileMon Nov  9 06:16:38 2015
(r290571)
+++ head/lib/libc/tests/gen/MakefileMon Nov  9 06:24:11 2015
(r290572)
@@ -2,8 +2,15 @@
 
 .include 
 
-ATF_TESTS_C=   arc4random_test
+ATF_TESTS_C+=  arc4random_test
+ATF_TESTS_C+=  fmtcheck2_test
+ATF_TESTS_C+=  fmtmsg_test
+ATF_TESTS_C+=  fnmatch2_test
 ATF_TESTS_C+=  fpclassify2_test
+ATF_TESTS_C+=  ftw_test
+ATF_TESTS_C+=  popen_test
+ATF_TESTS_C+=  posix_spawn_test
+ATF_TESTS_C+=  wordexp_test
 
 # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, t_sleep
 # TODO: t_siginfo (fixes require further inspection)
@@ -53,7 +60,25 @@ DPADD.nice_test+=${LIBPTHREAD}
 LDADD.syslog_test+=-lpthread
 DPADD.syslog_test+=${LIBPTHREAD}
 
+CFLAGS+=   -I${.CURDIR}
+
+SRCS.fmtcheck2_test=   fmtcheck_test.c
+SRCS.fnmatch2_test=fnmatch_test.c
+
 TESTS_SUBDIRS= execve
 TESTS_SUBDIRS+=posix_spawn
 
+# The old testcase name
+TEST_FNMATCH=  test-fnmatch
+CLEANFILES+=   ${GEN_SH_CASE_TESTCASES}
+sh-tests: .PHONY
+.for target in clean obj depend all
+   @cd ${.CURDIR} && ${MAKE} PROG=${TEST_FNMATCH} \
+   -DNO_SUBDIR ${target}
+.endfor
+   @cd ${.OBJDIR} && ./${TEST_FNMATCH} -s 1 > \
+   ${SRCTOP}/bin/sh/tests/builtins/case2.0
+   @cd ${.OBJDIR} && ./${TEST_FNMATCH} -s 2 > \
+   ${SRCTOP}/bin/sh/tests/builtins/case3.0
+
 .include 

Copied and modified: head/lib/libc/tests/gen/fmtcheck_test.c (from r290571, 
head/tools/regression/lib/libc/gen/test-fmtcheck.c)
==
--- head/tools/regression/lib/libc/gen/test-fmtcheck.c  Mon Nov  9 06:16:38 
2015(r290571, copy source)
+++ head/lib/libc/tests/gen/fmtcheck_test.c Mon Nov  9 06:24:11 2015
(r290572)
@@ -31,10 +31,13 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
 #include 
 #include 
 #include 
 
+#include 
+
 struct test_fmt {
char*fmt1;
char*fmt2;
@@ -72,31 +75,31 @@ struct test_fmt {
{ "%p %30s %#llx %-10.*e", "This number %lu%% and string %s has %qd 
numbers and %.*g floats", 1 },
 };
 
-int
-main(int argc, char *argv[])
+ATF_TC_WITHOUT_HEAD(fmtcheck_test);
+ATF_TC_BODY(fmtcheck_test, tc)
 {
-   int i, n, r;
-   const char  *f, *cf, *f1, *f2;
+   int i;
+   const char *f, *cf, *f1, *f2;
 
-   printf("1..1\n");
-   r = 0;
-   n = sizeof(test_fmts) / sizeof(test_fmts[0]);
-   for (i=0 ; i
 __FBSDID("$FreeBSD$");
 
+#include 
 #include 
-
 #include 
 #include 
 #include 
@@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 static char *run_test(long classification, const char *label, int severity,
 const char *text, const char *action, const char *tag);
 
@@ -217,18 +219,14 @@ run_test(long classification, const char
return (result);
 }
 
-int
-main(void)

svn commit: r290574 - in stable/10: bin/dd bin/dd/tests contrib/netbsd-tests/bin/dd etc/mtree

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 06:50:42 2015
New Revision: 290574
URL: https://svnweb.freebsd.org/changeset/base/290574

Log:
  MFC r289487:
  
  Integrate contrib/netbsd-tests/bin/dd into the FreeBSD test suite as
  bin/dd/tests
  
  Ensure fdescfs is mounted on /dev/fd/ for the length testcase as it's used
  in validating the characters read from /dev/zero
  
  Sponsored by: EMC / Isilon Storage Division

Added:
  stable/10/bin/dd/tests/
 - copied from r289487, head/bin/dd/tests/
Modified:
  stable/10/bin/dd/Makefile
  stable/10/bin/dd/tests/Makefile
  stable/10/contrib/netbsd-tests/bin/dd/t_dd.sh
  stable/10/etc/mtree/BSD.tests.dist
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/dd/Makefile
==
--- stable/10/bin/dd/Makefile   Mon Nov  9 06:30:26 2015(r290573)
+++ stable/10/bin/dd/Makefile   Mon Nov  9 06:50:42 2015(r290574)
@@ -1,6 +1,8 @@
 #  @(#)Makefile8.1 (Berkeley) 5/31/93
 # $FreeBSD$
 
+.include 
+
 PROG=  dd
 SRCS=  args.c conv.c conv_tab.c dd.c misc.c position.c
 
@@ -24,4 +26,8 @@ test: ${PROG} gen
 .endfor
@rm -f gen
 
+.if ${MK_TESTS} != "no"
+SUBDIR+=   tests
+.endif
+
 .include 

Modified: stable/10/bin/dd/tests/Makefile
==
--- head/bin/dd/tests/Makefile  Sun Oct 18 05:49:58 2015(r289487)
+++ stable/10/bin/dd/tests/Makefile Mon Nov  9 06:50:42 2015
(r290574)
@@ -1,5 +1,10 @@
 # $FreeBSD$
 
+OBJTOP=${.OBJDIR:H:H:H}
+SRCTOP=${.CURDIR:H:H:H}
+TESTSRC=   ${SRCTOP}/contrib/netbsd-tests/bin/dd
+TESTSDIR=  ${TESTSBASE}/bin/dd
+
 NETBSD_ATF_TESTS_SH=   dd_test
 
 .include 

Modified: stable/10/contrib/netbsd-tests/bin/dd/t_dd.sh
==
--- stable/10/contrib/netbsd-tests/bin/dd/t_dd.sh   Mon Nov  9 06:30:26 
2015(r290573)
+++ stable/10/contrib/netbsd-tests/bin/dd/t_dd.sh   Mon Nov  9 06:50:42 
2015(r290574)
@@ -44,6 +44,12 @@ length_head() {
"the one expected to fail.  (NetBSD PR bin/8521)"
 }
 length_body() {
+   # Begin FreeBSD
+   if ! df /dev/fd | grep -q '^fdescfs'; then
+   atf_skip "fdescfs is not mounted on /dev/fd"
+   fi
+   # End FreeBSD
+
test_dd_length 512 \
"dd if=/dev/zero of=/dev/fd/5 count=1 5>&1 >/dev/null 2>/dev/null"
test_dd_length 512 \

Modified: stable/10/etc/mtree/BSD.tests.dist
==
--- stable/10/etc/mtree/BSD.tests.dist  Mon Nov  9 06:30:26 2015
(r290573)
+++ stable/10/etc/mtree/BSD.tests.dist  Mon Nov  9 06:50:42 2015
(r290574)
@@ -10,6 +10,8 @@
 ..
 date
 ..
+dd
+..
 expr
 ..
 ls
___
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: r290582 - stable/10/lib/libc/gen

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 07:34:30 2015
New Revision: 290582
URL: https://svnweb.freebsd.org/changeset/base/290582

Log:
  MFC r290179:
  
  Remove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ 
warning
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  stable/10/lib/libc/gen/getgrent.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/gen/getgrent.c
==
--- stable/10/lib/libc/gen/getgrent.c   Mon Nov  9 07:28:17 2015
(r290581)
+++ stable/10/lib/libc/gen/getgrent.c   Mon Nov  9 07:34:30 2015
(r290582)
@@ -659,14 +659,13 @@ __getgroupmembership(const char *uname, 
NS_FALLBACK_CB(getgroupmembership_fallback)
{ NULL, NULL, NULL }
};
-   int rv;
 
assert(uname != NULL);
/* groups may be NULL if just sizing when invoked with maxgrp = 0 */
assert(grpcnt != NULL);
 
*grpcnt = 0;
-   rv = _nsdispatch(NULL, dtab, NSDB_GROUP, "getgroupmembership",
+   (void)_nsdispatch(NULL, dtab, NSDB_GROUP, "getgroupmembership",
defaultsrc, uname, agroup, groups, maxgrp, grpcnt);
 
/* too many groups 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: r290544 - in stable/10: include lib/libc/stdio

2015-11-08 Thread Andrey A. Chernov
Author: ache
Date: Sun Nov  8 13:37:16 2015
New Revision: 290544
URL: https://svnweb.freebsd.org/changeset/base/290544

Log:
  MFC:  r289863,r289931,r290110,r290230,r290231,r290232
  
  r290232:
  
  Microoptimize.
  
  r290231:
  
  Addition to prev. commit.
  In some edge cases fp->_p can be changed in _sseek(), recalculate.
  
  r290230:
  
  Don't seek to the end if write buffer is empty (in append modes).
  PR: 204156
  
  r290110:
  
  Add _flags2 per jhb@ suggestion since no room left in _flags.
  Rewrite O_APPEND flag checking using new __S2OAP flag.
  
  r289931:
  
  According to POSIX, a write operation shall start at the current size of
  the stream (if mode had 'a' as the first character).
  
  r289863:
  
  Since no room left in the _flags, reuse __SALC for O_APPEND.
  It helps to remove _fcntl() call from _ftello() and optimize seek position
  calculation in _swrite().

Modified:
  stable/10/include/stdio.h
  stable/10/lib/libc/stdio/fdopen.c
  stable/10/lib/libc/stdio/findfp.c
  stable/10/lib/libc/stdio/fmemopen.c
  stable/10/lib/libc/stdio/fopen.c
  stable/10/lib/libc/stdio/freopen.c
  stable/10/lib/libc/stdio/ftell.c
  stable/10/lib/libc/stdio/stdio.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/include/stdio.h
==
--- stable/10/include/stdio.h   Sun Nov  8 12:24:19 2015(r290543)
+++ stable/10/include/stdio.h   Sun Nov  8 13:37:16 2015(r290544)
@@ -144,6 +144,7 @@ struct __sFILE {
int _fl_count;  /* recursive lock count */
int _orientation;   /* orientation for fwide() */
__mbstate_t _mbstate;   /* multibyte conversion state */
+   int _flags2;/* additional flags */
 };
 #ifndef _STDFILE_DECLARED
 #define _STDFILE_DECLARED
@@ -176,6 +177,8 @@ __END_DECLS
 #define__SALC  0x4000  /* allocate string space dynamically */
 #define__SIGN  0x8000  /* ignore this file in _fwalk */
 
+#define__S2OAP 0x0001  /* O_APPEND mode is set */
+
 /*
  * The following three definitions are for ANSI C, which took them
  * from System V, which brilliantly took internal interface macros and

Modified: stable/10/lib/libc/stdio/fdopen.c
==
--- stable/10/lib/libc/stdio/fdopen.c   Sun Nov  8 12:24:19 2015
(r290543)
+++ stable/10/lib/libc/stdio/fdopen.c   Sun Nov  8 13:37:16 2015
(r290544)
@@ -90,7 +90,9 @@ fdopen(int fd, const char *mode)
 * O_APPEND bit set, assert __SAPP so that __swrite() caller
 * will _sseek() to the end before write.
 */
-   if ((oflags & O_APPEND) && !(fdflags & O_APPEND))
+   if (fdflags & O_APPEND)
+   fp->_flags2 |= __S2OAP;
+   else if (oflags & O_APPEND)
fp->_flags |= __SAPP;
fp->_file = fd;
fp->_cookie = fp;

Modified: stable/10/lib/libc/stdio/findfp.c
==
--- stable/10/lib/libc/stdio/findfp.c   Sun Nov  8 12:24:19 2015
(r290543)
+++ stable/10/lib/libc/stdio/findfp.c   Sun Nov  8 13:37:16 2015
(r290544)
@@ -155,6 +155,7 @@ found:
 /* fp->_fl_mutex = NULL; */ /* once set always set (reused) */
fp->_orientation = 0;
memset(>_mbstate, 0, sizeof(mbstate_t));
+   fp->_flags2 = 0;
return (fp);
 }
 

Modified: stable/10/lib/libc/stdio/fmemopen.c
==
--- stable/10/lib/libc/stdio/fmemopen.c Sun Nov  8 12:24:19 2015
(r290543)
+++ stable/10/lib/libc/stdio/fmemopen.c Sun Nov  8 13:37:16 2015
(r290544)
@@ -149,6 +149,9 @@ fmemopen(void * __restrict buf, size_t s
return (NULL);
}
 
+   if (mode[0] == 'a')
+   f->_flags |= __SAPP;
+
/*
 * Turn off buffering, so a write past the end of the buffer
 * correctly returns a short object count.

Modified: stable/10/lib/libc/stdio/fopen.c
==
--- stable/10/lib/libc/stdio/fopen.cSun Nov  8 12:24:19 2015
(r290543)
+++ stable/10/lib/libc/stdio/fopen.cSun Nov  8 13:37:16 2015
(r290544)
@@ -91,7 +91,9 @@ fopen(const char * __restrict file, cons
 * we can do about this.  (We could set __SAPP and check in
 * fseek and ftell.)
 */
-   if (oflags & O_APPEND)
+   if (oflags & O_APPEND) {
+   fp->_flags2 |= __S2OAP;
(void)_sseek(fp, (fpos_t)0, SEEK_END);
+   }
return (fp);
 }

Modified: stable/10/lib/libc/stdio/freopen.c
==
--- stable/10/lib/libc/stdio/freopen.c  Sun Nov  8 12:24:19 2015
(r290543)
+++ stable/10/lib/libc/stdio/freopen.c  Sun Nov  8 13:37:16 

Re: svn commit: r290550 - head/release/tools

2015-11-08 Thread Glen Barber
You are correct, thank you for noticing.  I've committed the fix as
r290573, which will be merged to stable/10 along with r290550.

Glen

On Mon, Nov 09, 2015 at 01:49:29PM +0800, Howard Su wrote:
> tmpfs doesn't support noatime option. please remove it.
> 
> On Mon, Nov 9, 2015 at 2:02 AM, Glen Barber  wrote:
> 
> > Author: gjb
> > Date: Sun Nov  8 18:02:39 2015
> > New Revision: 290550
> > URL: https://svnweb.freebsd.org/changeset/base/290550
> >
> > Log:
> >   Use tmpfs(5) instead of md(4) for '/tmp' mount.
> >
> >   Submitted by: Nikolai Lifanov
> >   Differential Revision:D3506
> >   MFC after:3 days
> >   Sponsored by: The FreeBSD Foundation
> >
> > Modified:
> >   head/release/tools/arm.subr
> >
> > Modified: head/release/tools/arm.subr
> >
> > ==
> > --- head/release/tools/arm.subr Sun Nov  8 18:00:44 2015(r290549)
> > +++ head/release/tools/arm.subr Sun Nov  8 18:02:39 2015(r290550)
> > @@ -110,7 +110,7 @@ arm_install_base() {
> > >> ${CHROOTDIR}/${DESTDIR}/etc/fstab
> > echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \
> > >> ${CHROOTDIR}/${DESTDIR}/etc/fstab
> > -   echo "md /tmp mfs rw,noatime,-s30m 0 0" \
> > +   echo "tmpfs /tmp tmpfs rw,noatime,mode=1777,size=30m 0 0" \
> > >> ${CHROOTDIR}/${DESTDIR}/etc/fstab
> >
> > local hostname
> > ___
> > svn-src-h...@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/svn-src-head
> > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
> >
> 
> 
> 
> -- 
> -Howard


signature.asc
Description: PGP signature


svn commit: r290573 - head/release/tools

2015-11-08 Thread Glen Barber
Author: gjb
Date: Mon Nov  9 06:30:26 2015
New Revision: 290573
URL: https://svnweb.freebsd.org/changeset/base/290573

Log:
  Remove noatime from tmpfs(5) fstab(5) entry.
  
  Submitted by: Howard Su
  MFC after:3 days
  X-MFC-With:   r290550
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/tools/arm.subr

Modified: head/release/tools/arm.subr
==
--- head/release/tools/arm.subr Mon Nov  9 06:24:11 2015(r290572)
+++ head/release/tools/arm.subr Mon Nov  9 06:30:26 2015(r290573)
@@ -110,7 +110,7 @@ arm_install_base() {
>> ${CHROOTDIR}/${DESTDIR}/etc/fstab
echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \
>> ${CHROOTDIR}/${DESTDIR}/etc/fstab
-   echo "tmpfs /tmp tmpfs rw,noatime,mode=1777,size=30m 0 0" \ 
+   echo "tmpfs /tmp tmpfs rw,mode=1777,size=30m 0 0" \ 
>> ${CHROOTDIR}/${DESTDIR}/etc/fstab
 
local hostname
___
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: r290581 - stable/9/tools/regression/security/open_to_operation

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 07:28:17 2015
New Revision: 290581
URL: https://svnweb.freebsd.org/changeset/base/290581

Log:
  MFstable/10 r290580:
  
  MFC r290190,r290251:
  
  r290190:
  
  Fix compiler warnings with open_to_operation.c
  
  Other sidenotes:
  - Remove unused variables with main(..)
  - Convert errx/exit with -1 to errx/exit with 1
  - Fix a bogus test in try_directory_open
(expected_errno == expected_errno -> errno == expected_errno) [*]
  - Fix some warnings related to discarded qualifiers
  - Remove a bogus else-statement at the end of check_mmap_exec(..) in the
successful case. mmap(2), POSIX, Linux, etc all don't state what the
behavior is when mixing O_WRONLY + PROT_EXEC, so assume success for now to
get the test program to pass again.
  
  PR: 201286 [*]
  Submitted by: David Binderman 
  Sponsored by: EMC / Isilon Storage Division
  
  r290251:
  
  Use nitems(x) instead of sizeof(x)/sizeof(x[0])
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  stable/9/tools/regression/security/open_to_operation/Makefile
  stable/9/tools/regression/security/open_to_operation/open_to_operation.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/tools/   (props changed)
  stable/9/tools/regression/   (props changed)

Modified: stable/9/tools/regression/security/open_to_operation/Makefile
==
--- stable/9/tools/regression/security/open_to_operation/Makefile   Mon Nov 
 9 07:26:34 2015(r290580)
+++ stable/9/tools/regression/security/open_to_operation/Makefile   Mon Nov 
 9 07:28:17 2015(r290581)
@@ -2,6 +2,6 @@
 
 PROG=  open_to_operation
 NO_MAN=
-#WARNS=3
+WARNS?=3
 
 .include 

Modified: 
stable/9/tools/regression/security/open_to_operation/open_to_operation.c
==
--- stable/9/tools/regression/security/open_to_operation/open_to_operation.c
Mon Nov  9 07:26:34 2015(r290580)
+++ stable/9/tools/regression/security/open_to_operation/open_to_operation.c
Mon Nov  9 07:28:17 2015(r290581)
@@ -119,10 +119,10 @@ __FBSDID("$FreeBSD$");
  */
 static const int file_modes[] = { O_RDONLY, O_WRONLY, O_RDWR,
 O_RDONLY | O_TRUNC, O_WRONLY | O_TRUNC, O_RDWR | O_TRUNC };
-static const int file_modes_count = sizeof(file_modes) / sizeof(int);
+static const int file_modes_count = nitems(file_modes);
 
 static const int dir_modes[] = { O_RDONLY };
-static const int dir_modes_count = sizeof(dir_modes) / sizeof(int);
+static const int dir_modes_count = nitems(dir_modes);
 
 static int testnum;
 static int aio_present;
@@ -169,9 +169,9 @@ try_directory_open(const char *testname,
ok_mode(testname, NULL, mode);
close(dfd);
} else {
-   if (expected_errno && expected_errno == expected_errno)
+   if (expected_errno && expected_errno == errno)
ok_mode(testname, NULL, mode);
-   else if (expected_errno)
+   else if (expected_errno != 0)
notok_mode(testname, "wrong errno", mode);
else
notok_mode(testname, "failed", mode);
@@ -753,7 +753,8 @@ pwritev_wrapper(int d, const void *buf, 
 static ssize_t
 aio_write_wrapper(int d, const void *buf, size_t nbytes)
 {
-   struct aiocb aiocb, *aiocb_array[1];
+   struct aiocb aiocb;
+   struct aiocb const *aiocb_array[] = {  };
 
bzero(, sizeof(aiocb));
aiocb.aio_fildes = d;
@@ -839,7 +840,8 @@ preadv_wrapper(int d, void *buf, size_t 
 static ssize_t
 aio_read_wrapper(int d, void *buf, size_t nbytes)
 {
-   struct aiocb aiocb, *aiocb_array[1];
+   struct aiocb aiocb;
+   struct aiocb const *aiocb_array[] = {  };
 
bzero(, sizeof(aiocb));
aiocb.aio_fildes = d;
@@ -847,7 +849,6 @@ aio_read_wrapper(int d, void *buf, size_
aiocb.aio_nbytes = nbytes;
if (aio_read() < 0)
return (-1);
-   aiocb_array[0] = 
if (aio_suspend(aiocb_array, 1, NULL) < 0)
return (-1);
return (aio_return());
@@ -1009,12 +1010,8 @@ check_mmap_exec(const char *testname, co
if (isdir)
notok_mode(testname, "mmap dir succeeded",
mode);
-   else if ((mode & O_ACCMODE) == O_RDONLY ||
-   (mode & O_ACCMODE) == O_RDWR)
-   ok_mode(testname, "mmap file succeeded",
-   mode);
else
-   notok_mode(testname, "mmap file succeeded",
+   ok_mode(testname, "mmap file succeeded",
mode);
(void)munmap(addr, getpagesize());

svn commit: r290576 - stable/10/usr.sbin/rtsold

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 07:07:25 2015
New Revision: 290576
URL: https://svnweb.freebsd.org/changeset/base/290576

Log:
  MFC r290182:
  
  Fix rtsold's usage message
  
  - Remove -a from the usage message example dealing with specific
interfaces. -a only makes sense when not specifying an interface,
such that it's to be run on all interfaces
  - Fix the pidfile option (it's -p, not -P)
  - Change `interfaces` to `interface` to match the manpage
  
  PR: 173744
  Sponsored by: EMC / Isilon Storage Division

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

Modified: stable/10/usr.sbin/rtsold/rtsold.c
==
--- stable/10/usr.sbin/rtsold/rtsold.c  Mon Nov  9 06:55:04 2015
(r290575)
+++ stable/10/usr.sbin/rtsold/rtsold.c  Mon Nov  9 07:07:25 2015
(r290576)
@@ -834,15 +834,15 @@ static void
 usage(void)
 {
 #ifndef SMALL
-   fprintf(stderr, "usage: rtsold [-adDfFm1] [-O script-name] "
-   "[-P pidfile] [-R script-name] interfaces...\n");
fprintf(stderr, "usage: rtsold [-dDfFm1] [-O script-name] "
-   "[-P pidfile] [-R script-name] -a\n");
+   "[-p pidfile] [-R script-name] interface ...\n");
+   fprintf(stderr, "usage: rtsold [-dDfFm1] [-O script-name] "
+   "[-p pidfile] [-R script-name] -a\n");
 #else
fprintf(stderr, "usage: rtsol [-dDF] [-O script-name] "
-   "[-P pidfile] [-R script-name] interfaces...\n");
+   "[-p pidfile] [-R script-name] interface ...\n");
fprintf(stderr, "usage: rtsol [-dDF] [-O script-name] "
-   "[-P pidfile] [-R script-name] -a\n");
+   "[-p pidfile] [-R script-name] -a\n");
 #endif
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r290578 - stable/10/contrib/netbsd-tests/lib/libc/ssp

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 07:16:17 2015
New Revision: 290578
URL: https://svnweb.freebsd.org/changeset/base/290578

Log:
  MFC r290184:
  
  Fix a set but not used variable warning flagged by gcc 4.9 with
  lib/libc/ssp/h_readlink
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  stable/10/contrib/netbsd-tests/lib/libc/ssp/h_readlink.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/netbsd-tests/lib/libc/ssp/h_readlink.c
==
--- stable/10/contrib/netbsd-tests/lib/libc/ssp/h_readlink.cMon Nov  9 
07:10:32 2015(r290577)
+++ stable/10/contrib/netbsd-tests/lib/libc/ssp/h_readlink.cMon Nov  9 
07:16:17 2015(r290578)
@@ -46,7 +46,6 @@ main(int argc, char *argv[])
 {
 #ifdef __FreeBSD__
char b[512], *sl;
-   int n;
size_t len = atoi(argv[1]);
sl = malloc(len);
memset(sl, 'a', len);
@@ -54,7 +53,7 @@ main(int argc, char *argv[])
unlink("symlink");
if (symlink(sl, "symlink") == -1)
err(1, "symlink()");
-   n = readlink("symlink", b, len);
+   (void)readlink("symlink", b, len);
unlink("symlink");
 #else
char b[MAXPATHLEN];
___
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: r290579 - stable/10/tools/build/mk

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 07:18:09 2015
New Revision: 290579
URL: https://svnweb.freebsd.org/changeset/base/290579

Log:
  MFC r289903:
  
  Add libvmmapi to OptionalObsoleteFiles.inc when MK_BHYVE == no
  
  Sponsored by: EMC / Isilon Storage Division

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  Mon Nov  9 07:16:17 
2015(r290578)
+++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc  Mon Nov  9 07:18:09 
2015(r290579)
@@ -172,6 +172,10 @@ OLD_DIRS+=etc/autofs
 .endif
 
 .if ${MK_BHYVE} == no
+OLD_FILES+=usr/lib/libvmmapi.a
+OLD_FILES+=usr/lib/libvmmapi.so
+OLD_LIBS+=usr/lib/libvmmapi.so.5
+OLD_FILES+=usr/include/vmmapi.h
 OLD_FILES+=usr/sbin/bhyve
 OLD_FILES+=usr/sbin/bhyvectl
 OLD_FILES+=usr/sbin/bhyveload
___
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: r290580 - stable/10/tools/regression/security/open_to_operation

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 07:26:34 2015
New Revision: 290580
URL: https://svnweb.freebsd.org/changeset/base/290580

Log:
  MFC r290190,r290251:
  
  r290190:
  
  Fix compiler warnings with open_to_operation.c
  
  Other sidenotes:
  - Remove unused variables with main(..)
  - Convert errx/exit with -1 to errx/exit with 1
  - Fix a bogus test in try_directory_open
(expected_errno == expected_errno -> errno == expected_errno) [*]
  - Fix some warnings related to discarded qualifiers
  - Remove a bogus else-statement at the end of check_mmap_exec(..) in the
successful case. mmap(2), POSIX, Linux, etc all don't state what the
behavior is when mixing O_WRONLY + PROT_EXEC, so assume success for now to
get the test program to pass again.
  
  PR: 201286 [*]
  Submitted by: David Binderman 
  Sponsored by: EMC / Isilon Storage Division
  
  r290251:
  
  Use nitems(x) instead of sizeof(x)/sizeof(x[0])
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  stable/10/tools/regression/security/open_to_operation/Makefile
  stable/10/tools/regression/security/open_to_operation/open_to_operation.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/regression/security/open_to_operation/Makefile
==
--- stable/10/tools/regression/security/open_to_operation/Makefile  Mon Nov 
 9 07:18:09 2015(r290579)
+++ stable/10/tools/regression/security/open_to_operation/Makefile  Mon Nov 
 9 07:26:34 2015(r290580)
@@ -2,6 +2,6 @@
 
 PROG=  open_to_operation
 MAN=
-#WARNS=3
+WARNS?=3
 
 .include 

Modified: 
stable/10/tools/regression/security/open_to_operation/open_to_operation.c
==
--- stable/10/tools/regression/security/open_to_operation/open_to_operation.c   
Mon Nov  9 07:18:09 2015(r290579)
+++ stable/10/tools/regression/security/open_to_operation/open_to_operation.c   
Mon Nov  9 07:26:34 2015(r290580)
@@ -119,10 +119,10 @@ __FBSDID("$FreeBSD$");
  */
 static const int file_modes[] = { O_RDONLY, O_WRONLY, O_RDWR,
 O_RDONLY | O_TRUNC, O_WRONLY | O_TRUNC, O_RDWR | O_TRUNC };
-static const int file_modes_count = sizeof(file_modes) / sizeof(int);
+static const int file_modes_count = nitems(file_modes);
 
 static const int dir_modes[] = { O_RDONLY };
-static const int dir_modes_count = sizeof(dir_modes) / sizeof(int);
+static const int dir_modes_count = nitems(dir_modes);
 
 static int testnum;
 static int aio_present;
@@ -169,9 +169,9 @@ try_directory_open(const char *testname,
ok_mode(testname, NULL, mode);
close(dfd);
} else {
-   if (expected_errno && expected_errno == expected_errno)
+   if (expected_errno && expected_errno == errno)
ok_mode(testname, NULL, mode);
-   else if (expected_errno)
+   else if (expected_errno != 0)
notok_mode(testname, "wrong errno", mode);
else
notok_mode(testname, "failed", mode);
@@ -753,7 +753,8 @@ pwritev_wrapper(int d, const void *buf, 
 static ssize_t
 aio_write_wrapper(int d, const void *buf, size_t nbytes)
 {
-   struct aiocb aiocb, *aiocb_array[1];
+   struct aiocb aiocb;
+   struct aiocb const *aiocb_array[] = {  };
 
bzero(, sizeof(aiocb));
aiocb.aio_fildes = d;
@@ -839,7 +840,8 @@ preadv_wrapper(int d, void *buf, size_t 
 static ssize_t
 aio_read_wrapper(int d, void *buf, size_t nbytes)
 {
-   struct aiocb aiocb, *aiocb_array[1];
+   struct aiocb aiocb;
+   struct aiocb const *aiocb_array[] = {  };
 
bzero(, sizeof(aiocb));
aiocb.aio_fildes = d;
@@ -847,7 +849,6 @@ aio_read_wrapper(int d, void *buf, size_
aiocb.aio_nbytes = nbytes;
if (aio_read() < 0)
return (-1);
-   aiocb_array[0] = 
if (aio_suspend(aiocb_array, 1, NULL) < 0)
return (-1);
return (aio_return());
@@ -1009,12 +1010,8 @@ check_mmap_exec(const char *testname, co
if (isdir)
notok_mode(testname, "mmap dir succeeded",
mode);
-   else if ((mode & O_ACCMODE) == O_RDONLY ||
-   (mode & O_ACCMODE) == O_RDWR)
-   ok_mode(testname, "mmap file succeeded",
-   mode);
else
-   notok_mode(testname, "mmap file succeeded",
+   ok_mode(testname, "mmap file succeeded",
mode);
(void)munmap(addr, getpagesize());
}
@@ -1069,7 +1066,7 @@ check_mmap_write_private(const char *tes
 }
 
 int
-main(int argc, char 

svn commit: r290575 - stable/10/secure/lib/libcrypto/engines/libgost

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 06:55:04 2015
New Revision: 290575
URL: https://svnweb.freebsd.org/changeset/base/290575

Log:
  MFC r290178:
  
  Fix GOST engine cipher linkage by adding e_gost_err.c to SRCS so it
  picks up undefined symbols, like "ERR_load_GOST_strings"
  
  PR: 184805
  Submitted by: Ivan IvanZhdanov 
  Sponsored by: EMC / Isilon Storage Division

Modified:
  stable/10/secure/lib/libcrypto/engines/libgost/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/secure/lib/libcrypto/engines/libgost/Makefile
==
--- stable/10/secure/lib/libcrypto/engines/libgost/Makefile Mon Nov  9 
06:50:42 2015(r290574)
+++ stable/10/secure/lib/libcrypto/engines/libgost/Makefile Mon Nov  9 
06:55:04 2015(r290575)
@@ -3,6 +3,7 @@
 SHLIB_NAME?= libgost.so
 SRCS=  gost2001.c gost2001_keyx.c gost89.c gost94_keyx.c gost_ameth.c \
gost_asn1.c gost_crypt.c gost_ctl.c gost_eng.c gost_keywrap.c \
-   gost_md.c gost_params.c gost_pmeth.c gost_sign.c gosthash.c
+   gost_md.c gost_params.c gost_pmeth.c gost_sign.c gosthash.c \
+   e_gost_err.c
 
 .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: r290577 - stable/9/usr.sbin/rtsold

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 07:10:32 2015
New Revision: 290577
URL: https://svnweb.freebsd.org/changeset/base/290577

Log:
  MFstable/10 r290576:
  
  MFC r290182:
  
  Fix rtsold's usage message
  
  - Remove -a from the usage message example dealing with specific
interfaces. -a only makes sense when not specifying an interface,
such that it's to be run on all interfaces
  - Fix the pidfile option (it's -p, not -P)
  - Change `interfaces` to `interface` to match the manpage
  
  PR: 173744
  Sponsored by: EMC / Isilon Storage Division

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

Modified: stable/9/usr.sbin/rtsold/rtsold.c
==
--- stable/9/usr.sbin/rtsold/rtsold.c   Mon Nov  9 07:07:25 2015
(r290576)
+++ stable/9/usr.sbin/rtsold/rtsold.c   Mon Nov  9 07:10:32 2015
(r290577)
@@ -839,15 +839,15 @@ static void
 usage(void)
 {
 #ifndef SMALL
-   fprintf(stderr, "usage: rtsold [-adDfFm1] [-O script-name] "
-   "[-P pidfile] [-R script-name] interfaces...\n");
fprintf(stderr, "usage: rtsold [-dDfFm1] [-O script-name] "
-   "[-P pidfile] [-R script-name] -a\n");
+   "[-p pidfile] [-R script-name] interface ...\n");
+   fprintf(stderr, "usage: rtsold [-dDfFm1] [-O script-name] "
+   "[-p pidfile] [-R script-name] -a\n");
 #else
fprintf(stderr, "usage: rtsol [-dDF] [-O script-name] "
-   "[-P pidfile] [-R script-name] interfaces...\n");
+   "[-p pidfile] [-R script-name] interface ...\n");
fprintf(stderr, "usage: rtsol [-dDF] [-O script-name] "
-   "[-P pidfile] [-R script-name] -a\n");
+   "[-p pidfile] [-R script-name] -a\n");
 #endif
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r290583 - stable/9/lib/libc/gen

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 07:36:55 2015
New Revision: 290583
URL: https://svnweb.freebsd.org/changeset/base/290583

Log:
  MFstable/10 r290582:
  
  MFC r290179:
  
  Remove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ 
warning
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  stable/9/lib/libc/gen/getgrent.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/lib/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/gen/getgrent.c
==
--- stable/9/lib/libc/gen/getgrent.cMon Nov  9 07:34:30 2015
(r290582)
+++ stable/9/lib/libc/gen/getgrent.cMon Nov  9 07:36:55 2015
(r290583)
@@ -659,14 +659,13 @@ __getgroupmembership(const char *uname, 
NS_FALLBACK_CB(getgroupmembership_fallback)
{ NULL, NULL, NULL }
};
-   int rv;
 
assert(uname != NULL);
/* groups may be NULL if just sizing when invoked with maxgrp = 0 */
assert(grpcnt != NULL);
 
*grpcnt = 0;
-   rv = _nsdispatch(NULL, dtab, NSDB_GROUP, "getgroupmembership",
+   (void)_nsdispatch(NULL, dtab, NSDB_GROUP, "getgroupmembership",
defaultsrc, uname, agroup, groups, maxgrp, grpcnt);
 
/* too many groups 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: r290585 - in stable/10: etc/mtree tests/sys tests/sys/posixshm tools/regression/posixshm tools/test/posixshm

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 07:49:39 2015
New Revision: 290585
URL: https://svnweb.freebsd.org/changeset/base/290585

Log:
  MFC r289441:
  
  Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD
  test suite as tests/sys/posixshm
  
  Some other highlights:
  - Convert the testcases over to ATF
  - Don't use hardcoded paths to /tmp (which violate the ATF/kyua samdbox); use
mkstemp to generate temporary paths for non-SHM_ANON shm objects.
  
  Sponsored by: EMC / Isilon Storage Division

Added:
  stable/10/tests/sys/posixshm/
 - copied from r289441, head/tests/sys/posixshm/
Deleted:
  stable/10/tools/regression/posixshm/
  stable/10/tools/test/posixshm/
Modified:
  stable/10/etc/mtree/BSD.tests.dist
  stable/10/tests/sys/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/mtree/BSD.tests.dist
==
--- stable/10/etc/mtree/BSD.tests.dist  Mon Nov  9 07:41:28 2015
(r290584)
+++ stable/10/etc/mtree/BSD.tests.dist  Mon Nov  9 07:49:39 2015
(r290585)
@@ -234,6 +234,8 @@
 unlink
 ..
 ..
+posixshm
+..
 vfs
 ..
 vm

Modified: stable/10/tests/sys/Makefile
==
--- stable/10/tests/sys/MakefileMon Nov  9 07:41:28 2015
(r290584)
+++ stable/10/tests/sys/MakefileMon Nov  9 07:49:39 2015
(r290585)
@@ -11,6 +11,7 @@ TESTS_SUBDIRS+=   kern
 TESTS_SUBDIRS+=kqueue
 TESTS_SUBDIRS+=mqueue
 TESTS_SUBDIRS+=netinet
+TESTS_SUBDIRS+=posixshm
 TESTS_SUBDIRS+=vfs
 TESTS_SUBDIRS+=vm
 
___
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: r290584 - in stable/10: etc/mtree lib/libc/tests

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 07:41:28 2015
New Revision: 290584
URL: https://svnweb.freebsd.org/changeset/base/290584

Log:
  MFC r290177:
  
  Integrate contrib/netbsd-tests/lib/libc/rpc into the FreeBSD test suite
  as lib/libc/rpc
  
  This testcase requires rpcbind be up in running; otherwise the testcases
  will time out and be skipped
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  stable/10/etc/mtree/BSD.tests.dist
  stable/10/lib/libc/tests/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/mtree/BSD.tests.dist
==
--- stable/10/etc/mtree/BSD.tests.dist  Mon Nov  9 07:36:55 2015
(r290583)
+++ stable/10/etc/mtree/BSD.tests.dist  Mon Nov  9 07:41:28 2015
(r290584)
@@ -109,6 +109,8 @@
 data
 ..
 ..
+rpc
+..
 ssp
 ..
 stdio

Modified: stable/10/lib/libc/tests/Makefile
==
--- stable/10/lib/libc/tests/Makefile   Mon Nov  9 07:36:55 2015
(r290583)
+++ stable/10/lib/libc/tests/Makefile   Mon Nov  9 07:41:28 2015
(r290584)
@@ -13,6 +13,7 @@ TESTS_SUBDIRS+=   hash
 TESTS_SUBDIRS+=inet
 TESTS_SUBDIRS+=net
 TESTS_SUBDIRS+=regex
+TESTS_SUBDIRS+=rpc
 TESTS_SUBDIRS+=stdio
 TESTS_SUBDIRS+=stdlib
 TESTS_SUBDIRS+=string
___
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: r290586 - in stable/10: etc/mtree usr.sbin/makefs usr.sbin/makefs/tests

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Mon Nov  9 07:56:06 2015
New Revision: 290586
URL: https://svnweb.freebsd.org/changeset/base/290586

Log:
  MFC r289739,r289743,r289897,r289901:
  
  r289739:
  
  Correctly reintroduce the rudimentary smoke tests I botched up
  in r289684
  
  Sponsored by: EMC / Isilon Storage Division
  
  r289743:
  
  Revise "create_test_inputs" to simplify the file structure as
  these testcases don't need to be nested as much as bin/ls/ls_tests.sh
  do when verifying ls -a, ls -A, etc. This allows the tests to make
  all paths relative to the top of the temporary directory instead of
  always tacking on $ATF_TMPDIR, thus complicating things unnecessarily
  
  Create non-empty files in create_test_inputs as well now, similar to
  create_test_inputs2 in bin/ls/ls_tests.sh
  
  Compare the input files to the output file contents using diff where
  possible:
  - Skip over the fifo comparison for now because it always fails
  - Skip over the symlink comparison on cd9660 because it always fails
today
  
  Sponsored by: EMC / Isilon Storage Division
  
  r289897:
  
  Add more cd9660/FFS makefs testcases
  
  General changes:
  - Parameterize out the mount command.
  - Use mtree to verify the contents of an image (check_image_contents) instead
of using diff (diff verifies content, but not file metadata).
  - Move common logic out to functions (common_cleanup, mount_image,
check_image_contents)
  - Add stub testcases for makefs -D (crashes with SIGBUS, similar to bug # 
192839)
  - Add a note about the ISO-9660 and rockridge specs
  - Add testcases that exercise:
  -- Creating disk images from an mtree and multiple directories.
  -- -F flag use (not really an extensive testcase right now)
  
  cd9660-specific test changes:
  
  - Remove an XXX comment about symlinks; I forgot that non-rockridge images 
turn
symlinks into hardlinks.
  - Add testcases that exercise:
  -- -o allow-deep-trees
  -- -o allow-max-name stub testcase (doesn't seem to be implemented in makefs)
  -- -o preparer (existence in image; not conformance to spec)
  -- -o publisher (existence in image; not conformance to spec)
  -- -o rockridge (basic)
  
  Sponsored by: EMC / Isilon Storage Division
  
  r289901:
  
  Remove an ls -l I was using for debugging
  
  Sponsored by: EMC / Isilon Storage Division

Added:
  stable/10/usr.sbin/makefs/tests/
 - copied from r289739, head/usr.sbin/makefs/tests/
Modified:
  stable/10/etc/mtree/BSD.tests.dist
  stable/10/usr.sbin/makefs/Makefile
  stable/10/usr.sbin/makefs/tests/Makefile
  stable/10/usr.sbin/makefs/tests/makefs_cd9660_tests.sh
  stable/10/usr.sbin/makefs/tests/makefs_ffs_tests.sh
  stable/10/usr.sbin/makefs/tests/makefs_tests_common.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/mtree/BSD.tests.dist
==
--- stable/10/etc/mtree/BSD.tests.dist  Mon Nov  9 07:49:39 2015
(r290585)
+++ stable/10/etc/mtree/BSD.tests.dist  Mon Nov  9 07:56:06 2015
(r290586)
@@ -402,6 +402,8 @@
 ..
 fstyp
 ..
+makefs
+..
 newsyslog
 ..
 nmtree

Modified: stable/10/usr.sbin/makefs/Makefile
==
--- stable/10/usr.sbin/makefs/Makefile  Mon Nov  9 07:49:39 2015
(r290585)
+++ stable/10/usr.sbin/makefs/Makefile  Mon Nov  9 07:56:06 2015
(r290586)
@@ -1,5 +1,7 @@
 #  $FreeBSD$
 
+.include 
+
 PROG=  makefs
 
 CFLAGS+=-I${.CURDIR}
@@ -38,4 +40,8 @@ LDADD+=   ${LIBNETBSD}
 DPADD+=  ${LIBSBUF} ${LIBUTIL}
 LDADD+=  -lsbuf -lutil
 
+.if ${MK_TESTS} != "no"
+SUBDIR+=   tests
+.endif
+
 .include 

Modified: stable/10/usr.sbin/makefs/tests/Makefile
==
--- head/usr.sbin/makefs/tests/Makefile Thu Oct 22 05:32:45 2015
(r289739)
+++ stable/10/usr.sbin/makefs/tests/MakefileMon Nov  9 07:56:06 2015
(r290586)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+TESTSDIR=  ${TESTSBASE}/usr.sbin/makefs
+
 ATF_TESTS_SH+= makefs_cd9660_tests
 ATF_TESTS_SH+= makefs_ffs_tests
 

Modified: stable/10/usr.sbin/makefs/tests/makefs_cd9660_tests.sh
==
--- head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh   Thu Oct 22 05:32:45 
2015(r289739)
+++ stable/10/usr.sbin/makefs/tests/makefs_cd9660_tests.sh  Mon Nov  9 
07:56:06 2015(r290586)
@@ -27,36 +27,262 @@
 # $FreeBSD$
 #
 
-. "$(dirname "$0")/makefs_tests_common.sh"
+# A note on specs:
+# - A copy of the ISO-9660 spec can be found here:
+#   http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-119.pdf
+# - Any references to `rockridge` are referring to the `Rock Ridge` extensions
+#   of the ISO-9660 spec. A copy of the draft `IEEE-P1282` spec can be found
+#   here:
+#   

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

2015-11-08 Thread Garrett Cooper
Author: ngie
Date: Sun Nov  8 08:27:51 2015
New Revision: 290540
URL: https://svnweb.freebsd.org/changeset/base/290540

Log:
  printfloat_test and scanfloat_test need symbols from msun; these are 
automatically
  provided on amd64, but not i386. Add libm to DPADD/LDADD to unbreak the i386
  tinderbox
  
  Pointyhat to: ngie
  MFC after: 1 week
  X-MFC with: r290538
  Sponsored by: EMC / Isilon Storage Division

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

Modified: head/lib/libc/tests/stdio/Makefile
==
--- head/lib/libc/tests/stdio/Makefile  Sun Nov  8 07:53:31 2015
(r290539)
+++ head/lib/libc/tests/stdio/Makefile  Sun Nov  8 08:27:51 2015
(r290540)
@@ -26,6 +26,12 @@ NETBSD_ATF_TESTS_C+= popen_test
 NETBSD_ATF_TESTS_C+=   printf_test
 NETBSD_ATF_TESTS_C+=   scanf_test
 
+DPADD.printfloat_test+=${LIBM}
+LDADD.printfloat_test+=-lm
+
+DPADD.scanfloat_test+= ${LIBM}
+LDADD.scanfloat_test+= -lm
+
 .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: r290541 - in head/sys/arm: arm include

2015-11-08 Thread Svatopluk Kraus
Author: skra
Date: Sun Nov  8 08:31:34 2015
New Revision: 290541
URL: https://svnweb.freebsd.org/changeset/base/290541

Log:
  Make usermode variable the bool type. It's already used that way.
  
  Suggested by: kib
  Approved by:  kib (mentor)

Modified:
  head/sys/arm/arm/pmap-v6-new.c
  head/sys/arm/arm/trap-v6.c
  head/sys/arm/include/pmap-v6.h

Modified: head/sys/arm/arm/pmap-v6-new.c
==
--- head/sys/arm/arm/pmap-v6-new.c  Sun Nov  8 08:27:51 2015
(r290540)
+++ head/sys/arm/arm/pmap-v6-new.c  Sun Nov  8 08:31:34 2015
(r290541)
@@ -6133,7 +6133,7 @@ CTASSERT(powerof2(PT2MAP_SIZE));
  *  Handle access and R/W emulation faults.
  */
 int
-pmap_fault(pmap_t pmap, vm_offset_t far, uint32_t fsr, int idx, int usermode)
+pmap_fault(pmap_t pmap, vm_offset_t far, uint32_t fsr, int idx, bool usermode)
 {
pt1_entry_t *pte1p, pte1;
pt2_entry_t *pte2p, pte2;

Modified: head/sys/arm/arm/trap-v6.c
==
--- head/sys/arm/arm/trap-v6.c  Sun Nov  8 08:27:51 2015(r290540)
+++ head/sys/arm/arm/trap-v6.c  Sun Nov  8 08:31:34 2015(r290541)
@@ -211,7 +211,7 @@ call_trapsignal(struct thread *td, int s
  * FAULT_IS_NOT_MINE value, then the abort is fatal.
  */
 static __inline void
-abort_imprecise(struct trapframe *tf, u_int fsr, u_int prefetch, u_int 
usermode)
+abort_imprecise(struct trapframe *tf, u_int fsr, u_int prefetch, bool usermode)
 {
 
/*
@@ -243,7 +243,7 @@ out:
  *
  */
 static __inline void
-abort_debug(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode,
+abort_debug(struct trapframe *tf, u_int fsr, u_int prefetch, bool usermode,
 u_int far)
 {
 
@@ -277,7 +277,7 @@ abort_handler(struct trapframe *tf, int 
 {
struct thread *td;
vm_offset_t far, va;
-   int idx, usermode;
+   int idx, rv;
uint32_t fsr;
struct ksig ksig;
struct proc *p;
@@ -285,7 +285,7 @@ abort_handler(struct trapframe *tf, int 
struct vm_map *map;
struct vmspace *vm;
vm_prot_t ftype;
-   int rv;
+   bool usermode;
 #ifdef INVARIANTS
void *onfault;
 #endif
@@ -556,7 +556,7 @@ static int
 abort_fatal(struct trapframe *tf, u_int idx, u_int fsr, u_int far,
 u_int prefetch, struct thread *td, struct ksig *ksig)
 {
-   u_int usermode;
+   bool usermode;
const char *mode;
const char *rw_mode;
 
@@ -617,7 +617,7 @@ static int
 abort_align(struct trapframe *tf, u_int idx, u_int fsr, u_int far,
 u_int prefetch, struct thread *td, struct ksig *ksig)
 {
-   u_int usermode;
+   bool usermode;
 
usermode = TRAPF_USERMODE(tf);
if (!usermode) {

Modified: head/sys/arm/include/pmap-v6.h
==
--- head/sys/arm/include/pmap-v6.h  Sun Nov  8 08:27:51 2015
(r290540)
+++ head/sys/arm/include/pmap-v6.h  Sun Nov  8 08:31:34 2015
(r290541)
@@ -201,7 +201,7 @@ void pmap_tlb_flush_ng(pmap_t );
 void pmap_dcache_wb_range(vm_paddr_t , vm_size_t , vm_memattr_t );
 
 vm_paddr_t pmap_kextract(vm_offset_t );
-int pmap_fault(pmap_t , vm_offset_t , uint32_t , int , int );
+int pmap_fault(pmap_t , vm_offset_t , uint32_t , int , bool);
 #definevtophys(va) pmap_kextract((vm_offset_t)(va))
 
 void pmap_set_tex(void);
___
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"