Re: svn commit: r226454 - head/sys/netinet
On 17.10.2011 02:16, Bjoern A. Zeeb wrote: On 17. Oct 2011, at 00:05 , Bjoern A. Zeeb wrote: Author: bz Date: Mon Oct 17 00:05:31 2011 New Revision: 226454 URL: http://svn.freebsd.org/changeset/base/226454 Log: Add syntactic sugar missed in r226437 and then not added either when moving things around in r226448 but desperately needed to always make things compile successfully. GENRIC and LINT did not fail failed on it as it expanded to: int tcp_recvspace = 1024*64 followed by: #define SYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) => #define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_ASSERT_TYPE(INT, ptr, parent, name); \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_INT | CTLFLAG_MPSAFE | (access),\ ptr, val, sysctl_handle_int, "I", descr) and the SYSCTL_ASSERT_TYPE() expanding to nothing in #define SYSCTL_ASSERT_TYPE(type, ptr, parent, name) leaving just the ';' around; so it ended up as: int tcp_recvspace = 1024*64 ; and an expanded SYSCTL_OID(...); Oops, sorry missing that one. And thanks for comitting the fix. -- Andre MFC after:1 week Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c == --- head/sys/netinet/tcp_input.cSun Oct 16 22:24:04 2011 (r226453) +++ head/sys/netinet/tcp_input.cMon Oct 17 00:05:31 2011 (r226454) @@ -183,7 +183,7 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(tcp_insecure_rst), 0, "Follow the old (insecure) criteria for accepting RST packets"); -VNET_DEFINE(int, tcp_recvspace) = 1024*64 +VNET_DEFINE(int, tcp_recvspace) = 1024*64; #define V_tcp_recvspace VNET(tcp_recvspace) SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, CTLFLAG_RW, &VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer size"); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226460 - head/lib/msun/man
Author: das Date: Mon Oct 17 06:10:32 2011 New Revision: 226460 URL: http://svn.freebsd.org/changeset/base/226460 Log: It's no longer accurate to say that math.h "constitute[s] the C math library," since complex.h, tgmath.h, and fenv.h are also part of the math library. Replace the outdated sentence with some references to the other parts. Modified: head/lib/msun/man/math.3 Modified: head/lib/msun/man/math.3 == --- head/lib/msun/man/math.3Mon Oct 17 05:42:53 2011(r226459) +++ head/lib/msun/man/math.3Mon Oct 17 06:10:32 2011(r226460) @@ -39,7 +39,21 @@ .Sh SYNOPSIS .In math.h .Sh DESCRIPTION -These functions constitute the C math library. +The math library includes the following components: +.Bl -column "" "polymorphic (type-generic) versions of functions" -compact -offset indent +.In math.h Ta basic routines and real-valued functions +.In complex.h Ta complex number support +.In tgmath.h Ta polymorphic (type-generic) versions of functions +.In fenv.h Ta routines to control rounding and exceptions +.El +The rest of this manual page describes the functions provided by +.In math.h . +Please consult +.Xr complex 3 , +.Xr tgmath 3 , +and +.Xr fenv 3 +for information on the other components. .Sh "LIST OF FUNCTIONS" Each of the following .Vt double @@ -200,6 +214,7 @@ so reproducible results cannot be guaran For most of these functions, however, incorrect rounding occurs rarely, and then only in very-close-to-halfway cases. .Sh SEE ALSO +.Xr complex 3 , .Xr fenv 3 , .Xr ieee 3 , .Xr tgmath 3 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226459 - head/sys/mips/mips
Author: jchandra Date: Mon Oct 17 05:42:53 2011 New Revision: 226459 URL: http://svn.freebsd.org/changeset/base/226459 Log: Fix for crash on MIPS /dev/mem read. Reading /dev/mem in 64 bit kernel crashes. This is because the page used to call uiomove_fromphys() from memrw() does not have md.pv_list initialized correctly. The fix is to call pmap_page_init() on the page to initialize it. Modified: head/sys/mips/mips/mem.c Modified: head/sys/mips/mips/mem.c == --- head/sys/mips/mips/mem.cMon Oct 17 05:41:03 2011(r226458) +++ head/sys/mips/mips/mem.cMon Oct 17 05:42:53 2011(r226459) @@ -87,6 +87,7 @@ memrw(struct cdev *dev, struct uio *uio, GIANT_REQUIRED; + pmap_page_init(&m); while (uio->uio_resid > 0 && !error) { iov = uio->uio_iov; if (iov->iov_len == 0) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226458 - in head: include lib/msun lib/msun/man lib/msun/src
Author: das Date: Mon Oct 17 05:41:03 2011 New Revision: 226458 URL: http://svn.freebsd.org/changeset/base/226458 Log: Add c{cos,sin,tan}{,h}{,f} functions. This is joint work with bde and kargl. Added: head/lib/msun/man/ccos.3 (contents, props changed) head/lib/msun/man/ccosh.3 (contents, props changed) head/lib/msun/src/s_ccosh.c (contents, props changed) head/lib/msun/src/s_ccoshf.c (contents, props changed) head/lib/msun/src/s_csinh.c (contents, props changed) head/lib/msun/src/s_csinhf.c (contents, props changed) head/lib/msun/src/s_ctanh.c (contents, props changed) head/lib/msun/src/s_ctanhf.c (contents, props changed) Modified: head/include/complex.h head/lib/msun/Makefile head/lib/msun/Symbol.map head/lib/msun/man/complex.3 head/lib/msun/man/cos.3 head/lib/msun/man/cosh.3 head/lib/msun/man/sin.3 head/lib/msun/man/sinh.3 head/lib/msun/man/tan.3 head/lib/msun/man/tanh.3 Modified: head/include/complex.h == --- head/include/complex.h Mon Oct 17 05:38:22 2011(r226457) +++ head/include/complex.h Mon Oct 17 05:41:03 2011(r226458) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2001-2008 The FreeBSD Project. + * Copyright (c) 2001-2011 The FreeBSD Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,6 +49,10 @@ long double cabsl(long double complex); double carg(double complex); float cargf(float complex); long doublecargl(long double complex); +double complex ccos(double complex); +float complex ccosf(float complex); +double complex ccosh(double complex); +float complex ccoshf(float complex); double complex cexp(double complex); float complex cexpf(float complex); double cimag(double complex) __pure2; @@ -65,10 +69,18 @@ long double complex double creal(double complex) __pure2; float crealf(float complex) __pure2; long doublecreall(long double complex) __pure2; +double complex csin(double complex); +float complex csinf(float complex); +double complex csinh(double complex); +float complex csinhf(float complex); double complex csqrt(double complex); float complex csqrtf(float complex); long double complex csqrtl(long double complex); +double complex ctan(double complex); +float complex ctanf(float complex); +double complex ctanh(double complex); +float complex ctanhf(float complex); __END_DECLS Modified: head/lib/msun/Makefile == --- head/lib/msun/Makefile Mon Oct 17 05:38:22 2011(r226457) +++ head/lib/msun/Makefile Mon Oct 17 05:41:03 2011(r226458) @@ -101,9 +101,11 @@ COMMON_SRCS+= e_acosl.c e_asinl.c e_atan .endif # C99 complex functions -COMMON_SRCS+= s_cexp.c s_cexpf.c s_cimag.c s_cimagf.c s_cimagl.c \ +COMMON_SRCS+= s_ccosh.c s_ccoshf.c s_cexp.c s_cexpf.c \ + s_cimag.c s_cimagf.c s_cimagl.c \ s_conj.c s_conjf.c s_conjl.c \ - s_cproj.c s_cprojf.c s_creal.c s_crealf.c s_creall.c + s_cproj.c s_cprojf.c s_creal.c s_crealf.c s_creall.c \ + s_csinh.c s_csinhf.c s_ctanh.c s_ctanhf.c # FreeBSD's C library supplies these functions: #COMMON_SRCS+= s_fabs.c s_frexp.c s_isnan.c s_ldexp.c s_modf.c @@ -125,7 +127,8 @@ SRCS= ${COMMON_SRCS} ${ARCH_SRCS} INCS= fenv.h math.h -MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 cexp.3 \ +MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 \ + ceil.3 ccos.3 ccosh.3 cexp.3 \ cimag.3 copysign.3 cos.3 cosh.3 csqrt.3 erf.3 exp.3 fabs.3 fdim.3 \ feclearexcept.3 feenableexcept.3 fegetenv.3 \ fegetround.3 fenv.3 floor.3 \ @@ -143,6 +146,9 @@ MLINKS+=atan.3 atanf.3 atan.3 atanl.3 MLINKS+=atanh.3 atanhf.3 MLINKS+=atan2.3 atan2f.3 atan2.3 atan2l.3 \ atan2.3 carg.3 atan2.3 cargf.3 atan2.3 cargl.3 +MLINKS+=ccos.3 ccosf.3 ccos.3 csin.3 ccos.3 csinf.3 ccos.3 ctan.3 ccos.3 ctanf.3 +MLINKS+=ccosh.3 ccoshf.3 ccosh.3 csinh.3 ccosh.3 csinhf.3 \ + ccosh.3 ctanh.3 ccosh.3 ctanhf.3 MLINKS+=ceil.3 ceilf.3 ceil.3 ceill.3 MLINKS+=cexp.3 cexpf.3 MLINKS+=cimag.3 cimagf.3 cimag.3 cimagl.3 \ Modified: head/lib/msun/Symbol.map == --- head/lib/msun/Symbol.mapMon Oct 17 05:38:22 2011(r226457) +++ head/lib/msun/Symbol.mapMon Oct 17 05:41:03 2011(r226458) @@ -237,4 +237,16 @@ FBSD_1.3 { fegetround; fesetround; fesetenv; + csin; + csinf; + csinh; + csinhf; + ccos; + ccosf; + ccosh; + ccoshf; + ctan; + ctanf; + ctanh; + ctanhf; }; Added: head/lib/msun/man/ccos.3 == --- /dev/null 00:00:00 1970 (empty,
Re: svn commit: r226046 - in head: crypto/openssh crypto/openssh/openbsd-compat secure/usr.sbin/sshd
On 10/12/2011 02:09, Bjoern A. Zeeb wrote: > Mergemaster brought up this change: Yay for showing changes. :) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226454 - head/sys/netinet
On 17. Oct 2011, at 00:05 , Bjoern A. Zeeb wrote: > Author: bz > Date: Mon Oct 17 00:05:31 2011 > New Revision: 226454 > URL: http://svn.freebsd.org/changeset/base/226454 > > Log: > Add syntactic sugar missed in r226437 and then not added either when moving > things around in r226448 but desperately needed to always make things > compile successfully. > GENRIC and LINT did not fail failed on it as it expanded to: int tcp_recvspace = 1024*64 followed by: #define SYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) => #define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_ASSERT_TYPE(INT, ptr, parent, name); \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_INT | CTLFLAG_MPSAFE | (access),\ ptr, val, sysctl_handle_int, "I", descr) and the SYSCTL_ASSERT_TYPE() expanding to nothing in #define SYSCTL_ASSERT_TYPE(type, ptr, parent, name) leaving just the ';' around; so it ended up as: int tcp_recvspace = 1024*64 ; and an expanded SYSCTL_OID(...); > MFC after: 1 week > > Modified: > head/sys/netinet/tcp_input.c > > Modified: head/sys/netinet/tcp_input.c > == > --- head/sys/netinet/tcp_input.c Sun Oct 16 22:24:04 2011 > (r226453) > +++ head/sys/netinet/tcp_input.c Mon Oct 17 00:05:31 2011 > (r226454) > @@ -183,7 +183,7 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, > &VNET_NAME(tcp_insecure_rst), 0, > "Follow the old (insecure) criteria for accepting RST packets"); > > -VNET_DEFINE(int, tcp_recvspace) = 1024*64 > +VNET_DEFINE(int, tcp_recvspace) = 1024*64; > #define V_tcp_recvspace VNET(tcp_recvspace) > SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, CTLFLAG_RW, > &VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer size"); -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226454 - head/sys/netinet
Author: bz Date: Mon Oct 17 00:05:31 2011 New Revision: 226454 URL: http://svn.freebsd.org/changeset/base/226454 Log: Add syntactic sugar missed in r226437 and then not added either when moving things around in r226448 but desperately needed to always make things compile successfully. MFC after:1 week Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c == --- head/sys/netinet/tcp_input.cSun Oct 16 22:24:04 2011 (r226453) +++ head/sys/netinet/tcp_input.cMon Oct 17 00:05:31 2011 (r226454) @@ -183,7 +183,7 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(tcp_insecure_rst), 0, "Follow the old (insecure) criteria for accepting RST packets"); -VNET_DEFINE(int, tcp_recvspace) = 1024*64 +VNET_DEFINE(int, tcp_recvspace) = 1024*64; #defineV_tcp_recvspace VNET(tcp_recvspace) SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, CTLFLAG_RW, &VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer size"); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226433 - head/sys/netinet
On Sun, Oct 16, 2011 at 01:54:46PM +, Andre Oppermann wrote: > Author: andre > Date: Sun Oct 16 13:54:46 2011 > New Revision: 226433 > URL: http://svn.freebsd.org/changeset/base/226433 > > Log: > Update the comment and description of tcp_sendspace and tcp_recvspace > to better reflect their purpose. > MFC after: 1 week Please don't forget to update tcp(4), it still tells about "maximum". -- http://ache.vniz.net/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226453 - head/sys/netinet6
Author: qingli Date: Sun Oct 16 22:24:04 2011 New Revision: 226453 URL: http://svn.freebsd.org/changeset/base/226453 Log: The code change made in r226040 was incomplete and resulted in routes such as fe80::1%lo0 no being installed. This patch completes the original intended fix. Reviewed by: hrs, bz MFC after:3 days Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Sun Oct 16 22:18:08 2011(r226452) +++ head/sys/netinet6/in6.c Sun Oct 16 22:24:04 2011(r226453) @@ -1860,14 +1860,17 @@ in6_ifinit(struct ifnet *ifp, struct in6 if (error != 0) return (error); ia->ia_flags |= IFA_ROUTE; + /* +* Handle the case for ::1 . +*/ + if (ifp->if_flags & IFF_LOOPBACK) + ia->ia_flags |= IFA_RTSELF; } /* * add a loopback route to self */ - if (!(ia->ia_flags & IFA_RTSELF) - && (V_nd6_useloopback - && !(ifp->if_flags & IFF_LOOPBACK))) { + if (!(ia->ia_flags & IFA_RTSELF) && V_nd6_useloopback) { error = ifa_add_loopback_route((struct ifaddr *)ia, (struct sockaddr *)&ia->ia_addr); if (error == 0) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226452 - head/sys/cddl/dev/dtrace
Author: marcel Date: Sun Oct 16 22:18:08 2011 New Revision: 226452 URL: http://svn.freebsd.org/changeset/base/226452 Log: Define dtrace_cmpset_long in terms of atomic_cmpset_long and not by virtue of inline assembly. Now this file compiles on all supported architectures. Modified: head/sys/cddl/dev/dtrace/dtrace_debug.c Modified: head/sys/cddl/dev/dtrace/dtrace_debug.c == --- head/sys/cddl/dev/dtrace/dtrace_debug.c Sun Oct 16 22:15:13 2011 (r226451) +++ head/sys/cddl/dev/dtrace/dtrace_debug.c Sun Oct 16 22:18:08 2011 (r226452) @@ -31,49 +31,9 @@ #ifdef DEBUG -#if defined(__amd64__) -static __inline int -dtrace_cmpset_long(volatile u_long *dst, u_long exp, u_long src) -{ - u_char res; - - __asm __volatile( - "lock ; " - " cmpxchgq %2,%1 ;" - " sete%0 ;" - "1: " - "# dtrace_cmpset_long" - : "=a" (res), /* 0 */ - "=m" (*dst) /* 1 */ - : "r" (src),/* 2 */ - "a" (exp),/* 3 */ - "m" (*dst)/* 4 */ - : "memory"); - - return (res); -} -#elif defined(__i386__) -static __inline int -dtrace_cmpset_long(volatile u_long *dst, u_long exp, u_long src) -{ - u_char res; - - __asm __volatile( - "lock ; " - " cmpxchgl %2,%1 ;" - " sete%0 ;" - "1: " - "# dtrace_cmpset_long" - : "=a" (res), /* 0 */ - "=m" (*dst) /* 1 */ - : "r" (src),/* 2 */ - "a" (exp),/* 3 */ - "m" (*dst)/* 4 */ - : "memory"); +#include - return (res); -} -#endif +#definedtrace_cmpset_long atomic_cmpset_long #define DTRACE_DEBUG_BUFR_SIZE (32 * 1024) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226451 - head/sys/netinet6
Author: qingli Date: Sun Oct 16 22:15:13 2011 New Revision: 226451 URL: http://svn.freebsd.org/changeset/base/226451 Log: The IPv6 code was influx at the time of r196865 due to the L2/L3 separation rewrite changes. r196865 was committed to fix a scope violation problem in the following test scenario: box-1# ifconfig em0 inet6 2001:db8:1:: prefixlen 64 anycast box-1# ifconfig em1 inet6 2001:db8:2::1 prefixlen 64 box-2# ifconfig re0 inet6 2001:db8:1::6 prefixlen 64 em0 and re0 are on the same link. box-2# ping6 2001:db8:1:: PING6(56=40+8+8 bytes) 2001:db8:1::6 --> 2001:db8:1:: the ICMPv6 response should have a source address of em1, which is 2001:db8:2::1, not the link-local address of em0. That code is no longer necessary and breaks the IPv6-Ready logo testing, so revert it now. Reviewed by: hrs MFC after:3 days Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c == --- head/sys/netinet6/icmp6.c Sun Oct 16 21:30:15 2011(r226450) +++ head/sys/netinet6/icmp6.c Sun Oct 16 22:15:13 2011(r226451) @@ -2244,10 +2244,6 @@ icmp6_reflect(struct mbuf *m, size_t off } } - if ((srcp != NULL) && - (in6_addrscope(srcp) != in6_addrscope(&ip6->ip6_src))) - srcp = NULL; - if (srcp == NULL) { int e; struct sockaddr_in6 sin6; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226450 - head/lib/libutil
Author: pjd Date: Sun Oct 16 21:30:15 2011 New Revision: 226450 URL: http://svn.freebsd.org/changeset/base/226450 Log: In pidfile_open(), if the pidfile is locked, but empty (PID is not stored yet) and the caller requested other process' PID by passing non-NULL pidptr argument, we will wait at most 100ms for the PID to show up in the file and if it won't, we will store -1 in *pidptr. From now on, pidfile_open() function never sets errno to EAGAIN on failure. In collaboration with:des MFC after:1 week Modified: head/lib/libutil/pidfile.3 head/lib/libutil/pidfile.c Modified: head/lib/libutil/pidfile.3 == --- head/lib/libutil/pidfile.3 Sun Oct 16 21:01:42 2011(r226449) +++ head/lib/libutil/pidfile.3 Sun Oct 16 21:30:15 2011(r226450) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2008 +.Dd October 16, 2011 .Dt PIDFILE 3 .Os .Sh NAME @@ -59,11 +59,14 @@ The function opens (or creates) a file specified by the .Fa path argument and locks it. -If a file can not be locked, a PID of an already running daemon is returned in -the +If .Fa pidptr -argument (if it is not -.Dv NULL ) . +argument is not +.Dv NULL +and file can not be locked, the function will use it to store a PID of an +already running daemon or +.Li -1 +in case daemon did not write its PID yet. The function does not write process' PID into the file here, so it can be used before .Fn fork Ns ing @@ -162,16 +165,18 @@ function will fail if: .It Bq Er EEXIST Some process already holds the lock on the given pidfile, meaning that a daemon is already running. +If +.Fa pidptr +argument is not +.Dv NULL +the function will use it to store a PID of an already running daemon or +.Li -1 +in case daemon did not write its PID yet. .It Bq Er ENAMETOOLONG Specified pidfile's name is too long. .It Bq Er EINVAL Some process already holds the lock on the given pidfile, but PID read from there is invalid. -.It Bq Er EAGAIN -Some process already holds the lock on the given pidfile, but the file -is truncated. -Most likely, the existing daemon is writing new PID into -the file. .El .Pp The Modified: head/lib/libutil/pidfile.c == --- head/lib/libutil/pidfile.c Sun Oct 16 21:01:42 2011(r226449) +++ head/lib/libutil/pidfile.c Sun Oct 16 21:30:15 2011(r226450) @@ -119,20 +119,20 @@ pidfile_open(const char *path, mode_t mo fd = flopen(pfh->pf_path, O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK, mode); if (fd == -1) { - count = 0; - rqtp.tv_sec = 0; - rqtp.tv_nsec = 500; if (errno == EWOULDBLOCK && pidptr != NULL) { - again: - errno = pidfile_read(pfh->pf_path, pidptr); - if (errno == 0) - errno = EEXIST; - else if (errno == EAGAIN) { - if (++count <= 3) { - nanosleep(&rqtp, 0); - goto again; - } + count = 20; + rqtp.tv_sec = 0; + rqtp.tv_nsec = 500; + for (;;) { + errno = pidfile_read(pfh->pf_path, pidptr); + if (errno != EAGAIN || --count == 0) + break; + nanosleep(&rqtp, 0); } + if (errno == EAGAIN) + *pidptr = -1; + if (errno == 0 || errno == EAGAIN) + errno = EEXIST; } free(pfh); return (NULL); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226449 - in head: etc/devd share/man/man4/man4.powerpc sys/conf sys/dev/adb
Author: nwhitehorn Date: Sun Oct 16 21:01:42 2011 New Revision: 226449 URL: http://svn.freebsd.org/changeset/base/226449 Log: Add support for special keys (volume/brightness/eject) on Apple laptops with ADB keyboards. Submitted by: Justin Hibbits MFC after:9.0-RELEASE Added: head/etc/devd/apple.conf (contents, props changed) head/share/man/man4/man4.powerpc/abtn.4 (contents, props changed) head/sys/dev/adb/adb_buttons.c (contents, props changed) Modified: head/etc/devd/Makefile head/share/man/man4/man4.powerpc/Makefile head/share/man/man4/man4.powerpc/akbd.4 head/sys/conf/files.powerpc head/sys/dev/adb/adb_kbd.c Modified: head/etc/devd/Makefile == --- head/etc/devd/Makefile Sun Oct 16 20:18:39 2011(r226448) +++ head/etc/devd/Makefile Sun Oct 16 21:01:42 2011(r226449) @@ -1,6 +1,14 @@ # $FreeBSD$ -FILES= asus.conf uath.conf usb.conf +FILES= uath.conf usb.conf + +.if ${MACHINE} == "powerpc" +FILES+=apple.conf +.endif + +.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" +FILES+=asus.conf +.endif NO_OBJ= FILESDIR= /etc/devd Added: head/etc/devd/apple.conf == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/devd/apple.confSun Oct 16 21:01:42 2011(r226449) @@ -0,0 +1,46 @@ +# $FreeBSD$ +# +# PowerPC Apple specific devd events + +# Keyboard power key +notify 0 { + match "system" "PMU"; + match "subsystem" "Button"; + match "notify" "0x0"; + action "shutdown -p now"; +}; + + +# The next blocks enable volume hotkeys that can be found on Apple laptops +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type""mute"; + action "mixer 0"; +}; + +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type""volume"; + match "notify" "down"; + action "mixer vol -10"; +}; + +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type""volume"; + match "notify" "up"; + action "mixer vol +10"; +}; + +# Eject key +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type""eject"; + action "camcontrol eject cd0"; +}; + + Modified: head/share/man/man4/man4.powerpc/Makefile == --- head/share/man/man4/man4.powerpc/Makefile Sun Oct 16 20:18:39 2011 (r226448) +++ head/share/man/man4/man4.powerpc/Makefile Sun Oct 16 21:01:42 2011 (r226449) @@ -2,6 +2,7 @@ MAN= adb.4 \ akbd.4 \ + abtn.4 \ ams.4 \ bm.4 \ cuda.4 \ Added: head/share/man/man4/man4.powerpc/abtn.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/man4.powerpc/abtn.4 Sun Oct 16 21:01:42 2011 (r226449) @@ -0,0 +1,115 @@ +.\"- +.\" Copyright (c) 2011 Justin Hibbits +.\" Copyright (c) 2009 Nathan Whitehorn +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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$ +.\" +.Dd October 16, 2011 +.Dt ABTN 4 +.Os +.Sh NAME +.Nm abtn +.Nd ADB Keyboard Special Keys Driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the
svn commit: r226448 - head/sys/netinet
Author: andre Date: Sun Oct 16 20:18:39 2011 New Revision: 226448 URL: http://svn.freebsd.org/changeset/base/226448 Log: Move the tcp_sendspace and tcp_recvspace sysctl's from the middle of tcp_usrreq.c to the top of tcp_output.c and tcp_input.c respectively next to the socket buffer autosizing controls. MFC after:1 week Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_input.c == --- head/sys/netinet/tcp_input.cSun Oct 16 20:06:44 2011 (r226447) +++ head/sys/netinet/tcp_input.cSun Oct 16 20:18:39 2011 (r226448) @@ -183,6 +183,11 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(tcp_insecure_rst), 0, "Follow the old (insecure) criteria for accepting RST packets"); +VNET_DEFINE(int, tcp_recvspace) = 1024*64 +#defineV_tcp_recvspace VNET(tcp_recvspace) +SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, CTLFLAG_RW, +&VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer size"); + VNET_DEFINE(int, tcp_do_autorcvbuf) = 1; #defineV_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, recvbuf_auto, CTLFLAG_RW, Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Sun Oct 16 20:06:44 2011 (r226447) +++ head/sys/netinet/tcp_output.c Sun Oct 16 20:18:39 2011 (r226448) @@ -95,6 +95,11 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(tcp_do_tso), 0, "Enable TCP Segmentation Offload"); +VNET_DEFINE(int, tcp_sendspace) = 1024*32; +#defineV_tcp_sendspace VNET(tcp_sendspace) +SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_SENDSPACE, tcp_sendspace, CTLFLAG_RW, + &VNET_NAME(tcp_sendspace), 0, "Initial send socket buffer size"); + VNET_DEFINE(int, tcp_do_autosndbuf) = 1; #defineV_tcp_do_autosndbuf VNET(tcp_do_autosndbuf) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, sendbuf_auto, CTLFLAG_RW, Modified: head/sys/netinet/tcp_usrreq.c == --- head/sys/netinet/tcp_usrreq.c Sun Oct 16 20:06:44 2011 (r226447) +++ head/sys/netinet/tcp_usrreq.c Sun Oct 16 20:18:39 2011 (r226448) @@ -1498,20 +1498,6 @@ tcp_ctloutput(struct socket *so, struct #undef INP_WLOCK_RECHECK /* - * Set the initial send and receive socket buffer sizes for - * newly created TCP sockets. - */ -VNET_DEFINE(int, tcp_sendspace) = 1024*32; -#defineV_tcp_sendspace VNET(tcp_sendspace) -SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_SENDSPACE, tcp_sendspace, CTLFLAG_RW, -&VNET_NAME(tcp_sendspace), 0, "Initial send socket buffer size"); - -VNET_DEFINE(int, tcp_recvspace) = 1024*64 -#defineV_tcp_recvspace VNET(tcp_recvspace) -SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, CTLFLAG_RW, -&VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer size"); - -/* * Attach TCP protocol to socket, allocating * internet protocol control block, tcp control block, * bufer space, and entering LISTEN state if to accept connections. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226447 - head/sys/netinet
Author: andre Date: Sun Oct 16 20:06:44 2011 New Revision: 226447 URL: http://svn.freebsd.org/changeset/base/226447 Log: Remove the ss_fltsz and ss_fltsz_local sysctl's which have long been superseded by the RFC3390 initial CWND sizing. Also remove the remnants of TCP_METRICS_CWND which used the TCP hostcache to set the initial CWND in a non-RFC compliant way. MFC after:1 week Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_input.c == --- head/sys/netinet/tcp_input.cSun Oct 16 19:46:52 2011 (r226446) +++ head/sys/netinet/tcp_input.cSun Oct 16 20:06:44 2011 (r226447) @@ -301,9 +301,6 @@ cc_conn_init(struct tcpcb *tp) struct hc_metrics_lite metrics; struct inpcb *inp = tp->t_inpcb; int rtt; -#ifdef INET6 - int isipv6 = ((inp->inp_vflag & INP_IPV6) != 0) ? 1 : 0; -#endif INP_WLOCK_ASSERT(tp->t_inpcb); @@ -337,49 +334,16 @@ cc_conn_init(struct tcpcb *tp) } /* -* Set the slow-start flight size depending on whether this -* is a local network or not. -* -* Extend this so we cache the cwnd too and retrieve it here. -* Make cwnd even bigger than RFC3390 suggests but only if we -* have previous experience with the remote host. Be careful -* not make cwnd bigger than remote receive window or our own -* send socket buffer. Maybe put some additional upper bound -* on the retrieved cwnd. Should do incremental updates to -* hostcache when cwnd collapses so next connection doesn't -* overloads the path again. -* -* XXXAO: Initializing the CWND from the hostcache is broken -* and in its current form not RFC conformant. It is disabled -* until fixed or removed entirely. +* Set the initial slow-start flight size. * * RFC3390 says only do this if SYN or SYN/ACK didn't got lost. -* We currently check only in syncache_socket for that. +* XXX: We currently check only in syncache_socket for that. */ -/* #define TCP_METRICS_CWND */ -#ifdef TCP_METRICS_CWND - if (metrics.rmx_cwnd) - tp->snd_cwnd = max(tp->t_maxseg, min(metrics.rmx_cwnd / 2, - min(tp->snd_wnd, so->so_snd.sb_hiwat))); - else -#endif if (V_tcp_do_rfc3390) tp->snd_cwnd = min(4 * tp->t_maxseg, max(2 * tp->t_maxseg, 4380)); -#ifdef INET6 - else if (isipv6 && in6_localaddr(&inp->in6p_faddr)) - tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local; -#endif -#if defined(INET) && defined(INET6) - else if (!isipv6 && in_localaddr(inp->inp_faddr)) - tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local; -#endif -#ifdef INET - else if (in_localaddr(inp->inp_faddr)) - tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local; -#endif else - tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz; + tp->snd_cwnd = tp->t_maxseg; if (CC_ALGO(tp)->conn_init != NULL) CC_ALGO(tp)->conn_init(tp->ccv); Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Sun Oct 16 19:46:52 2011 (r226446) +++ head/sys/netinet/tcp_output.c Sun Oct 16 20:06:44 2011 (r226447) @@ -89,16 +89,6 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(path_mtu_discovery), 1, "Enable Path MTU Discovery"); -VNET_DEFINE(int, ss_fltsz) = 1; -SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, slowstart_flightsize, CTLFLAG_RW, - &VNET_NAME(ss_fltsz), 1, - "Slow start flight size"); - -VNET_DEFINE(int, ss_fltsz_local) = 4; -SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, local_slowstart_flightsize, - CTLFLAG_RW, &VNET_NAME(ss_fltsz_local), 1, - "Slow start flight size for local networks"); - VNET_DEFINE(int, tcp_do_tso) = 1; #defineV_tcp_do_tsoVNET(tcp_do_tso) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, tso, CTLFLAG_RW, Modified: head/sys/netinet/tcp_var.h == --- head/sys/netinet/tcp_var.h Sun Oct 16 19:46:52 2011(r226446) +++ head/sys/netinet/tcp_var.h Sun Oct 16 20:06:44 2011(r226447) @@ -609,8 +609,6 @@ VNET_DECLARE(int, tcp_do_rfc3390); VNET_DECLARE(int, tcp_sendspace); VNET_DECLARE(int, tcp_recvspace); VNET_DECLARE(int, path_mtu_discovery); -VNET_DECLARE(int, ss_fltsz); -VNET_DECLARE(int, ss_fltsz_local); VNET_DECLARE(int, tcp_do_rfc3465); VNET_DECLARE(int, tcp_abc_l_var); #defineV_tcb VNET(tcb) @@ -623,8 +621,6 @@ VNET_DECLARE(int, tcp_abc_l_var); #defineV_tcp_sendspace VNET(tcp_sendspace) #d
svn commit: r226446 - head/sys/netinet6
Author: hrs Date: Sun Oct 16 19:46:52 2011 New Revision: 226446 URL: http://svn.freebsd.org/changeset/base/226446 Log: Fix a problem that an interface unexpectedly becomes IFF_UP by just doing "ifconfing inet6 -ifdisabled" when the interface has ND6_IFF_AUTO_LINKLOCAL flag and no link-local address. Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c == --- head/sys/netinet6/nd6.c Sun Oct 16 19:23:43 2011(r226445) +++ head/sys/netinet6/nd6.c Sun Oct 16 19:46:52 2011(r226446) @@ -1364,7 +1364,8 @@ nd6_ioctl(u_long cmd, caddr_t data, stru " duplicate.\n"); } else { ND_IFINFO(ifp)->flags &= ~ND6_IFF_IFDISABLED; - in6_if_up(ifp); + if (ifp->if_flags & IFF_UP) + in6_if_up(ifp); } } else if (!(ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) && (ND.flags & ND6_IFF_IFDISABLED)) { @@ -1382,35 +1383,37 @@ nd6_ioctl(u_long cmd, caddr_t data, stru IF_ADDR_UNLOCK(ifp); } - if (!(ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) && - (ND.flags & ND6_IFF_AUTO_LINKLOCAL)) { - /* auto_linklocal 0->1 transision */ - - /* If no link-local address on ifp, configure */ - ND_IFINFO(ifp)->flags |= ND6_IFF_AUTO_LINKLOCAL; - in6_ifattach(ifp, NULL); - } else if ((ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) && - !(ND.flags & ND6_IFF_IFDISABLED)) { - /* -* When the IF already has -* ND6_IFF_AUTO_LINKLOCAL and no link-local -* address is assigned, try to assign one. -*/ - int haslinklocal = 0; + if (ND.flags & ND6_IFF_AUTO_LINKLOCAL) { + if (!(ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL)) { + /* auto_linklocal 0->1 transision */ + + /* If no link-local address on ifp, configure */ + ND_IFINFO(ifp)->flags |= ND6_IFF_AUTO_LINKLOCAL; + in6_ifattach(ifp, NULL); + } else if (!(ND.flags & ND6_IFF_IFDISABLED) && + ifp->if_flags & IFF_UP) { + /* +* When the IF already has +* ND6_IFF_AUTO_LINKLOCAL, no link-local +* address is assigned, and IFF_UP, try to +* assign one. +*/ + int haslinklocal = 0; - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa->ifa_addr->sa_family != AF_INET6) - continue; - ia = (struct in6_ifaddr *)ifa; - if (IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia))) { - haslinklocal = 1; - break; + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + if (ifa->ifa_addr->sa_family != AF_INET6) + continue; + ia = (struct in6_ifaddr *)ifa; + if (IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia))) { + haslinklocal = 1; + break; + } } + IF_ADDR_UNLOCK(ifp); + if (!haslinklocal) + in6_ifattach(ifp, NULL); } - IF_ADDR_UNLOCK(ifp); - if (!haslinklocal) - in6_ifattach(ifp, NULL); } } ND_IFINFO(ifp)->flags = ND.flags; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226445 - head/usr.bin/look
Author: ed Date: Sun Oct 16 19:23:43 2011 New Revision: 226445 URL: http://svn.freebsd.org/changeset/base/226445 Log: Add missing #include. Note to myself: don't write patches while watching a movie. Modified: head/usr.bin/look/look.c Modified: head/usr.bin/look/look.c == --- head/usr.bin/look/look.cSun Oct 16 19:15:25 2011(r226444) +++ head/usr.bin/look/look.cSun Oct 16 19:23:43 2011(r226445) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226444 - head/usr.bin/look
Author: ed Date: Sun Oct 16 19:15:25 2011 New Revision: 226444 URL: http://svn.freebsd.org/changeset/base/226444 Log: Don't cast SIZE_T_MAX to off_t. I focused so much on the 32-bits case where we have to cast SIZE_T_MAX up in size, that I forgot about the 64-bits case, where off_t and size_t are equal in size. Simply cast both numbers to uintmax_t, as we can assume st_size is never negative. Reported by: cperciva Modified: head/usr.bin/look/look.c Modified: head/usr.bin/look/look.c == --- head/usr.bin/look/look.cSun Oct 16 17:59:28 2011(r226443) +++ head/usr.bin/look/look.cSun Oct 16 19:15:25 2011(r226444) @@ -134,7 +134,7 @@ main(int argc, char *argv[]) do { if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb)) err(2, "%s", file); - if (sb.st_size > (off_t)SIZE_T_MAX) + if ((uintmax_t)sb.st_size > (uintmax_t)SIZE_T_MAX) errx(2, "%s: %s", file, strerror(EFBIG)); if (sb.st_size == 0) { close(fd); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226345 - in head: etc/rc.d sbin/dhclient; Re: svn commit: r225849 - head/etc
On 13. Oct 2011, at 17:20 , Dag-Erling Smorgrav wrote: > Author: des > Date: Thu Oct 13 17:20:45 2011 > New Revision: 226345 > URL: http://svn.freebsd.org/changeset/base/226345 > > Log: > Make dhclient use a pid file. Modify the rc script accordingly; while > there, clean it up and add some error checks. > ... On 28. Sep 2011, at 19:01 , Xin LI wrote: > Author: delphij > Date: Wed Sep 28 19:01:15 2011 > New Revision: 225849 > URL: http://svn.freebsd.org/changeset/base/225849 > > Log: > Test if the interface is afif in dhcpif() and syncdhcpif(), as > done in ipv6_autoconfif. I now see dhclient running even if no DHCP was configured at all %grep -i dhc /etc/rc.conf %ps ax | grep dhc 951 ?? Is0:00.00 dhclient: em0 [priv] (dhclient) 971 ?? Is0:00.00 dhclient: em0 (dhclient) 1491 0 RL+ 0:00.00 grep dhc % Which also means I have inet 0.0.0.0 netmask 0xff00 broadcast 255.255.255.255 while it tries in vain to get a lease. Can you two please double-check your changes? -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226436 - in head: . gnu/usr.bin/binutils/objcopy gnu/usr.bin/binutils/strip lib/libc/gen lib/libelf lib/libipsec lib/libpmc lib/msun/man libexec/rtld-elf/amd64 libexec/rtld-elf/i386 s
On 10/16/2011 07:30, Eitan Adler wrote: > Author: eadler (ports committer) > Date: Sun Oct 16 14:30:28 2011 > New Revision: 226436 > URL: http://svn.freebsd.org/changeset/base/226436 > > Log: > - change "is is" to "is" or "it is" > - change "the the" to "the" > > Approved by:lstewart > Approved by:sahil (mentor) > MFC after: 3 days > Modified: head/secure/usr.bin/openssl/man/ca.1 > == > --- head/secure/usr.bin/openssl/man/ca.1 Sun Oct 16 14:16:46 2011 > (r226435) > +++ head/secure/usr.bin/openssl/man/ca.1 Sun Oct 16 14:30:28 2011 > (r226436) > @@ -205,7 +205,7 @@ section for information on the required > .IP "\fB\-infiles\fR" 4 > .IX Item "-infiles" > if present this should be the last option, all subsequent arguments > -are assumed to the the names of files containing certificate requests. > +are assumed to the names of files containing certificate requests. I think you need "be" between "to the" here. > Modified: head/usr.sbin/pkg_install/lib/version.c > == > --- head/usr.sbin/pkg_install/lib/version.c Sun Oct 16 14:16:46 2011 > (r226435) > +++ head/usr.sbin/pkg_install/lib/version.c Sun Oct 16 14:30:28 2011 > (r226436) > @@ -66,7 +66,7 @@ split_version(const char *pkgname, const > if (pkgname == NULL) > errx(2, "%s: Passed NULL pkgname.", __func__); > > -/* Look for the last '-' the the pkgname */ > +/* Look for the last '-' the pkgname */ "in" before "the" Meanwhile, nice work. :) At least the openssl stuff is contributed code, please be sure to send the patches upstream for all of the contrib code. Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226359 - head/usr.bin/look
On 10/16/11 11:20, Ed Schouten wrote: > Hmmm... Casting to size_t is not the way to go, but off_t also should be > avoided. We can assume st_size is non-negative, so we should do > something like this, right? > > - if (sb.st_size > (off_t)SIZE_T_MAX) > + if ((uintmax_t)sb.st_size > (uintmax_t)SIZE_T_MAX) That should work. I've also solved this problem in the past with if ((sizeof(off_t) > sizeof(size_t)) && (sb.st_size > (off_t) -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226359 - head/usr.bin/look
* Colin Percival , 20111016 19:21: > This might make look(1) build, but on a 64-bit machine it also makes > look(1) fail with "File too large" whenever it's larger than > (int64_t)(UINT64_MAX) = -1 bytes long. d'oh! Stupid signedness. I casted to off_t explicitly, since we need to do 64-bit comparison, but off_t is signed, while size_t is not. Hmmm... Casting to size_t is not the way to go, but off_t also should be avoided. We can assume st_size is non-negative, so we should do something like this, right? %%% Index: look.c === --- look.c (revision 226430) +++ look.c (working copy) @@ -134,7 +134,7 @@ do { if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb)) err(2, "%s", file); - if (sb.st_size > (off_t)SIZE_T_MAX) + if ((uintmax_t)sb.st_size > (uintmax_t)SIZE_T_MAX) errx(2, "%s: %s", file, strerror(EFBIG)); if (sb.st_size == 0) { close(fd); %%% -- Ed Schouten WWW: http://80386.nl/ pgpDMtGuMMZXo.pgp Description: PGP signature
svn commit: r226443 - head/sys/arm/include
Author: cognet Date: Sun Oct 16 17:59:28 2011 New Revision: 226443 URL: http://svn.freebsd.org/changeset/base/226443 Log: Fix 2 bugs : - A race condition could happen if two threads were using RAS at the same time as the code didn't reset RAS_END, the RAS code could believe we were not in a RAS, when we were in fact. - Using signed value logic to compare addresses wasn't such a good idea. Many thanks to Ian to investigate on these issues. Pointy hat to:cognet PR: arm/161498 Submitted by: Ian Lepore http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226359 - head/usr.bin/look
On 10/14/11 00:24, Ed Schouten wrote: > Log: > Build look(1) with WARNS=6. > > - if (sb.st_size > SIZE_T_MAX) > + if (sb.st_size > (off_t)SIZE_T_MAX) > errx(2, "%s: %s", file, strerror(EFBIG)); This might make look(1) build, but on a 64-bit machine it also makes look(1) fail with "File too large" whenever it's larger than (int64_t)(UINT64_MAX) = -1 bytes long. Please fix. :-) -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226442 - head/sys/dev/iicbus
Author: brueffer Date: Sun Oct 16 17:38:20 2011 New Revision: 226442 URL: http://svn.freebsd.org/changeset/base/226442 Log: Revert r226398 and instead move the allocation of usrbufs after the error check. Suggested by: pjd MFC after:1 week Modified: head/sys/dev/iicbus/iic.c Modified: head/sys/dev/iicbus/iic.c == --- head/sys/dev/iicbus/iic.c Sun Oct 16 17:37:54 2011(r226441) +++ head/sys/dev/iicbus/iic.c Sun Oct 16 17:38:20 2011(r226442) @@ -346,13 +346,11 @@ iicioctl(struct cdev *dev, u_long cmd, c case I2CRDWR: buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); - usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); - if (error) { - free(usrbufs, M_TEMP); + if (error) break; - } /* Alloc kernel buffers for userland data, copyin write data */ + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); for (i = 0; i < d->nmsgs; i++) { m = &((struct iic_msg *)buf)[i]; usrbufs[i] = m->buf; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226441 - head/sys/arm/arm
Author: cognet Date: Sun Oct 16 17:37:54 2011 New Revision: 226441 URL: http://svn.freebsd.org/changeset/base/226441 Log: Explicitely set ARM_RAS_START and ARM_RAS_END once the cacheline or the page has been allocated, or we could end up using random values, and bad things could happen. PR: arm/161492 Submitted by: Ian Lepore MFC after:1 week Modified: head/sys/arm/arm/machdep.c Modified: head/sys/arm/arm/machdep.c == --- head/sys/arm/arm/machdep.c Sun Oct 16 16:58:28 2011(r226440) +++ head/sys/arm/arm/machdep.c Sun Oct 16 17:37:54 2011(r226441) @@ -312,6 +312,8 @@ cpu_startup(void *dummy) m = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | VM_ALLOC_ZERO); pmap_kenter_user(ARM_TP_ADDRESS, VM_PAGE_TO_PHYS(m)); #endif + *(uint32_t *)ARM_RAS_START = 0; + *(uint32_t *)ARM_RAS_END = 0x; } SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226398 - head/sys/dev/iicbus
On Sun, Oct 16, 2011 at 06:57:18PM +0200, Christian Brueffer wrote: > > I think that better fix is to move usrbufs allocation after copyin(), as > > usrbufs is not used there. > > > > Agreed, how about the attached patch? Looks good. > Index: iic.c > === > --- iic.c (revision 226398) > +++ iic.c (working copy) > @@ -346,13 +346,11 @@ > > case I2CRDWR: > buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); > - usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | > M_WAITOK); > error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); > - if (error) { > - free(usrbufs, M_TEMP); > + if (error) > break; > - } > /* Alloc kernel buffers for userland data, copyin write data */ > + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | > M_WAITOK); > for (i = 0; i < d->nmsgs; i++) { > m = &((struct iic_msg *)buf)[i]; > usrbufs[i] = m->buf; -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpLGcs71lg7n.pgp Description: PGP signature
Re: svn commit: r226398 - head/sys/dev/iicbus
On 10/16/11 17:46 , Pawel Jakub Dawidek wrote: On Sat, Oct 15, 2011 at 03:57:56PM +, Christian Brueffer wrote: Author: brueffer Date: Sat Oct 15 15:57:55 2011 New Revision: 226398 URL: http://svn.freebsd.org/changeset/base/226398 Log: Properly free resources in an error case. CID: 4203 Found with: Coverity Prevent(tm) MFC after: 1 week Modified: head/sys/dev/iicbus/iic.c Modified: head/sys/dev/iicbus/iic.c == --- head/sys/dev/iicbus/iic.c Sat Oct 15 15:21:33 2011(r226397) +++ head/sys/dev/iicbus/iic.c Sat Oct 15 15:57:55 2011(r226398) @@ -348,8 +348,10 @@ iicioctl(struct cdev *dev, u_long cmd, c buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); - if (error) + if (error) { + free(usrbufs, M_TEMP); break; + } I think that better fix is to move usrbufs allocation after copyin(), as usrbufs is not used there. Agreed, how about the attached patch? Index: iic.c === --- iic.c (revision 226398) +++ iic.c (working copy) @@ -346,13 +346,11 @@ case I2CRDWR: buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); - usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); - if (error) { - free(usrbufs, M_TEMP); + if (error) break; - } /* Alloc kernel buffers for userland data, copyin write data */ + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); for (i = 0; i < d->nmsgs; i++) { m = &((struct iic_msg *)buf)[i]; usrbufs[i] = m->buf; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226440 - head/sbin/atm/atmconfig
Author: cognet Date: Sun Oct 16 16:58:28 2011 New Revision: 226440 URL: http://svn.freebsd.org/changeset/base/226440 Log: Unbreak NO_DYNAMICROOT by explicitely linking to libcrypto if MK_OPENSSL isn't set to no, as libbsnmp needs it. Modified: head/sbin/atm/atmconfig/Makefile Modified: head/sbin/atm/atmconfig/Makefile == --- head/sbin/atm/atmconfig/MakefileSun Oct 16 16:05:23 2011 (r226439) +++ head/sbin/atm/atmconfig/MakefileSun Oct 16 16:58:28 2011 (r226440) @@ -5,6 +5,8 @@ # # $FreeBSD$ +.include + PROG= atmconfig .ifndef RESCUE SRCS= ${.OBJDIR}/oid.h @@ -21,6 +23,9 @@ CFLAGS+= -I${.OBJDIR} .ifndef RESCUE DPADD= ${LIBBSNMP} LDADD= -lbsnmp +. if ${MK_DYNAMICROOT} == "no" && ${MK_OPENSSL} != "no" +LDADD+= -lcrypto +. endif .endif .ifndef RESCUE ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226439 - head/usr.sbin/kbdmap
Author: nwhitehorn Date: Sun Oct 16 16:05:23 2011 New Revision: 226439 URL: http://svn.freebsd.org/changeset/base/226439 Log: Place quotes around the output of kbdmap(1), designed to be pasted into /etc/rc.conf. PR: bin/161711 Submitted by: manolis MFC after:1 week Modified: head/usr.sbin/kbdmap/kbdmap.c Modified: head/usr.sbin/kbdmap/kbdmap.c == --- head/usr.sbin/kbdmap/kbdmap.c Sun Oct 16 15:55:23 2011 (r226438) +++ head/usr.sbin/kbdmap/kbdmap.c Sun Oct 16 16:05:23 2011 (r226439) @@ -289,7 +289,7 @@ do_kbdcontrol(struct keymap *km) if (!x11) system(kbd_cmd); - fprintf(stderr, "keymap=%s\n", km->keym); + fprintf(stderr, "keymap=\"%s\"\n", km->keym); free(kbd_cmd); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226398 - head/sys/dev/iicbus
On Sat, Oct 15, 2011 at 03:57:56PM +, Christian Brueffer wrote: > Author: brueffer > Date: Sat Oct 15 15:57:55 2011 > New Revision: 226398 > URL: http://svn.freebsd.org/changeset/base/226398 > > Log: > Properly free resources in an error case. > > CID:4203 > Found with: Coverity Prevent(tm) > MFC after: 1 week > > Modified: > head/sys/dev/iicbus/iic.c > > Modified: head/sys/dev/iicbus/iic.c > == > --- head/sys/dev/iicbus/iic.c Sat Oct 15 15:21:33 2011(r226397) > +++ head/sys/dev/iicbus/iic.c Sat Oct 15 15:57:55 2011(r226398) > @@ -348,8 +348,10 @@ iicioctl(struct cdev *dev, u_long cmd, c > buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); > usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | > M_WAITOK); > error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); > - if (error) > + if (error) { > + free(usrbufs, M_TEMP); > break; > + } I think that better fix is to move usrbufs allocation after copyin(), as usrbufs is not used there. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpP170IjKbVs.pgp Description: PGP signature
svn commit: r226437 - head/sys/netinet
Author: andre Date: Sun Oct 16 15:08:43 2011 New Revision: 226437 URL: http://svn.freebsd.org/changeset/base/226437 Log: VNET virtualize tcp_sendspace/tcp_recvspace and change the type to INT. A long is not necessary as the TCP window is limited to 2**30. A larger initial window isn't useful. MFC after:1 week Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_input.c == --- head/sys/netinet/tcp_input.cSun Oct 16 14:30:28 2011 (r226436) +++ head/sys/netinet/tcp_input.cSun Oct 16 15:08:43 2011 (r226437) @@ -3517,7 +3517,7 @@ tcp_mss(struct tcpcb *tp, int offer) */ so = inp->inp_socket; SOCKBUF_LOCK(&so->so_snd); - if ((so->so_snd.sb_hiwat == tcp_sendspace) && metrics.rmx_sendpipe) + if ((so->so_snd.sb_hiwat == V_tcp_sendspace) && metrics.rmx_sendpipe) bufsize = metrics.rmx_sendpipe; else bufsize = so->so_snd.sb_hiwat; @@ -3534,7 +3534,7 @@ tcp_mss(struct tcpcb *tp, int offer) tp->t_maxseg = mss; SOCKBUF_LOCK(&so->so_rcv); - if ((so->so_rcv.sb_hiwat == tcp_recvspace) && metrics.rmx_recvpipe) + if ((so->so_rcv.sb_hiwat == V_tcp_recvspace) && metrics.rmx_recvpipe) bufsize = metrics.rmx_recvpipe; else bufsize = so->so_rcv.sb_hiwat; Modified: head/sys/netinet/tcp_usrreq.c == --- head/sys/netinet/tcp_usrreq.c Sun Oct 16 14:30:28 2011 (r226436) +++ head/sys/netinet/tcp_usrreq.c Sun Oct 16 15:08:43 2011 (r226437) @@ -1501,12 +1501,15 @@ tcp_ctloutput(struct socket *so, struct * Set the initial send and receive socket buffer sizes for * newly created TCP sockets. */ -u_long tcp_sendspace = 1024*32; -SYSCTL_ULONG(_net_inet_tcp, TCPCTL_SENDSPACE, sendspace, CTLFLAG_RW, -&tcp_sendspace , 0, "Initial send socket buffer size"); -u_long tcp_recvspace = 1024*64; -SYSCTL_ULONG(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace, CTLFLAG_RW, -&tcp_recvspace , 0, "Initial receive socket buffer size"); +VNET_DEFINE(int, tcp_sendspace) = 1024*32; +#defineV_tcp_sendspace VNET(tcp_sendspace) +SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_SENDSPACE, tcp_sendspace, CTLFLAG_RW, +&VNET_NAME(tcp_sendspace), 0, "Initial send socket buffer size"); + +VNET_DEFINE(int, tcp_recvspace) = 1024*64 +#defineV_tcp_recvspace VNET(tcp_recvspace) +SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_RECVSPACE, tcp_recvspace, CTLFLAG_RW, +&VNET_NAME(tcp_recvspace), 0, "Initial receive socket buffer size"); /* * Attach TCP protocol to socket, allocating @@ -1521,7 +1524,7 @@ tcp_attach(struct socket *so) int error; if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) { - error = soreserve(so, tcp_sendspace, tcp_recvspace); + error = soreserve(so, V_tcp_sendspace, V_tcp_recvspace); if (error) return (error); } Modified: head/sys/netinet/tcp_var.h == --- head/sys/netinet/tcp_var.h Sun Oct 16 14:30:28 2011(r226436) +++ head/sys/netinet/tcp_var.h Sun Oct 16 15:08:43 2011(r226437) @@ -606,6 +606,8 @@ VNET_DECLARE(int, tcp_mssdflt); /* XXX * VNET_DECLARE(int, tcp_minmss); VNET_DECLARE(int, tcp_delack_enabled); VNET_DECLARE(int, tcp_do_rfc3390); +VNET_DECLARE(int, tcp_sendspace); +VNET_DECLARE(int, tcp_recvspace); VNET_DECLARE(int, path_mtu_discovery); VNET_DECLARE(int, ss_fltsz); VNET_DECLARE(int, ss_fltsz_local); @@ -618,6 +620,8 @@ VNET_DECLARE(int, tcp_abc_l_var); #defineV_tcp_minmssVNET(tcp_minmss) #defineV_tcp_delack_enabledVNET(tcp_delack_enabled) #defineV_tcp_do_rfc3390VNET(tcp_do_rfc3390) +#defineV_tcp_sendspace VNET(tcp_sendspace) +#defineV_tcp_recvspace VNET(tcp_recvspace) #defineV_path_mtu_discoveryVNET(path_mtu_discovery) #defineV_ss_fltsz VNET(ss_fltsz) #defineV_ss_fltsz_localVNET(ss_fltsz_local) @@ -716,8 +720,6 @@ void tcp_hc_updatemtu(struct in_conninf voidtcp_hc_update(struct in_conninfo *, struct hc_metrics_lite *); extern struct pr_usrreqs tcp_usrreqs; -extern u_long tcp_sendspace; -extern u_long tcp_recvspace; tcp_seq tcp_new_isn(struct tcpcb *); voidtcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226436 - in head: . gnu/usr.bin/binutils/objcopy gnu/usr.bin/binutils/strip lib/libc/gen lib/libelf lib/libipsec lib/libpmc lib/msun/man libexec/rtld-elf/amd64 libexec/rtld-elf/i386 sb...
Author: eadler (ports committer) Date: Sun Oct 16 14:30:28 2011 New Revision: 226436 URL: http://svn.freebsd.org/changeset/base/226436 Log: - change "is is" to "is" or "it is" - change "the the" to "the" Approved by: lstewart Approved by: sahil (mentor) MFC after:3 days Modified: head/UPDATING head/gnu/usr.bin/binutils/objcopy/objcopy.1 head/gnu/usr.bin/binutils/strip/strip.1 head/lib/libc/gen/getutxent.3 head/lib/libelf/elf_update.3 head/lib/libipsec/ipsec_strerror.3 head/lib/libpmc/pmc.core.3 head/lib/msun/man/ieee.3 head/libexec/rtld-elf/amd64/rtld_start.S head/libexec/rtld-elf/i386/rtld_start.S head/sbin/geom/class/part/gpart.8 head/sbin/init/init.8 head/secure/lib/libcrypto/man/engine.3 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/dgst.1 head/share/doc/psd/03.iosys/iosys head/share/doc/psd/23.rpc/rpc.prog.ms head/share/doc/psd/24.xdr/xdr.nts.ms head/share/doc/psd/27.nfsrpc/nfs.rfc.ms head/share/man/man4/dc.4 head/share/man/man9/sleepqueue.9 head/sys/boot/powerpc/boot1.chrp/generate-hfs.sh head/sys/dev/ath/ath_dfs/null/dfs_null.c head/sys/dev/bxe/bxe_link.c head/sys/dev/e1000/e1000_82575.c head/sys/dev/isp/DriverManual.txt head/sys/dev/vxge/include/vxgehal-config.h head/sys/dev/vxge/include/vxgehal-ll.h head/sys/dev/vxge/vxgehal/vxgehal-ring.c head/sys/mips/nlm/cms.c head/sys/netinet/ipfw/dummynet.txt head/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig head/usr.bin/compress/doc/NOTES head/usr.sbin/pkg_install/lib/version.c head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Modified: head/UPDATING == --- head/UPDATING Sun Oct 16 14:16:46 2011(r226435) +++ head/UPDATING Sun Oct 16 14:30:28 2011(r226436) @@ -462,7 +462,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 There's one kernel module for each firmware. Adding "device iwnfw" to the kernel configuration file means including all three firmware images inside the kernel. If you want to include just the one for - your wireless card, use the the devices iwn4965fw, iwn5000fw or + your wireless card, use the devices iwn4965fw, iwn5000fw or iwn5150fw. 20090926: Modified: head/gnu/usr.bin/binutils/objcopy/objcopy.1 == --- head/gnu/usr.bin/binutils/objcopy/objcopy.1 Sun Oct 16 14:16:46 2011 (r226435) +++ head/gnu/usr.bin/binutils/objcopy/objcopy.1 Sun Oct 16 14:30:28 2011 (r226436) @@ -738,8 +738,8 @@ distribution and the second a debugging needed if debugging abilities are required. The suggested procedure to create these files is as follows: .RS 4 -.IP "1." 4 -.IX Item "1." +.IP "1." 4 +.IX Item "1." \&\f(CW\*(C`foo\*(C'\fR then... .ie n .IP "1." 4 .el .IP "1." 4 Modified: head/gnu/usr.bin/binutils/strip/strip.1 == --- head/gnu/usr.bin/binutils/strip/strip.1 Sun Oct 16 14:16:46 2011 (r226435) +++ head/gnu/usr.bin/binutils/strip/strip.1 Sun Oct 16 14:30:28 2011 (r226436) @@ -300,8 +300,8 @@ distribution and the second a debugging needed if debugging abilities are required. The suggested procedure to create these files is as follows: .RS 4 -.IP "1." 4 -.IX Item "1." +.IP "1." 4 +.IX Item "1." \&\f(CW\*(C`foo\*(C'\fR then... .ie n .IP "1." 4 .el .IP "1." 4 Modified: head/lib/libc/gen/getutxent.3 == --- head/lib/libc/gen/getutxent.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/lib/libc/gen/getutxent.3 Sun Oct 16 14:30:28 2011 (r226436) @@ -243,7 +243,7 @@ or .Dv LOGIN_PROCESS and whose .Fa ut_line -is equal to the the same field in +is equal to the same field in .Fa line . .Pp The Modified: head/lib/libelf/elf_update.3 == --- head/lib/libelf/elf_update.3Sun Oct 16 14:16:46 2011 (r226435) +++ head/lib/libelf/elf_update.3Sun Oct 16 14:30:28 2011 (r226436) @@ -66,7 +66,7 @@ responsibility for the layout of the ELF If this flag is not set, the ELF library will compute the layout of the file from its associated section descriptors. .Pp -It is the application's responsibility to manage the the following +It is the application's responsibility to manage the following structure members in the ELF file: .Bl -tag -width indent .It "Executable Header" Modified: head/lib/libipsec/ipsec_strerror.3 == --- head/lib/libipsec/ipsec_strerror.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/lib/libipsec/ipsec_strerror.3 Sun Oct 16 14:30:28 2011 (r226436) @@ -63,7 +63,7 @@ as an underlying function, calling .Xr strer
svn commit: r226435 - head/sys/kern
Author: marcel Date: Sun Oct 16 14:16:46 2011 New Revision: 226435 URL: http://svn.freebsd.org/changeset/base/226435 Log: Fix double vision syndrome (read: double output) when in the debugger without a panic. Modified: head/sys/kern/subr_prf.c Modified: head/sys/kern/subr_prf.c == --- head/sys/kern/subr_prf.cSun Oct 16 14:11:05 2011(r226434) +++ head/sys/kern/subr_prf.cSun Oct 16 14:16:46 2011(r226435) @@ -467,25 +467,19 @@ putchar(int c, void *arg) struct putchar_arg *ap = (struct putchar_arg*) arg; struct tty *tp = ap->tty; int flags = ap->flags; - int putbuf_done = 0; /* Don't use the tty code after a panic or while in ddb. */ if (kdb_active) { if (c != '\0') cnputc(c); - } else { - if ((panicstr == NULL) && (flags & TOTTY) && (tp != NULL)) - tty_putchar(tp, c); - - if (flags & TOCONS) { - putbuf(c, ap); - putbuf_done = 1; - } - } - if ((flags & TOLOG) && (putbuf_done == 0)) { - if (c != '\0') - putbuf(c, ap); + return; } + + if ((flags & TOTTY) && tp != NULL && panicstr == NULL) + tty_putchar(tp, c); + + if ((flags & (TOCONS | TOLOG)) && c != '\0') + putbuf(c, ap); } /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226434 - head/usr.bin/elfdump
Author: marcel Date: Sun Oct 16 14:11:05 2011 New Revision: 226434 URL: http://svn.freebsd.org/changeset/base/226434 Log: o Use C99 designated initializer to properly handle ELFOSABI_STANDALONE. o In elf_get_byte(), cast through uint8_t and not char to avoid sign extension. Modified: head/usr.bin/elfdump/elfdump.c Modified: head/usr.bin/elfdump/elfdump.c == --- head/usr.bin/elfdump/elfdump.c Sun Oct 16 13:54:46 2011 (r226433) +++ head/usr.bin/elfdump/elfdump.c Sun Oct 16 14:11:05 2011 (r226434) @@ -282,11 +282,12 @@ const char *ei_data[] = { "ELFDATANONE", "ELFDATA2LSB", "ELFDATA2MSB" }; -const char *ei_abis[] = { +const char *ei_abis[256] = { "ELFOSABI_SYSV", "ELFOSABI_HPUX", "ELFOSABI_NETBSD", "ELFOSABI_LINUX", - "ELFOSABI_HURD", "ELFOSABI_86OPEN", "ELFOSABI_SOLARIS", - "ELFOSABI_MONTEREY", "ELFOSABI_IRIX", "ELFOSABI_FREEBSD", - "ELFOSABI_TRU64", "ELFOSABI_MODESTO", "ELFOSABI_OPENBSD" + "ELFOSABI_HURD", "ELFOSABI_86OPEN", "ELFOSABI_SOLARIS", "ELFOSABI_AIX", + "ELFOSABI_IRIX", "ELFOSABI_FREEBSD", "ELFOSABI_TRU64", + "ELFOSABI_MODESTO", "ELFOSABI_OPENBSD", + [255] = "ELFOSABI_STANDALONE" }; const char *p_types[] = { @@ -931,10 +932,10 @@ elf_get_byte(Elf32_Ehdr *e, void *base, val = 0; switch (e->e_ident[EI_CLASS]) { case ELFCLASS32: - val = ((char *)base)[elf32_offsets[member]]; + val = ((uint8_t *)base)[elf32_offsets[member]]; break; case ELFCLASS64: - val = ((char *)base)[elf64_offsets[member]]; + val = ((uint8_t *)base)[elf64_offsets[member]]; break; case ELFCLASSNONE: errx(1, "invalid class"); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226433 - head/sys/netinet
Author: andre Date: Sun Oct 16 13:54:46 2011 New Revision: 226433 URL: http://svn.freebsd.org/changeset/base/226433 Log: Update the comment and description of tcp_sendspace and tcp_recvspace to better reflect their purpose. MFC after:1 week Modified: head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c == --- head/sys/netinet/tcp_usrreq.c Sun Oct 16 11:08:51 2011 (r226432) +++ head/sys/netinet/tcp_usrreq.c Sun Oct 16 13:54:46 2011 (r226433) @@ -1498,16 +1498,15 @@ tcp_ctloutput(struct socket *so, struct #undef INP_WLOCK_RECHECK /* - * tcp_sendspace and tcp_recvspace are the default send and receive window - * sizes, respectively. These are obsolescent (this information should - * be set by the route). + * Set the initial send and receive socket buffer sizes for + * newly created TCP sockets. */ u_long tcp_sendspace = 1024*32; SYSCTL_ULONG(_net_inet_tcp, TCPCTL_SENDSPACE, sendspace, CTLFLAG_RW, -&tcp_sendspace , 0, "Maximum outgoing TCP datagram size"); +&tcp_sendspace , 0, "Initial send socket buffer size"); u_long tcp_recvspace = 1024*64; SYSCTL_ULONG(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace, CTLFLAG_RW, -&tcp_recvspace , 0, "Maximum incoming TCP datagram size"); +&tcp_recvspace , 0, "Initial receive socket buffer size"); /* * Attach TCP protocol to socket, allocating ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226359 - head/usr.bin/look
This seems to break portsnap on amd64. As seen in ports/161703 (with error look: file too large). mfg tobias On Fri, 14 Oct 2011 09:24:48 +0200, Ed Schouten wrote: Author: ed Date: Fri Oct 14 07:24:48 2011 New Revision: 226359 URL: http://svn.freebsd.org/changeset/base/226359 Log: Build look(1) with WARNS=6. Modified: head/usr.bin/look/Makefile head/usr.bin/look/look.c Modified: head/usr.bin/look/Makefile == --- head/usr.bin/look/Makefile Fri Oct 14 07:24:23 2011(r226358) +++ head/usr.bin/look/Makefile Fri Oct 14 07:24:48 2011(r226359) @@ -3,6 +3,4 @@ PROG= look -WARNS?=2 - .include Modified: head/usr.bin/look/look.c == --- head/usr.bin/look/look.cFri Oct 14 07:24:23 2011(r226358) +++ head/usr.bin/look/look.cFri Oct 14 07:24:48 2011(r226359) @@ -134,7 +134,7 @@ main(int argc, char *argv[]) do { if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb)) err(2, "%s", file); - if (sb.st_size > SIZE_T_MAX) + if (sb.st_size > (off_t)SIZE_T_MAX) errx(2, "%s: %s", file, strerror(EFBIG)); if (sb.st_size == 0) { close(fd); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226430 - head/contrib/gcc/config/i386
On Sun, Oct 16, 2011 at 12:25:14PM +0200, Roman Divacky wrote: > Can this be MFCed to stable/9 ? I've seen clang erroring out > because of this quite a lot. Yes I think so. Stefan > On Sun, Oct 16, 2011 at 10:14:33AM +, Stefan Farfeleder wrote: > > Author: stefanf > > Date: Sun Oct 16 10:14:33 2011 > > New Revision: 226430 > > URL: http://svn.freebsd.org/changeset/base/226430 > > > > Log: > > Adjust posix_memalign() prototype to match what we define in stdlib.h for > > C++ compilation. > > > > PR: standards/147210 > > > > Modified: > > head/contrib/gcc/config/i386/pmm_malloc.h > > > > Modified: head/contrib/gcc/config/i386/pmm_malloc.h > > == > > --- head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:00:28 > > 2011(r226429) > > +++ head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:14:33 > > 2011(r226430) > > @@ -34,7 +34,7 @@ > > #ifndef __cplusplus > > extern int posix_memalign (void **, size_t, size_t); > > #else > > -extern "C" int posix_memalign (void **, size_t, size_t) throw (); > > +extern "C" int posix_memalign (void **, size_t, size_t); > > #endif > > > > static __inline void * > ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226431 - head/sys/netinet
Author: ed Date: Sun Oct 16 10:58:00 2011 New Revision: 226431 URL: http://svn.freebsd.org/changeset/base/226431 Log: Forward declare mbuf and inpcb. This fixes a compiler warning at WARNS=6 when including the header files as follows: #include #include #include #include #include Modified: head/sys/netinet/udp_var.h Modified: head/sys/netinet/udp_var.h == --- head/sys/netinet/udp_var.h Sun Oct 16 10:14:33 2011(r226430) +++ head/sys/netinet/udp_var.h Sun Oct 16 10:58:00 2011(r226431) @@ -51,6 +51,9 @@ struct udpiphdr { #defineui_ulen ui_u.uh_ulen #defineui_sum ui_u.uh_sum +struct inpcb; +struct mbuf; + typedef void(*udp_tun_func_t)(struct mbuf *, int off, struct inpcb *); /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r226430 - head/contrib/gcc/config/i386
Can this be MFCed to stable/9 ? I've seen clang erroring out because of this quite a lot. roman On Sun, Oct 16, 2011 at 10:14:33AM +, Stefan Farfeleder wrote: > Author: stefanf > Date: Sun Oct 16 10:14:33 2011 > New Revision: 226430 > URL: http://svn.freebsd.org/changeset/base/226430 > > Log: > Adjust posix_memalign() prototype to match what we define in stdlib.h for > C++ compilation. > > PR: standards/147210 > > Modified: > head/contrib/gcc/config/i386/pmm_malloc.h > > Modified: head/contrib/gcc/config/i386/pmm_malloc.h > == > --- head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:00:28 2011 > (r226429) > +++ head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:14:33 2011 > (r226430) > @@ -34,7 +34,7 @@ > #ifndef __cplusplus > extern int posix_memalign (void **, size_t, size_t); > #else > -extern "C" int posix_memalign (void **, size_t, size_t) throw (); > +extern "C" int posix_memalign (void **, size_t, size_t); > #endif > > static __inline void * ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226430 - head/contrib/gcc/config/i386
Author: stefanf Date: Sun Oct 16 10:14:33 2011 New Revision: 226430 URL: http://svn.freebsd.org/changeset/base/226430 Log: Adjust posix_memalign() prototype to match what we define in stdlib.h for C++ compilation. PR: standards/147210 Modified: head/contrib/gcc/config/i386/pmm_malloc.h Modified: head/contrib/gcc/config/i386/pmm_malloc.h == --- head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:00:28 2011 (r226429) +++ head/contrib/gcc/config/i386/pmm_malloc.h Sun Oct 16 10:14:33 2011 (r226430) @@ -34,7 +34,7 @@ #ifndef __cplusplus extern int posix_memalign (void **, size_t, size_t); #else -extern "C" int posix_memalign (void **, size_t, size_t) throw (); +extern "C" int posix_memalign (void **, size_t, size_t); #endif static __inline void * ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226429 - head/usr.bin/ncplist
Author: ed Date: Sun Oct 16 10:00:28 2011 New Revision: 226429 URL: http://svn.freebsd.org/changeset/base/226429 Log: Fix ncplist to build with WARNS=6. Add some const and static keywords to get it all to build. Also add missing #includes. Modified: head/usr.bin/ncplist/Makefile head/usr.bin/ncplist/ncplist.c Modified: head/usr.bin/ncplist/Makefile == --- head/usr.bin/ncplist/Makefile Sun Oct 16 09:09:33 2011 (r226428) +++ head/usr.bin/ncplist/Makefile Sun Oct 16 10:00:28 2011 (r226429) @@ -2,8 +2,6 @@ PROG= ncplist -WARNS?=0 - DPADD= ${LIBNCP} ${LIBIPX} LDADD= -lncp -lipx Modified: head/usr.bin/ncplist/ncplist.c == --- head/usr.bin/ncplist/ncplist.c Sun Oct 16 09:09:33 2011 (r226428) +++ head/usr.bin/ncplist/ncplist.c Sun Oct 16 10:00:28 2011 (r226429) @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -153,7 +155,7 @@ show_serverlist(char *server) { int found = 0, connid; struct ncp_bindery_object obj; - char *pattern = "*"; + const char *pattern = "*"; connid = ncp_get_connid(server, 1); if (connid < 0) @@ -229,7 +231,7 @@ show_userlist(char *server) return; } -void +static void show_queuelist(char *server, char *patt) { struct ncp_bindery_object q; @@ -298,8 +300,8 @@ list_volumes(char *server) } struct ncp_bind_type { - u_long type; - char*name; + u_long type; + const char *name; }; static struct ncp_bind_type btypes[] = { @@ -310,7 +312,7 @@ static struct ncp_bind_type btypes[] = { {0, NULL} }; -void +static void list_bindery(char *server, char *type, char *patt) { struct ncp_bindery_object q; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226428 - head/usr.bin/su
Author: ed Date: Sun Oct 16 09:09:33 2011 New Revision: 226428 URL: http://svn.freebsd.org/changeset/base/226428 Log: Undo r226423. It seems su does build without warnings, but it requires a small fix to libbsm headers, which I have not committed to SVN yet. Modified: head/usr.bin/su/Makefile Modified: head/usr.bin/su/Makefile == --- head/usr.bin/su/MakefileSun Oct 16 08:54:41 2011(r226427) +++ head/usr.bin/su/MakefileSun Oct 16 09:09:33 2011(r226428) @@ -5,6 +5,8 @@ PROG= su +WARNS?=5 + DPADD= ${LIBUTIL} ${LIBPAM} LDADD= -lutil ${MINUSLPAM} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226427 - head/usr.bin/rwho
Author: ed Date: Sun Oct 16 08:54:41 2011 New Revision: 226427 URL: http://svn.freebsd.org/changeset/base/226427 Log: Build rwho(1) with WARNS=6. The only reason why it didn't build with WARNS=6, is because of some simple to fix string formatting bugs. MFC after:3 months Modified: head/usr.bin/rwho/Makefile head/usr.bin/rwho/rwho.c Modified: head/usr.bin/rwho/Makefile == --- head/usr.bin/rwho/Makefile Sun Oct 16 08:45:16 2011(r226426) +++ head/usr.bin/rwho/Makefile Sun Oct 16 08:54:41 2011(r226427) @@ -3,6 +3,4 @@ PROG= rwho -WARNS?=1 - .include Modified: head/usr.bin/rwho/rwho.c == --- head/usr.bin/rwho/rwho.cSun Oct 16 08:45:16 2011(r226426) +++ head/usr.bin/rwho/rwho.cSun Oct 16 08:54:41 2011(r226427) @@ -165,9 +165,10 @@ main(int argc, char *argv[]) d_first ? "%e %b %R" : "%b %e %R", localtime(&t)); (void)sprintf(buf, "%s:%-.*s", mp->myhost, - sizeof(mp->myutmp.out_line), mp->myutmp.out_line); + (int)sizeof(mp->myutmp.out_line), mp->myutmp.out_line); printf("%-*.*s %-*s %s", - sizeof(mp->myutmp.out_name), sizeof(mp->myutmp.out_name), + (int)sizeof(mp->myutmp.out_name), + (int)sizeof(mp->myutmp.out_name), mp->myutmp.out_name, width, buf, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226426 - head/lib/libsdp
Author: ed Date: Sun Oct 16 08:45:16 2011 New Revision: 226426 URL: http://svn.freebsd.org/changeset/base/226426 Log: Change the SDP_GET* macros to cast to a const buffer. This fixes a compiler warning when passing a const buffer to them. Modified: head/lib/libsdp/sdp.h Modified: head/lib/libsdp/sdp.h == --- head/lib/libsdp/sdp.h Sun Oct 16 08:44:03 2011(r226425) +++ head/lib/libsdp/sdp.h Sun Oct 16 08:45:16 2011(r226426) @@ -312,13 +312,13 @@ typedef struct sdp_attr * sdp_attr_p; /* Inline versions of get/put byte/short/long. Pointer is advanced */ #define SDP_GET8(b, cp) { \ - register uint8_t *t_cp = (uint8_t *)(cp); \ + const uint8_t *t_cp = (const uint8_t *)(cp); \ (b) = *t_cp; \ (cp) ++; \ } #define SDP_GET16(s, cp) { \ - register uint8_t *t_cp = (uint8_t *)(cp); \ + const uint8_t *t_cp = (const uint8_t *)(cp); \ (s) = ((uint16_t)t_cp[0] << 8) \ | ((uint16_t)t_cp[1]) \ ; \ @@ -326,7 +326,7 @@ typedef struct sdp_attr * sdp_attr_p; } #define SDP_GET32(l, cp) { \ - register uint8_t *t_cp = (uint8_t *)(cp); \ + const uint8_t *t_cp = (const uint8_t *)(cp); \ (l) = ((uint32_t)t_cp[0] << 24) \ | ((uint32_t)t_cp[1] << 16) \ | ((uint32_t)t_cp[2] << 8) \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226425 - in head: lib/libncp sys/netncp
Author: ed Date: Sun Oct 16 08:44:03 2011 New Revision: 226425 URL: http://svn.freebsd.org/changeset/base/226425 Log: Change ncp_scan_bindery_object() to pass a constant search string. The ncp_scan_bindery_object() function does not modify search_string internally, so there is no need to declare it as `char *'. Modified: head/lib/libncp/ncpl_bind.c head/sys/netncp/ncp_lib.h Modified: head/lib/libncp/ncpl_bind.c == --- head/lib/libncp/ncpl_bind.c Sun Oct 16 08:36:10 2011(r226424) +++ head/lib/libncp/ncpl_bind.c Sun Oct 16 08:44:03 2011(r226425) @@ -85,7 +85,7 @@ ncp_read_property_value(NWCONN_HANDLE co int ncp_scan_bindery_object(NWCONN_HANDLE connid, u_int32_t last_id, - u_int16_t object_type, char *search_string, + u_int16_t object_type, const char *search_string, struct ncp_bindery_object *target) { int error; Modified: head/sys/netncp/ncp_lib.h == --- head/sys/netncp/ncp_lib.h Sun Oct 16 08:36:10 2011(r226424) +++ head/sys/netncp/ncp_lib.h Sun Oct 16 08:44:03 2011(r226425) @@ -174,7 +174,7 @@ int ncp_get_bindery_object_id(NWCONN_HA int ncp_get_bindery_object_name(NWCONN_HANDLE, u_int32_t, struct ncp_bindery_object *); int ncp_scan_bindery_object(NWCONN_HANDLE, u_int32_t, u_int16_t, - char *, struct ncp_bindery_object *); + const char *, struct ncp_bindery_object *); int ncp_read_property_value(NWCONN_HANDLE, int object_type, const char *, int, const char *, struct nw_property *); int ncp_get_encryption_key(NWCONN_HANDLE, char *); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226424 - head/usr.bin/systat
Author: ed Date: Sun Oct 16 08:36:10 2011 New Revision: 226424 URL: http://svn.freebsd.org/changeset/base/226424 Log: Use integer to store the result of getch(). We need to use an integer to make the comparison against ERR work. MFC after:3 months Modified: head/usr.bin/systat/keyboard.c Modified: head/usr.bin/systat/keyboard.c == --- head/usr.bin/systat/keyboard.c Sun Oct 16 08:14:12 2011 (r226423) +++ head/usr.bin/systat/keyboard.c Sun Oct 16 08:36:10 2011 (r226424) @@ -47,8 +47,8 @@ static const char sccsid[] = "@(#)keyboa int keyboard(void) { - char ch, line[80]; - int oldmask; + char line[80]; + int ch, oldmask; for (;;) { col = 0; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226423 - head/usr.bin/su
Author: ed Date: Sun Oct 16 08:14:12 2011 New Revision: 226423 URL: http://svn.freebsd.org/changeset/base/226423 Log: Remove WARNS line. This tool builds with WARNS=6 properly. Modified: head/usr.bin/su/Makefile Modified: head/usr.bin/su/Makefile == --- head/usr.bin/su/MakefileSun Oct 16 08:09:17 2011(r226422) +++ head/usr.bin/su/MakefileSun Oct 16 08:14:12 2011(r226423) @@ -5,8 +5,6 @@ PROG= su -WARNS?=5 - DPADD= ${LIBUTIL} ${LIBPAM} LDADD= -lutil ${MINUSLPAM} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226422 - head/usr.bin/m4
Author: ed Date: Sun Oct 16 08:09:17 2011 New Revision: 226422 URL: http://svn.freebsd.org/changeset/base/226422 Log: Fix build of m4 with WARNS=6. Change the parser; rename `exp' to `exponent' not to collide with exp(3). Modified: head/usr.bin/m4/Makefile head/usr.bin/m4/expr.c head/usr.bin/m4/main.c Modified: head/usr.bin/m4/Makefile == --- head/usr.bin/m4/MakefileSun Oct 16 08:04:43 2011(r226421) +++ head/usr.bin/m4/MakefileSun Oct 16 08:09:17 2011(r226422) @@ -9,6 +9,4 @@ CFLAGS+=-DEXTENDED SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c -WARNS?=0 - .include Modified: head/usr.bin/m4/expr.c == --- head/usr.bin/m4/expr.c Sun Oct 16 08:04:43 2011(r226421) +++ head/usr.bin/m4/expr.c Sun Oct 16 08:09:17 2011(r226422) @@ -71,8 +71,8 @@ __FBSDID("$FreeBSD$"); * nerel : shift { ("<" | ">" | "<=" | ">=") shift } * shift : primary { ("<<" | ">>") primary } * primary : term { ("+" | "-") term } - * term: exp { ("*" | "/" | "%") exp } - * exp : unary { "**" unary } + * term: exponent { ("*" | "/" | "%") exponent } + * exponent: unary { "**" unary } * unary : factor * | ("+" | "-" | "~" | "!") unary * factor : constant @@ -115,12 +115,11 @@ static int nerel(int mayeval); static int shift(int mayeval); static int primary(int mayeval); static int term(int mayeval); -static int exp(int mayeval); +static int exponent(int mayeval); static int unary(int mayeval); static int factor(int mayeval); static int constant(int mayeval); static int num(int mayeval); -static int geteqrel(int mayeval); static int skipws(void); static void experr(const char *); @@ -388,16 +387,16 @@ primary(int mayeval) } /* - * term : exp { ("*" | "/" | "%") exp } + * term : exponent { ("*" | "/" | "%") exponent } */ static int term(int mayeval) { int c, vl, vr; - vl = exp(mayeval); + vl = exponent(mayeval); while ((c = skipws()) == '*' || c == '/' || c == '%') { - vr = exp(mayeval); + vr = exponent(mayeval); switch (c) { case '*': @@ -426,10 +425,10 @@ term(int mayeval) } /* - * exp : unary { "**" exp } + * exponent : unary { "**" exponent } */ static int -exp(int mayeval) +exponent(int mayeval) { int c, vl, vr, n; @@ -562,7 +561,7 @@ constant(int mayeval) * num : digit | num digit */ static int -num(int mayeval) +num(int mayeval __unused) { int rval, c, base; int ndig; Modified: head/usr.bin/m4/main.c == --- head/usr.bin/m4/main.c Sun Oct 16 08:04:43 2011(r226421) +++ head/usr.bin/m4/main.c Sun Oct 16 08:09:17 2011(r226422) @@ -34,9 +34,11 @@ */ #ifndef lint +#if 0 static char copyright[] = "@(#) Copyright (c) 1989, 1993\n\ The Regents of the University of California. All rights reserved.\n"; +#endif #endif /* not lint */ #ifndef lint ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226421 - in head/usr.bin: lzmainfo xzdec
Author: ed Date: Sun Oct 16 08:04:43 2011 New Revision: 226421 URL: http://svn.freebsd.org/changeset/base/226421 Log: Remove unneeded WARNS=3 lines. It seems these two tools can be built properly with WARNS=6, even on architectures that are stricter about alignment. Modified: head/usr.bin/lzmainfo/Makefile head/usr.bin/xzdec/Makefile Modified: head/usr.bin/lzmainfo/Makefile == --- head/usr.bin/lzmainfo/Makefile Sun Oct 16 07:57:01 2011 (r226420) +++ head/usr.bin/lzmainfo/Makefile Sun Oct 16 08:04:43 2011 (r226421) @@ -12,8 +12,6 @@ SRCS+=lzmainfo.c SRCS+= tuklib_progname.c \ tuklib_exit.c -WARNS?=3 - CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMALIBDIR} \ -I${XZDIR}/common Modified: head/usr.bin/xzdec/Makefile == --- head/usr.bin/xzdec/Makefile Sun Oct 16 07:57:01 2011(r226420) +++ head/usr.bin/xzdec/Makefile Sun Oct 16 08:04:43 2011(r226421) @@ -18,8 +18,6 @@ SRCS= xzdec.c SRCS+= tuklib_progname.c \ tuklib_exit.c -WARNS?=3 - CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMALIBDIR} \ -I${XZDIR}/common ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226420 - head/usr.bin/at
Author: ed Date: Sun Oct 16 07:57:01 2011 New Revision: 226420 URL: http://svn.freebsd.org/changeset/base/226420 Log: Build at(1) with NO_WFORMAT instead of WARNS=1. Modified: head/usr.bin/at/Makefile Modified: head/usr.bin/at/Makefile == --- head/usr.bin/at/MakefileSun Oct 16 07:36:27 2011(r226419) +++ head/usr.bin/at/MakefileSun Oct 16 07:57:01 2011(r226420) @@ -11,7 +11,7 @@ MLINKS= at.1 batch.1 \ at.1 atq.1 \ at.1 atrm.1 -WARNS?=1 +NO_WFORMAT= BINOWN=root BINMODE= 4555 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226419 - head/usr.bin/ruptime
Author: ed Date: Sun Oct 16 07:36:27 2011 New Revision: 226419 URL: http://svn.freebsd.org/changeset/base/226419 Log: Make some internal fixes to ruptime(1): - Prevent possible unaligned access to struct whoent. - Increase uptime column by one, to properly print hosts with an uptime greater than 1000 days. - Reduce code complexity by storing struct whod inside struct hs. - Set WARNS to 6. MFC after:3 months Modified: head/usr.bin/ruptime/Makefile head/usr.bin/ruptime/ruptime.c Modified: head/usr.bin/ruptime/Makefile == --- head/usr.bin/ruptime/Makefile Sun Oct 16 07:35:26 2011 (r226418) +++ head/usr.bin/ruptime/Makefile Sun Oct 16 07:36:27 2011 (r226419) @@ -3,6 +3,4 @@ PROG= ruptime -WARNS?=3 - .include Modified: head/usr.bin/ruptime/ruptime.c == --- head/usr.bin/ruptime/ruptime.c Sun Oct 16 07:35:26 2011 (r226418) +++ head/usr.bin/ruptime/ruptime.c Sun Oct 16 07:36:27 2011 (r226419) @@ -55,13 +55,12 @@ __FBSDID("$FreeBSD$"); #include struct hs { - struct whod *hs_wd; + struct whod hs_wd; int hs_nusers; } *hs; -struct whod awhod; -#define LEFTEARTH(h) (now - (h) > 4*24*60*60) -#defineISDOWN(h) (now - (h)->hs_wd->wd_recvtime > 11 * 60) -#defineWHDRSIZE(sizeof (awhod) - sizeof (awhod.wd_we)) +#defineLEFTEARTH(h)(now - (h) > 4*24*60*60) +#defineISDOWN(h) (now - (h)->hs_wd.wd_recvtime > 11 * 60) +#defineWHDRSIZE__offsetof(struct whod, wd_we) size_t nhosts; time_t now; @@ -127,10 +126,10 @@ interval(time_t tval, const char *updown int days, hours, minutes; if (tval < 0) { - (void)snprintf(resbuf, sizeof(resbuf), " %s ??:??", updown); + (void)snprintf(resbuf, sizeof(resbuf), "%s ??:??", updown); return (resbuf); } - /* round to minutes. */ + /* Round to minutes. */ minutes = (tval + (60 - 1)) / 60; hours = minutes / 60; minutes %= 60; @@ -138,10 +137,10 @@ interval(time_t tval, const char *updown hours %= 24; if (days) (void)snprintf(resbuf, sizeof(resbuf), - "%s %3d+%02d:%02d", updown, days, hours, minutes); + "%s %4d+%02d:%02d", updown, days, hours, minutes); else (void)snprintf(resbuf, sizeof(resbuf), - "%s %2d:%02d", updown, hours, minutes); + "%s %2d:%02d", updown, hours, minutes); return (resbuf); } @@ -152,7 +151,7 @@ int hscmp(const void *a1, const void *a2) { return (rflg * - strcmp(HS(a1)->hs_wd->wd_hostname, HS(a2)->hs_wd->wd_hostname)); + strcmp(HS(a1)->hs_wd.wd_hostname, HS(a2)->hs_wd.wd_hostname)); } /* Load average comparison. */ @@ -168,7 +167,7 @@ lcmp(const void *a1, const void *a2) return (-rflg); else return (rflg * - (HS(a2)->hs_wd->wd_loadav[0] - HS(a1)->hs_wd->wd_loadav[0])); + (HS(a2)->hs_wd.wd_loadav[0] - HS(a1)->hs_wd.wd_loadav[0])); } void @@ -179,10 +178,9 @@ ruptime(const char *host, int aflg, int struct whoent *we; struct dirent *dp; const char *hostname; - char buf[sizeof(struct whod)]; int fd, i, maxloadav; size_t hspace; - u_int cc; + ssize_t cc; rewinddir(dirp); hsp = NULL; @@ -195,18 +193,7 @@ ruptime(const char *host, int aflg, int warn("%s", dp->d_name); continue; } - cc = read(fd, buf, sizeof(struct whod)); - (void)close(fd); - if (host != NULL) { - hostname = ((struct whod *)buf)->wd_hostname; - if (strcasecmp(hostname, host) != 0) - continue; - } - if (cc < WHDRSIZE) - continue; - if (LEFTEARTH(((struct whod *)buf)->wd_recvtime)) - continue; if (nhosts == hspace) { if ((hs = realloc(hs, (hspace += 40) * sizeof(*hs))) == NULL) @@ -214,16 +201,26 @@ ruptime(const char *host, int aflg, int hsp = hs + nhosts; } - if ((hsp->hs_wd = malloc((size_t)WHDRSIZE)) == NULL) - err(1, NULL); - memmove(hsp->hs_wd, buf, (size_t)WHDRSIZE); + wd = &hsp->hs_wd; + cc = read(fd, wd, sizeof(*wd)); + (void)close(fd); + if (cc < (ssize_t)WHDRSIZE) +
svn commit: r226418 - head/usr.bin/gzip
Author: delphij Date: Sun Oct 16 07:35:26 2011 New Revision: 226418 URL: http://svn.freebsd.org/changeset/base/226418 Log: According to the NetBSD foundation [1]: Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license. We would also encourage you to inform us about these files, so that we can continue to track the many places in which NetBSD is used. http://www.netbsd.org/about/redistribution.html#why2clause [1] Requested by: joel@ Modified: head/usr.bin/gzip/unxz.c Modified: head/usr.bin/gzip/unxz.c == --- head/usr.bin/gzip/unxz.cSun Oct 16 07:29:50 2011(r226417) +++ head/usr.bin/gzip/unxz.cSun Oct 16 07:35:26 2011(r226418) @@ -15,13 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - *must display the following acknowledgement: - *This product includes software developed by the NetBSD - *Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - *contributors may be used to endorse or promote products derived - *from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r226416 - head/usr.bin/newgrp
Author: delphij Date: Sun Oct 16 07:05:43 2011 New Revision: 226416 URL: http://svn.freebsd.org/changeset/base/226416 Log: Partially revert r226274, the old code was right. Modified: head/usr.bin/newgrp/newgrp.c Modified: head/usr.bin/newgrp/newgrp.c == --- head/usr.bin/newgrp/newgrp.cSun Oct 16 05:37:56 2011 (r226415) +++ head/usr.bin/newgrp/newgrp.cSun Oct 16 07:05:43 2011 (r226416) @@ -220,7 +220,7 @@ addgroup(const char *grpname) /* Add old effective gid to supp. list if it does not exist. */ if (egid != grp->gr_gid && !inarray(egid, grps, ngrps)) { - if (ngrps + 1 >= ngrps_max) + if (ngrps == ngrps_max) warnx("too many groups"); else { grps[ngrps++] = egid; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"