From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 01:24:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BCDA106566C; Sun, 16 Oct 2011 01:24:59 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 96C6B8FC12; Sun, 16 Oct 2011 01:24:58 +0000 (UTC) Received: by ggeq3 with SMTP id q3so2747141gge.13 for ; Sat, 15 Oct 2011 18:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=GNw6A1J30hIkA4wKteidZDwSMhmRbWBA8RdRn0JnCbc=; b=tSysL1SvhCyq0j0yKrtcK+V1XGo3qUDAZS/VHCetQSZDJ23R40wC46GzUVB7HlPtL+ 3g4FSQgXDVw7Y6fSMKQzW9tbNOJsXWaQKWXW9LY5wZvH3hM2iUnUYNnz3tCk5qLYSPek 7/qRCZSoBMXjOWqnT8dDSxrzwGYGd27CJkMxQ= MIME-Version: 1.0 Received: by 10.236.178.41 with SMTP id e29mr19389524yhm.117.1318728297954; Sat, 15 Oct 2011 18:24:57 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.236.95.147 with HTTP; Sat, 15 Oct 2011 18:24:57 -0700 (PDT) In-Reply-To: <201110152123.p9FLN5Ht031202@svn.freebsd.org> References: <201110152123.p9FLN5Ht031202@svn.freebsd.org> Date: Sun, 16 Oct 2011 09:24:57 +0800 X-Google-Sender-Auth: FJmXmEaqmzXsqw_2uZEc7vwEpuY Message-ID: From: Adrian Chadd To: Ken Smith Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r226405 - in stable/9: . etc/defaults lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf sys/powerpc/conf sys/sparc64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 01:24:59 -0000 Hi! Would you consider leaving these in but just commenting them out? That way if a user hits a deadlock or memory corruption issue, we can just say "uncomment the section marked _debugging_ in your config file." Thanks, Adrian From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 01:26:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A56241065672; Sun, 16 Oct 2011 01:26:07 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2C1948FC17; Sun, 16 Oct 2011 01:26:07 +0000 (UTC) Received: by gyd8 with SMTP id 8so2721704gyd.13 for ; Sat, 15 Oct 2011 18:26:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=FEGnDoLQDHeeh39La+GkVae0bTcNyNNLXDm+lCLQ6f8=; b=vAVpQ/MRBFxIHKF1OjjoW6ppHA30HpZvTfGpLAH+xgXH/56M4Xw/Q1B7U4CAhGqDdf z1XuhSxJuMKdB8TLVjDiPJHF8K+WyU7y9rH/FPwqtnjafSDIPXxsCmy7LZ0Ki9PHdibT QJcaXblT7DO8kqvcDIQH+km0LPHSFLLYd1Qhw= MIME-Version: 1.0 Received: by 10.236.186.2 with SMTP id v2mr2607073yhm.83.1318728366641; Sat, 15 Oct 2011 18:26:06 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.236.95.147 with HTTP; Sat, 15 Oct 2011 18:26:06 -0700 (PDT) In-Reply-To: <201110152315.p9FNFtbM035080@svn.freebsd.org> References: <201110152315.p9FNFtbM035080@svn.freebsd.org> Date: Sun, 16 Oct 2011 09:26:06 +0800 X-Google-Sender-Auth: 13T2gBpUrvHsMstluQf14xiLFPc Message-ID: From: Adrian Chadd To: Nathan Whitehorn Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226410 - head/sys/powerpc/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 01:26:07 -0000 Thanks! I'm going to eventually fix the ath driver to always call bus_space_barrier() when doing stream bus calls. It's likely worthwhile doing a check to see which other drivers use the stream calls? Adrian From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 05:36:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 962361065673; Sun, 16 Oct 2011 05:36:23 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D1B68FC12; Sun, 16 Oct 2011 05:36:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G5aNnQ047085; Sun, 16 Oct 2011 05:36:23 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G5aNRU047083; Sun, 16 Oct 2011 05:36:23 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110160536.p9G5aNRU047083@svn.freebsd.org> From: David Schultz Date: Sun, 16 Oct 2011 05:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226411 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 05:36:23 -0000 Author: das Date: Sun Oct 16 05:36:23 2011 New Revision: 226411 URL: http://svn.freebsd.org/changeset/base/226411 Log: Remove an unused variable. Modified: head/lib/msun/src/e_log10f.c Modified: head/lib/msun/src/e_log10f.c ============================================================================== --- head/lib/msun/src/e_log10f.c Sat Oct 15 23:15:55 2011 (r226410) +++ head/lib/msun/src/e_log10f.c Sun Oct 16 05:36:23 2011 (r226411) @@ -32,7 +32,7 @@ static const float zero = 0.0; float __ieee754_log10f(float x) { - float f,hfsq,hi,lo,r,y,y2; + float f,hfsq,hi,lo,r,y; int32_t i,k,hx; GET_FLOAT_WORD(hx,x); From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 05:36:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E90031065670; Sun, 16 Oct 2011 05:36:39 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFF688FC08; Sun, 16 Oct 2011 05:36:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G5adXF047130; Sun, 16 Oct 2011 05:36:39 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G5adOW047127; Sun, 16 Oct 2011 05:36:39 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110160536.p9G5adOW047127@svn.freebsd.org> From: David Schultz Date: Sun, 16 Oct 2011 05:36:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226412 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 05:36:40 -0000 Author: das Date: Sun Oct 16 05:36:39 2011 New Revision: 226412 URL: http://svn.freebsd.org/changeset/base/226412 Log: Move the macros GET_LDBL_EXPSIGN() and SET_LDBL_EXPSIGN() into math_private.h, so they can be used elsewhere in the math library. Modified: head/lib/msun/src/e_hypotl.c head/lib/msun/src/math_private.h Modified: head/lib/msun/src/e_hypotl.c ============================================================================== --- head/lib/msun/src/e_hypotl.c Sun Oct 16 05:36:23 2011 (r226411) +++ head/lib/msun/src/e_hypotl.c Sun Oct 16 05:36:39 2011 (r226412) @@ -21,13 +21,6 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" -#define GET_LDBL_EXPSIGN(i, v) do { \ - union IEEEl2bits uv; \ - \ - uv.e = v; \ - i = uv.xbits.expsign; \ -} while (0) - #define GET_LDBL_MAN(h, l, v) do { \ union IEEEl2bits uv; \ \ @@ -36,14 +29,6 @@ __FBSDID("$FreeBSD$"); l = uv.bits.manl; \ } while (0) -#define SET_LDBL_EXPSIGN(v, i) do { \ - union IEEEl2bits uv; \ - \ - uv.e = v; \ - uv.xbits.expsign = i; \ - v = uv.e; \ -} while (0) - #undef GET_HIGH_WORD #define GET_HIGH_WORD(i, v) GET_LDBL_EXPSIGN(i, v) #undef SET_HIGH_WORD Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Sun Oct 16 05:36:23 2011 (r226411) +++ head/lib/msun/src/math_private.h Sun Oct 16 05:36:39 2011 (r226412) @@ -188,6 +188,25 @@ do { \ (d) = sf_u.value; \ } while (0) +/* Get expsign as a 16 bit int from a long double. */ + +#define GET_LDBL_EXPSIGN(i,d) \ +do { \ + union IEEEl2bits ge_u; \ + ge_u.e = (d); \ + (i) = ge_u.xbits.expsign; \ +} while (0) + +/* Set expsign of a long double from a 16 bit int. */ + +#define SET_LDBL_EXPSIGN(d,v) \ +do { \ + union IEEEl2bits se_u; \ + se_u.e = (d); \ + se_u.xbits.expsign = (v); \ + (d) = se_u.e; \ +} while (0) + #ifdef FLT_EVAL_METHOD /* * Attempt to get strict C99 semantics for assignment with non-C99 compilers. From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 05:37:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D819106568A; Sun, 16 Oct 2011 05:37:02 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D92C8FC12; Sun, 16 Oct 2011 05:37:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G5b29c047185; Sun, 16 Oct 2011 05:37:02 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G5b2x0047181; Sun, 16 Oct 2011 05:37:02 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110160537.p9G5b2x0047181@svn.freebsd.org> From: David Schultz Date: Sun, 16 Oct 2011 05:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226413 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 05:37:02 -0000 Author: das Date: Sun Oct 16 05:37:01 2011 New Revision: 226413 URL: http://svn.freebsd.org/changeset/base/226413 Log: Optimize the case of pure imaginary arguments. Calls like this are common, e.g., in DFT implementations. Discussed with: bde, kargl Modified: head/lib/msun/src/s_cexp.c head/lib/msun/src/s_cexpf.c Modified: head/lib/msun/src/s_cexp.c ============================================================================== --- head/lib/msun/src/s_cexp.c Sun Oct 16 05:36:39 2011 (r226412) +++ head/lib/msun/src/s_cexp.c Sun Oct 16 05:37:01 2011 (r226413) @@ -56,8 +56,12 @@ cexp(double complex z) /* cexp(x + I 0) = exp(x) + I 0 */ if ((hy | ly) == 0) return (cpack(exp(x), y)); + EXTRACT_WORDS(hx, lx, x); + /* cexp(0 + I y) = cos(y) + I sin(y) */ + if (((hx & 0x7fffffff) | lx) == 0) + return (cpack(cos(y), sin(y))); + if (hy >= 0x7ff00000) { - EXTRACT_WORDS(hx, lx, x); if (lx != 0 || (hx & 0x7fffffff) != 0x7ff00000) { /* cexp(finite|NaN +- I Inf|NaN) = NaN + I NaN */ return (cpack(y - y, y - y)); @@ -70,7 +74,6 @@ cexp(double complex z) } } - GET_HIGH_WORD(hx, x); if (hx >= exp_ovfl && hx <= cexp_ovfl) { /* * x is between 709.7 and 1454.3, so we must scale to avoid Modified: head/lib/msun/src/s_cexpf.c ============================================================================== --- head/lib/msun/src/s_cexpf.c Sun Oct 16 05:36:39 2011 (r226412) +++ head/lib/msun/src/s_cexpf.c Sun Oct 16 05:37:01 2011 (r226413) @@ -57,6 +57,10 @@ cexpf(float complex z) if (hy == 0) return (cpackf(expf(x), y)); GET_FLOAT_WORD(hx, x); + /* cexp(0 + I y) = cos(y) + I sin(y) */ + if ((hx & 0x7fffffff) == 0) + return (cpackf(cosf(y), sinf(y))); + if (hy >= 0x7f800000) { if ((hx & 0x7fffffff) != 0x7f800000) { /* cexp(finite|NaN +- I Inf|NaN) = NaN + I NaN */ From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 05:37:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E5A4106567A; Sun, 16 Oct 2011 05:37:21 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E9268FC0C; Sun, 16 Oct 2011 05:37:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G5bLKd047235; Sun, 16 Oct 2011 05:37:21 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G5bLEo047233; Sun, 16 Oct 2011 05:37:21 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110160537.p9G5bLEo047233@svn.freebsd.org> From: David Schultz Date: Sun, 16 Oct 2011 05:37:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226414 - head/lib/msun/bsdsrc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 05:37:21 -0000 Author: das Date: Sun Oct 16 05:37:20 2011 New Revision: 226414 URL: http://svn.freebsd.org/changeset/base/226414 Log: Fix some non-standard variable declarations. Modified: head/lib/msun/bsdsrc/b_exp.c Modified: head/lib/msun/bsdsrc/b_exp.c ============================================================================== --- head/lib/msun/bsdsrc/b_exp.c Sun Oct 16 05:37:01 2011 (r226413) +++ head/lib/msun/bsdsrc/b_exp.c Sun Oct 16 05:37:20 2011 (r226414) @@ -74,16 +74,16 @@ __FBSDID("$FreeBSD$"); #include "mathimpl.h" -const static double p1 = 0x1.555555555553ep-3; -const static double p2 = -0x1.6c16c16bebd93p-9; -const static double p3 = 0x1.1566aaf25de2cp-14; -const static double p4 = -0x1.bbd41c5d26bf1p-20; -const static double p5 = 0x1.6376972bea4d0p-25; -const static double ln2hi = 0x1.62e42fee00000p-1; -const static double ln2lo = 0x1.a39ef35793c76p-33; -const static double lnhuge = 0x1.6602b15b7ecf2p9; -const static double lntiny = -0x1.77af8ebeae354p9; -const static double invln2 = 0x1.71547652b82fep0; +static const double p1 = 0x1.555555555553ep-3; +static const double p2 = -0x1.6c16c16bebd93p-9; +static const double p3 = 0x1.1566aaf25de2cp-14; +static const double p4 = -0x1.bbd41c5d26bf1p-20; +static const double p5 = 0x1.6376972bea4d0p-25; +static const double ln2hi = 0x1.62e42fee00000p-1; +static const double ln2lo = 0x1.a39ef35793c76p-33; +static const double lnhuge = 0x1.6602b15b7ecf2p9; +static const double lntiny = -0x1.77af8ebeae354p9; +static const double invln2 = 0x1.71547652b82fep0; #if 0 double exp(x) From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 05:37:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A70B91065672; Sun, 16 Oct 2011 05:37:56 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 968408FC14; Sun, 16 Oct 2011 05:37:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G5buph047300; Sun, 16 Oct 2011 05:37:56 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G5bucm047292; Sun, 16 Oct 2011 05:37:56 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110160537.p9G5bucm047292@svn.freebsd.org> From: David Schultz Date: Sun, 16 Oct 2011 05:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226415 - in head/lib/msun: amd64 arm i387 ia64 mips powerpc sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 05:37:56 -0000 Author: das Date: Sun Oct 16 05:37:56 2011 New Revision: 226415 URL: http://svn.freebsd.org/changeset/base/226415 Log: Use #include "fenv.h" instead of #include . This makes it more convenient to compile the math library by itself. Requested by: bde Modified: head/lib/msun/amd64/fenv.c head/lib/msun/arm/fenv.c head/lib/msun/i387/fenv.c head/lib/msun/ia64/fenv.c head/lib/msun/mips/fenv.c head/lib/msun/powerpc/fenv.c head/lib/msun/sparc64/fenv.c Modified: head/lib/msun/amd64/fenv.c ============================================================================== --- head/lib/msun/amd64/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/amd64/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -31,7 +31,7 @@ #include #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/arm/fenv.c ============================================================================== --- head/lib/msun/arm/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/arm/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -27,7 +27,7 @@ */ #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/i387/fenv.c ============================================================================== --- head/lib/msun/i387/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/i387/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -31,7 +31,7 @@ #include #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/ia64/fenv.c ============================================================================== --- head/lib/msun/ia64/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/ia64/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -29,7 +29,7 @@ #include #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/mips/fenv.c ============================================================================== --- head/lib/msun/mips/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/mips/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -27,7 +27,7 @@ */ #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/powerpc/fenv.c ============================================================================== --- head/lib/msun/powerpc/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/powerpc/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -27,7 +27,7 @@ */ #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" Modified: head/lib/msun/sparc64/fenv.c ============================================================================== --- head/lib/msun/sparc64/fenv.c Sun Oct 16 05:37:20 2011 (r226414) +++ head/lib/msun/sparc64/fenv.c Sun Oct 16 05:37:56 2011 (r226415) @@ -27,7 +27,7 @@ */ #define __fenv_static -#include +#include "fenv.h" #ifdef __GNUC_GNU_INLINE__ #error "This file must be compiled with C99 'inline' semantics" From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 07:05:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D37AE1065672; Sun, 16 Oct 2011 07:05:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C36268FC12; Sun, 16 Oct 2011 07:05:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G75hDc050040; Sun, 16 Oct 2011 07:05:43 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G75hf8050038; Sun, 16 Oct 2011 07:05:43 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110160705.p9G75hf8050038@svn.freebsd.org> From: Xin LI Date: Sun, 16 Oct 2011 07:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226416 - head/usr.bin/newgrp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 07:05:43 -0000 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.c Sun Oct 16 05:37:56 2011 (r226415) +++ head/usr.bin/newgrp/newgrp.c Sun 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; From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 07:35:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35027106566C; Sun, 16 Oct 2011 07:35:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24CDA8FC12; Sun, 16 Oct 2011 07:35:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G7ZRIf051026; Sun, 16 Oct 2011 07:35:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G7ZRKG051024; Sun, 16 Oct 2011 07:35:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110160735.p9G7ZRKG051024@svn.freebsd.org> From: Xin LI Date: Sun, 16 Oct 2011 07:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226418 - head/usr.bin/gzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 07:35:27 -0000 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.c Sun Oct 16 07:29:50 2011 (r226417) +++ head/usr.bin/gzip/unxz.c Sun 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 From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 07:36:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0E3E106566B; Sun, 16 Oct 2011 07:36:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A014C8FC19; Sun, 16 Oct 2011 07:36:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G7aRdu051095; Sun, 16 Oct 2011 07:36:27 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G7aRks051092; Sun, 16 Oct 2011 07:36:27 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160736.p9G7aRks051092@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 07:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226419 - head/usr.bin/ruptime X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 07:36:27 -0000 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) -#define ISDOWN(h) (now - (h)->hs_wd->wd_recvtime > 11 * 60) -#define WHDRSIZE (sizeof (awhod) - sizeof (awhod.wd_we)) +#define LEFTEARTH(h) (now - (h) > 4*24*60*60) +#define ISDOWN(h) (now - (h)->hs_wd.wd_recvtime > 11 * 60) +#define WHDRSIZE __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) + continue; + + if (host != NULL) { + hostname = wd->wd_hostname; + if (strcasecmp(hostname, host) != 0) + continue; + } + if (LEFTEARTH(wd->wd_recvtime)) + continue; - for (wd = (struct whod *)buf, i = 0; i < 2; ++i) + for (i = 0; i < 2; i++) if (wd->wd_loadav[i] > maxloadav) maxloadav = wd->wd_loadav[i]; - for (hsp->hs_nusers = 0, - we = (struct whoent *)(buf + cc); --we >= wd->wd_we;) + for (hsp->hs_nusers = 0, we = &wd->wd_we[0]; + (char *)(we + 1) <= (char *)wd + cc; we++) if (aflg || we->we_idle < 3600) ++hsp->hs_nusers; ++hsp; @@ -239,25 +236,25 @@ ruptime(const char *host, int aflg, int qsort(hs, nhosts, sizeof(hs[0]), cmp); for (i = 0; i < (int)nhosts; i++) { hsp = &hs[i]; + wd = &hsp->hs_wd; if (ISDOWN(hsp)) { - (void)printf("%-25.25s%s\n", hsp->hs_wd->wd_hostname, - interval(now - hsp->hs_wd->wd_recvtime, "down")); + (void)printf("%-25.25s%s\n", wd->wd_hostname, + interval(now - hsp->hs_wd.wd_recvtime, "down")); continue; } (void)printf( "%-25.25s%s, %4d user%s load %*.2f, %*.2f, %*.2f\n", - hsp->hs_wd->wd_hostname, - interval((time_t)hsp->hs_wd->wd_sendtime - - (time_t)hsp->hs_wd->wd_boottime, " up"), + wd->wd_hostname, + interval((time_t)wd->wd_sendtime - + (time_t)wd->wd_boottime, " up"), hsp->hs_nusers, hsp->hs_nusers == 1 ? ", " : "s,", maxloadav >= 1000 ? 5 : 4, - hsp->hs_wd->wd_loadav[0] / 100.0, + wd->wd_loadav[0] / 100.0, maxloadav >= 1000 ? 5 : 4, - hsp->hs_wd->wd_loadav[1] / 100.0, + wd->wd_loadav[1] / 100.0, maxloadav >= 1000 ? 5 : 4, - hsp->hs_wd->wd_loadav[2] / 100.0); - free(hsp->hs_wd); + wd->wd_loadav[2] / 100.0); } free(hs); hs = NULL; @@ -283,11 +280,11 @@ int tcmp(const void *a1, const void *a2) { return (rflg * ( - (ISDOWN(HS(a2)) ? HS(a2)->hs_wd->wd_recvtime - now - : HS(a2)->hs_wd->wd_sendtime - HS(a2)->hs_wd->wd_boottime) + (ISDOWN(HS(a2)) ? HS(a2)->hs_wd.wd_recvtime - now + : HS(a2)->hs_wd.wd_sendtime - HS(a2)->hs_wd.wd_boottime) - - (ISDOWN(HS(a1)) ? HS(a1)->hs_wd->wd_recvtime - now - : HS(a1)->hs_wd->wd_sendtime - HS(a1)->hs_wd->wd_boottime) + (ISDOWN(HS(a1)) ? HS(a1)->hs_wd.wd_recvtime - now + : HS(a1)->hs_wd.wd_sendtime - HS(a1)->hs_wd.wd_boottime) )); } From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 07:57:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA6A9106566C; Sun, 16 Oct 2011 07:57:01 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 812608FC0A; Sun, 16 Oct 2011 07:57:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G7v144051765; Sun, 16 Oct 2011 07:57:01 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G7v1ch051763; Sun, 16 Oct 2011 07:57:01 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160757.p9G7v1ch051763@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 07:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226420 - head/usr.bin/at X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 07:57:01 -0000 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/Makefile Sun Oct 16 07:36:27 2011 (r226419) +++ head/usr.bin/at/Makefile Sun 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 From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 08:04:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CC941065670; Sun, 16 Oct 2011 08:04:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C9E48FC16; Sun, 16 Oct 2011 08:04:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G84h5V052047; Sun, 16 Oct 2011 08:04:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G84hAn052044; Sun, 16 Oct 2011 08:04:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160804.p9G84hAn052044@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226421 - in head/usr.bin: lzmainfo xzdec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:04:43 -0000 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 From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 08:09:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1092106564A; Sun, 16 Oct 2011 08:09:17 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6BA78FC0A; Sun, 16 Oct 2011 08:09:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G89HC4052276; Sun, 16 Oct 2011 08:09:17 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G89Hlq052272; Sun, 16 Oct 2011 08:09:17 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160809.p9G89Hlq052272@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226422 - head/usr.bin/m4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:09:18 -0000 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/Makefile Sun Oct 16 08:04:43 2011 (r226421) +++ head/usr.bin/m4/Makefile Sun 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 From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 08:14:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04ECD1065674; Sun, 16 Oct 2011 08:14:13 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D04C38FC1A; Sun, 16 Oct 2011 08:14:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G8ECSf052465; Sun, 16 Oct 2011 08:14:12 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G8ECbt052463; Sun, 16 Oct 2011 08:14:12 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160814.p9G8ECbt052463@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:14:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226423 - head/usr.bin/su X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:14:13 -0000 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/Makefile Sun Oct 16 08:09:17 2011 (r226422) +++ head/usr.bin/su/Makefile Sun Oct 16 08:14:12 2011 (r226423) @@ -5,8 +5,6 @@ PROG= su -WARNS?= 5 - DPADD= ${LIBUTIL} ${LIBPAM} LDADD= -lutil ${MINUSLPAM} From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 08:36:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A49B01065675; Sun, 16 Oct 2011 08:36:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94A188FC16; Sun, 16 Oct 2011 08:36:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G8aA79053168; Sun, 16 Oct 2011 08:36:10 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G8aA3E053166; Sun, 16 Oct 2011 08:36:10 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160836.p9G8aA3E053166@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:36:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226424 - head/usr.bin/systat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:36:10 -0000 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; From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 08:44:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DDF1106566B; Sun, 16 Oct 2011 08:44:04 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA068FC0A; Sun, 16 Oct 2011 08:44:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G8i4fF053441; Sun, 16 Oct 2011 08:44:04 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G8i4kX053438; Sun, 16 Oct 2011 08:44:04 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160844.p9G8i4kX053438@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226425 - in head: lib/libncp sys/netncp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:44:04 -0000 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 *); From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 08:45:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D5F8106564A; Sun, 16 Oct 2011 08:45:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DAAB8FC16; Sun, 16 Oct 2011 08:45:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G8jGex053519; Sun, 16 Oct 2011 08:45:16 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G8jG3K053517; Sun, 16 Oct 2011 08:45:16 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160845.p9G8jG3K053517@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226426 - head/lib/libsdp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:45:16 -0000 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) \ From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 08:54:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1DE21065672; Sun, 16 Oct 2011 08:54:41 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1DA08FC14; Sun, 16 Oct 2011 08:54:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G8sf9D053829; Sun, 16 Oct 2011 08:54:41 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G8sfLU053826; Sun, 16 Oct 2011 08:54:41 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160854.p9G8sfLU053826@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 08:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226427 - head/usr.bin/rwho X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 08:54:41 -0000 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.c Sun Oct 16 08:45:16 2011 (r226426) +++ head/usr.bin/rwho/rwho.c Sun 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, From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 09:09:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21B1D10657A3; Sun, 16 Oct 2011 09:09:34 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC7448FC0C; Sun, 16 Oct 2011 09:09:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9G99X54054363; Sun, 16 Oct 2011 09:09:33 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G99XkQ054361; Sun, 16 Oct 2011 09:09:33 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110160909.p9G99XkQ054361@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 09:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226428 - head/usr.bin/su X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 09:09:34 -0000 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/Makefile Sun Oct 16 08:54:41 2011 (r226427) +++ head/usr.bin/su/Makefile Sun Oct 16 09:09:33 2011 (r226428) @@ -5,6 +5,8 @@ PROG= su +WARNS?= 5 + DPADD= ${LIBUTIL} ${LIBPAM} LDADD= -lutil ${MINUSLPAM} From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 10:00:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE0641065686; Sun, 16 Oct 2011 10:00:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE0018FC1F; Sun, 16 Oct 2011 10:00:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GA0SkN056008; Sun, 16 Oct 2011 10:00:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GA0SeE056005; Sun, 16 Oct 2011 10:00:28 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110161000.p9GA0SeE056005@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 10:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226429 - head/usr.bin/ncplist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 10:00:29 -0000 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; From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 10:14:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E872D106564A; Sun, 16 Oct 2011 10:14:33 +0000 (UTC) (envelope-from stefanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D813E8FC0A; Sun, 16 Oct 2011 10:14:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GAEXZC057950; Sun, 16 Oct 2011 10:14:33 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GAEX4C057948; Sun, 16 Oct 2011 10:14:33 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201110161014.p9GAEX4C057948@svn.freebsd.org> From: Stefan Farfeleder Date: Sun, 16 Oct 2011 10:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226430 - head/contrib/gcc/config/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 10:14:34 -0000 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 * From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 10:30:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 662FA1065670; Sun, 16 Oct 2011 10:30:23 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 29DDE8FC14; Sun, 16 Oct 2011 10:30:22 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 57C097F382B; Sun, 16 Oct 2011 12:25:14 +0200 (CEST) Date: Sun, 16 Oct 2011 12:25:14 +0200 From: Roman Divacky To: Stefan Farfeleder Message-ID: <20111016102514.GA70944@freebsd.org> References: <201110161014.p9GAEX4C057948@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110161014.p9GAEX4C057948@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226430 - head/contrib/gcc/config/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 10:30:23 -0000 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 +0000, 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 * From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 10:58:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4E49106564A; Sun, 16 Oct 2011 10:58:00 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D50E68FC19; Sun, 16 Oct 2011 10:58:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GAw0cQ059341; Sun, 16 Oct 2011 10:58:00 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GAw0Wl059339; Sun, 16 Oct 2011 10:58:00 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110161058.p9GAw0Wl059339@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 10:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226431 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 10:58:01 -0000 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 { #define ui_ulen ui_u.uh_ulen #define ui_sum ui_u.uh_sum +struct inpcb; +struct mbuf; + typedef void(*udp_tun_func_t)(struct mbuf *, int off, struct inpcb *); /* From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 11:39:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53EA6106564A; Sun, 16 Oct 2011 11:39:07 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep32.mx.upcmail.net (fep32.mx.upcmail.net [62.179.121.50]) by mx1.freebsd.org (Postfix) with ESMTP id 202F18FC0C; Sun, 16 Oct 2011 11:39:05 +0000 (UTC) Received: from edge03.upcmail.net ([192.168.13.238]) by viefep18-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20111016112426.VUGG1564.viefep18-int.chello.at@edge03.upcmail.net>; Sun, 16 Oct 2011 13:24:26 +0200 Received: from mole.fafoe.narf.at ([213.47.85.26]) by edge03.upcmail.net with edge id lPQQ1h00z0a5KZh03PQRWt; Sun, 16 Oct 2011 13:24:26 +0200 X-SourceIP: 213.47.85.26 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 4BEBC6D41F; Sun, 16 Oct 2011 13:11:54 +0200 (CEST) Date: Sun, 16 Oct 2011 13:11:54 +0200 From: Stefan Farfeleder To: Roman Divacky Message-ID: <20111016111153.GA2283@mole.fafoe.narf.at> References: <201110161014.p9GAEX4C057948@svn.freebsd.org> <20111016102514.GA70944@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111016102514.GA70944@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Cloudmark-Analysis: v=1.1 cv=h6X7fkn2Y8psEldlT1JduSyVgv7YVLWttKdqKtnr7ik= c=1 sm=0 a=wom5GMh1gUkA:10 a=H8VswmBAHeYA:10 a=dBRESv0yCI8A:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=WwCa5mEH0ntyKeEHsIUA:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226430 - head/contrib/gcc/config/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 11:39:07 -0000 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 +0000, 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 * > From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 13:54:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB182106564A; Sun, 16 Oct 2011 13:54:46 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAE358FC13; Sun, 16 Oct 2011 13:54:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GDskuF065105; Sun, 16 Oct 2011 13:54:46 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GDskO6065103; Sun, 16 Oct 2011 13:54:46 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201110161354.p9GDskO6065103@svn.freebsd.org> From: Andre Oppermann Date: Sun, 16 Oct 2011 13:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226433 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 13:54:46 -0000 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 From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 14:11:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2A24106566C; Sun, 16 Oct 2011 14:11:05 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D23318FC08; Sun, 16 Oct 2011 14:11:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GEB5Ze065667; Sun, 16 Oct 2011 14:11:05 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GEB5TW065665; Sun, 16 Oct 2011 14:11:05 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201110161411.p9GEB5TW065665@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 16 Oct 2011 14:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226434 - head/usr.bin/elfdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 14:11:06 -0000 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"); From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 14:16:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F71D1065670; Sun, 16 Oct 2011 14:16:46 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3988FC0A; Sun, 16 Oct 2011 14:16:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GEGkwJ065868; Sun, 16 Oct 2011 14:16:46 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GEGkoC065866; Sun, 16 Oct 2011 14:16:46 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201110161416.p9GEGkoC065866@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 16 Oct 2011 14:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226435 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 14:16:46 -0000 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.c Sun Oct 16 14:11:05 2011 (r226434) +++ head/sys/kern/subr_prf.c Sun 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); } /* From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 14:30:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4A8B106566B; Sun, 16 Oct 2011 14:30:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B07418FC13; Sun, 16 Oct 2011 14:30:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GEUTVs066371; Sun, 16 Oct 2011 14:30:29 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GEUTFj066335; Sun, 16 Oct 2011 14:30:29 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201110161430.p9GEUTFj066335@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Oct 2011 14:30:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: 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... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 14:30:29 -0000 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.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/lib/libelf/elf_update.3 Sun 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 strerror 3 after .Fn ipsec_strerror -would overwrite the the return value from +would overwrite the return value from .Fn ipsec_strerror and make it invalid. .\" Modified: head/lib/libpmc/pmc.core.3 ============================================================================== --- head/lib/libpmc/pmc.core.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/lib/libpmc/pmc.core.3 Sun Oct 16 14:30:28 2011 (r226436) @@ -459,7 +459,7 @@ The number of instruction fetch misses i streaming buffers. .It Li ICache_Reads .Pq Event 80H , Umask 00H -The number of instruction fetches from the the instruction cache and +The number of instruction fetches from the instruction cache and streaming buffers counting both cacheable and un-cacheable fetches. .It Li IFU_Mem_Stall .Pq Event 86H , Umask 00H Modified: head/lib/msun/man/ieee.3 ============================================================================== --- head/lib/msun/man/ieee.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/lib/msun/man/ieee.3 Sun Oct 16 14:30:28 2011 (r226436) @@ -183,7 +183,7 @@ Type name: .Bd -ragged -offset indent -compact On some architectures, .Vt long double -is the the same as +is the same as .Vt double . .Ed .Pp Modified: head/libexec/rtld-elf/amd64/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/amd64/rtld_start.S Sun Oct 16 14:16:46 2011 (r226435) +++ head/libexec/rtld-elf/amd64/rtld_start.S Sun Oct 16 14:30:28 2011 (r226436) @@ -56,7 +56,7 @@ * and (2) "reloff", the byte offset of the appropriate relocation entry * in the PLT relocation table. * - * We are careful to preserve all registers, even the the caller-save + * We are careful to preserve all registers, even the caller-save * registers. That is because this code may be invoked by low-level * assembly-language code that is not ABI-compliant. * Modified: head/libexec/rtld-elf/i386/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/i386/rtld_start.S Sun Oct 16 14:16:46 2011 (r226435) +++ head/libexec/rtld-elf/i386/rtld_start.S Sun Oct 16 14:30:28 2011 (r226436) @@ -63,7 +63,7 @@ * and (2) "reloff", the byte offset of the appropriate relocation entry * in the PLT relocation table. * - * We are careful to preserve all registers, even the the caller-save + * We are careful to preserve all registers, even the caller-save * registers. That is because this code may be invoked by low-level * assembly-language code that is not ABI-compliant. */ Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Sun Oct 16 14:16:46 2011 (r226435) +++ head/sbin/geom/class/part/gpart.8 Sun Oct 16 14:30:28 2011 (r226436) @@ -371,7 +371,7 @@ Modify a partition from geom and further identified by the .Fl i Ar index option. -Only the the type and/or label of the partition can be modified. +Only the type and/or label of the partition can be modified. To change the type of a partition, specify the new type with the .Fl t Ar type option. Modified: head/sbin/init/init.8 ============================================================================== --- head/sbin/init/init.8 Sun Oct 16 14:16:46 2011 (r226435) +++ head/sbin/init/init.8 Sun Oct 16 14:30:28 2011 (r226436) @@ -147,7 +147,7 @@ When this shell dies, either because the user logged out or an abnormal termination occurred (a signal), .Nm login -records the logout in the the user accounting +records the logout in the user accounting database (see .Xr getutxent 3) and terminates. Modified: head/secure/lib/libcrypto/man/engine.3 ============================================================================== --- head/secure/lib/libcrypto/man/engine.3 Sun Oct 16 14:16:46 2011 (r226435) +++ head/secure/lib/libcrypto/man/engine.3 Sun Oct 16 14:30:28 2011 (r226436) @@ -653,7 +653,7 @@ implemented by ENGINEs should be numbere this symbol is considered a \*(L"generic\*(R" command is handled directly by the OpenSSL core routines. .PP -It is using these \*(L"core\*(R" control commands that one can discover the the control +It is using these \*(L"core\*(R" control commands that one can discover the control commands implemented by a given \s-1ENGINE\s0, specifically the commands; .PP .Vb 9 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. .IP "\fB\-out filename\fR" 4 .IX Item "-out filename" the output file to output certificates to. The default is standard Modified: head/secure/usr.bin/openssl/man/dgst.1 ============================================================================== --- head/secure/usr.bin/openssl/man/dgst.1 Sun Oct 16 14:16:46 2011 (r226435) +++ head/secure/usr.bin/openssl/man/dgst.1 Sun Oct 16 14:30:28 2011 (r226436) @@ -184,7 +184,7 @@ the private key password source. For mor see the \fB\s-1PASS\s0 \s-1PHRASE\s0 \s-1ARGUMENTS\s0\fR section in \fIopenssl\fR\|(1). .IP "\fB\-verify filename\fR" 4 .IX Item "-verify filename" -verify the signature using the the public key in \*(L"filename\*(R". +verify the signature using the public key in \*(L"filename\*(R". The output is either \*(L"Verification \s-1OK\s0\*(R" or \*(L"Verification Failure\*(R". .IP "\fB\-prverify filename\fR" 4 .IX Item "-prverify filename" Modified: head/share/doc/psd/03.iosys/iosys ============================================================================== --- head/share/doc/psd/03.iosys/iosys Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/doc/psd/03.iosys/iosys Sun Oct 16 14:30:28 2011 (r226436) @@ -813,7 +813,7 @@ which have a separate argument which indicates read or write. .IP B_DONE 10 This bit is set -to 0 when a block is handed to the the device strategy +to 0 when a block is handed to the device strategy routine and is turned on when the operation completes, whether normally as the result of an error. It is also used as part of the return argument of Modified: head/share/doc/psd/23.rpc/rpc.prog.ms ============================================================================== --- head/share/doc/psd/23.rpc/rpc.prog.ms Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/doc/psd/23.rpc/rpc.prog.ms Sun Oct 16 14:30:28 2011 (r226436) @@ -317,7 +317,7 @@ look up the appropriate program, version in a manual, just as you look up the name of a memory allocator when you want to allocate memory. .LP -The simplest way of making remote procedure calls is with the the RPC +The simplest way of making remote procedure calls is with the RPC library routine .I callrpc() It has eight parameters. The first is the name of the remote server @@ -1105,7 +1105,7 @@ Note that, after being used, the charact .I svc_freeargs() .I svc_freeargs() will not attempt to free any memory if the variable indicating it -is NULL. For example, in the the routine +is NULL. For example, in the routine .I xdr_finalexample (), given earlier, if .I finalp->string Modified: head/share/doc/psd/24.xdr/xdr.nts.ms ============================================================================== --- head/share/doc/psd/24.xdr/xdr.nts.ms Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/doc/psd/24.xdr/xdr.nts.ms Sun Oct 16 14:30:28 2011 (r226436) @@ -721,7 +721,7 @@ it must not exceed .I maxlength . Next .I sp -is dereferenced; if the the value is +is dereferenced; if the value is .I NULL , then a string of the appropriate length is allocated and .I *sp Modified: head/share/doc/psd/27.nfsrpc/nfs.rfc.ms ============================================================================== --- head/share/doc/psd/27.nfsrpc/nfs.rfc.ms Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/doc/psd/27.nfsrpc/nfs.rfc.ms Sun Oct 16 14:30:28 2011 (r226436) @@ -961,7 +961,7 @@ call to get more entries starting at a given point in the directory. The special cookie zero (all bits zero) can be used to get the entries starting at the beginning of the directory. The "fileid" field should be the same number as the -"fileid" in the the attributes of the file. (See the +"fileid" in the attributes of the file. (See the .I "Basic Data Types" section.) The "eof" flag has a value of Modified: head/share/man/man4/dc.4 ============================================================================== --- head/share/man/man4/dc.4 Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/man/man4/dc.4 Sun Oct 16 14:30:28 2011 (r226436) @@ -55,7 +55,7 @@ if_dc_load="YES" The .Nm driver provides support for several PCI Fast Ethernet adapters and -embedded controllers based on the the DEC/Intel 21143 chipset and clones. +embedded controllers based on the DEC/Intel 21143 chipset and clones. .Pp All of supported chipsets have the same general register layout, DMA descriptor format and method of operation. Modified: head/share/man/man9/sleepqueue.9 ============================================================================== --- head/share/man/man9/sleepqueue.9 Sun Oct 16 14:16:46 2011 (r226435) +++ head/share/man/man9/sleepqueue.9 Sun Oct 16 14:30:28 2011 (r226436) @@ -351,7 +351,7 @@ argument specifies the thread to awaken argument specifies the wait channel to awaken it from. If the thread .Fa td -is not blocked on the the wait channel +is not blocked on the wait channel .Fa wchan then this function will not do anything, even if the thread is asleep on a different wait channel. Modified: head/sys/boot/powerpc/boot1.chrp/generate-hfs.sh ============================================================================== --- head/sys/boot/powerpc/boot1.chrp/generate-hfs.sh Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/boot/powerpc/boot1.chrp/generate-hfs.sh Sun Oct 16 14:30:28 2011 (r226436) @@ -29,7 +29,7 @@ hmkdir ppc hattrib -b ppc hcd ppc -# Make two dummy files for the the CHRP boot script and boot1 +# Make two dummy files for the CHRP boot script and boot1 echo 'Bootinfo START' | dd of=bootinfo.txt.tmp cbs=$CHRPBOOT_SIZE count=1 conv=block echo 'Boot1 START' | dd of=boot1.elf.tmp cbs=$BOOT1_SIZE count=1 conv=block Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c ============================================================================== --- head/sys/dev/ath/ath_dfs/null/dfs_null.c Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/ath/ath_dfs/null/dfs_null.c Sun Oct 16 14:30:28 2011 (r226436) @@ -128,7 +128,7 @@ ath_dfs_process_radar_event(struct ath_s } /* - * Determine whether the the DFS check task needs to be queued. + * Determine whether the DFS check task needs to be queued. * * This is called in the RX task when the current batch of packets * have been received. It will return whether there are any radar Modified: head/sys/dev/bxe/bxe_link.c ============================================================================== --- head/sys/dev/bxe/bxe_link.c Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/bxe/bxe_link.c Sun Oct 16 14:30:28 2011 (r226436) @@ -2586,7 +2586,7 @@ bxe_8726_read_sfp_module_eeprom(struct l if (byte_cnt > 16) { DBPRINT(sc, BXE_VERBOSE_PHY, - "Reading from eeprom is is limited to 0xf\n"); + "Reading from eeprom is limited to 0xf\n"); return (-EINVAL); } /* Set the read command byte count. */ @@ -2655,7 +2655,7 @@ bxe_8727_read_sfp_module_eeprom(struct l if (byte_cnt > 16) { DBPRINT(sc, BXE_VERBOSE_PHY, - "Reading from eeprom is is limited to 0xf\n"); + "Reading from eeprom is limited to 0xf\n"); return (-EINVAL); } Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/e1000/e1000_82575.c Sun Oct 16 14:30:28 2011 (r226436) @@ -1983,7 +1983,7 @@ out: * e1000_reset_mdicnfg_82580 - Reset MDICNFG destination and com_mdio bits * @hw: pointer to the HW structure * - * This resets the the MDICNFG.Destination and MDICNFG.Com_MDIO bits based on + * This resets the MDICNFG.Destination and MDICNFG.Com_MDIO bits based on * the values found in the EEPROM. This addresses an issue in which these * bits are not restored from EEPROM after reset. **/ Modified: head/sys/dev/isp/DriverManual.txt ============================================================================== --- head/sys/dev/isp/DriverManual.txt Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/isp/DriverManual.txt Sun Oct 16 14:30:28 2011 (r226436) @@ -165,7 +165,7 @@ and saves the QLogic HBA from having to The QLogic HBA is an interrupting card, and when servicing an interrupt you really only have to check for either a mailbox interrupt or an -interrupt notification that the the response queue has an entry to +interrupt notification that the response queue has an entry to be dequeued. 4.3 Fibre Channel SCSI out of SCSI @@ -327,7 +327,7 @@ here in clarifying some of this. A succesful execution of isp_init will lead to the driver 'registering' itself with this platform's SCSI subsystem. One assumed action for this -is the registry of a function the the SCSI subsystem for this platform +is the registry of a function the SCSI subsystem for this platform will call when it has a SCSI command to run. The platform specific module function that receives this will do whatever Modified: head/sys/dev/vxge/include/vxgehal-config.h ============================================================================== --- head/sys/dev/vxge/include/vxgehal-config.h Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/vxge/include/vxgehal-config.h Sun Oct 16 14:30:28 2011 (r226436) @@ -1665,7 +1665,7 @@ typedef struct vxge_hal_mrpcim_config_t * the interrupt is triggered. * @rtimer_event_sf: Restriction Timer Event Scale Factor. A scale factor that * is to be applied to the current event count before it is added - * to the restriction timer value when the the restriction timer + * to the restriction timer value when the restriction timer * is started. * The scale factor is applied as a right or left shift to multiply * or divide by the event count. The programmable values are as Modified: head/sys/dev/vxge/include/vxgehal-ll.h ============================================================================== --- head/sys/dev/vxge/include/vxgehal-ll.h Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/vxge/include/vxgehal-ll.h Sun Oct 16 14:30:28 2011 (r226436) @@ -1590,7 +1590,7 @@ vxge_hal_ring_rxd_post( * vxge_hal_ring_is_next_rxd_completed - Check if the next rxd is completed * @vpath_handle: Virtual Path handle. * - * Checks if the the _next_ completed descriptor is in host memory + * Checks if the _next_ completed descriptor is in host memory * * Returns: VXGE_HAL_OK - success. * VXGE_HAL_INF_NO_MORE_COMPLETED_DESCRIPTORS - No completed descriptors Modified: head/sys/dev/vxge/vxgehal/vxgehal-ring.c ============================================================================== --- head/sys/dev/vxge/vxgehal/vxgehal-ring.c Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/dev/vxge/vxgehal/vxgehal-ring.c Sun Oct 16 14:30:28 2011 (r226436) @@ -1339,7 +1339,7 @@ vxge_hal_ring_rxd_post_post_db( * vxge_hal_ring_is_next_rxd_completed - Check if the next rxd is completed * @vpath_handle: Virtual Path handle. * - * Checks if the the _next_ completed descriptor is in host memory + * Checks if the _next_ completed descriptor is in host memory * * Returns: VXGE_HAL_OK - success. * VXGE_HAL_INF_NO_MORE_COMPLETED_DESCRIPTORS - No completed descriptors Modified: head/sys/mips/nlm/cms.c ============================================================================== --- head/sys/mips/nlm/cms.c Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/mips/nlm/cms.c Sun Oct 16 14:30:28 2011 (r226436) @@ -82,7 +82,7 @@ static struct msgring_thread msgring_thr static struct proc *msgring_proc; /* all threads are under a proc */ /* - * The device drivers can register a handler for the the messages sent + * The device drivers can register a handler for the messages sent * from a station (corresponding to the device). */ struct tx_stn_handler { Modified: head/sys/netinet/ipfw/dummynet.txt ============================================================================== --- head/sys/netinet/ipfw/dummynet.txt Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/netinet/ipfw/dummynet.txt Sun Oct 16 14:30:28 2011 (r226436) @@ -325,7 +325,7 @@ we do the following: dummynet_task() =============== -The dummynet_task() is the the main dummynet processing function and is +The dummynet_task() is the main dummynet processing function and is called every tick. This function first calculate the new current time, then it checks if it is the time to wake up object from the system_heap comparing the current time and the key of the heap. Two types of object (really the Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig Sun Oct 16 14:16:46 2011 (r226435) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig Sun Oct 16 14:30:28 2011 (r226436) @@ -21,7 +21,7 @@ config INFINIBAND_SDP_DEBUG_DATA bool "Sockets Direct Protocol data path debugging" depends on INFINIBAND_SDP_DEBUG ---help--- - This option compiles debugging code into the the data path + This option compiles debugging code into the data path of the SDP driver. The output can be turned on via the data_debug_level module parameter; however, even with output turned off, this debugging code will have some performance Modified: head/usr.bin/compress/doc/NOTES ============================================================================== --- head/usr.bin/compress/doc/NOTES Sun Oct 16 14:16:46 2011 (r226435) +++ head/usr.bin/compress/doc/NOTES Sun Oct 16 14:30:28 2011 (r226436) @@ -51,7 +51,7 @@ comprehensive survey of an area which wi Until the dust clears, how you approach ideas which are patented depends on how paranoid you are of a legal onslaught. Arbitrary? Yes. But -the patent bar the the CCPA (Court of Customs and Patent Appeals) +the patent bar the CCPA (Court of Customs and Patent Appeals) thanks you for any uncertainty as they, at least, stand to gain from any trouble. 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 */ ch = strrchr(pkgname, '-'); /* Cheat if we are just passed a version, not a valid package name */ versionstr = ch ? ch + 1 : pkgname; Modified: head/usr.sbin/tcpdump/tcpdump/tcpdump.1 ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Sun Oct 16 14:16:46 2011 (r226435) +++ head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Sun Oct 16 14:30:28 2011 (r226436) @@ -1413,11 +1413,11 @@ not be useful to people who are not fami AFS and RX. .LP If the -v (verbose) flag is given twice, acknowledgement packets and -additional header information is printed, such as the the RX call ID, +additional header information is printed, such as the RX call ID, call number, sequence number, serial number, and the RX packet flags. .LP If the -v flag is given twice, additional information is printed, -such as the the RX call ID, serial number, and the RX packet flags. +such as the RX call ID, serial number, and the RX packet flags. The MTU negotiation information is also printed from RX ack packets. .LP If the -v flag is given three times, the security index and service id From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 15:08:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EA0C106566B; Sun, 16 Oct 2011 15:08:44 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DDEF8FC0C; Sun, 16 Oct 2011 15:08:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GF8icB067655; Sun, 16 Oct 2011 15:08:44 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GF8hIc067651; Sun, 16 Oct 2011 15:08:43 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201110161508.p9GF8hIc067651@svn.freebsd.org> From: Andre Oppermann Date: Sun, 16 Oct 2011 15:08:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226437 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 15:08:44 -0000 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.c Sun Oct 16 14:30:28 2011 (r226436) +++ head/sys/netinet/tcp_input.c Sun 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; +#define V_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 +#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"); /* * 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); #define V_tcp_minmss VNET(tcp_minmss) #define V_tcp_delack_enabled VNET(tcp_delack_enabled) #define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) +#define V_tcp_sendspace VNET(tcp_sendspace) +#define V_tcp_recvspace VNET(tcp_recvspace) #define V_path_mtu_discovery VNET(path_mtu_discovery) #define V_ss_fltsz VNET(ss_fltsz) #define V_ss_fltsz_local VNET(ss_fltsz_local) @@ -716,8 +720,6 @@ void tcp_hc_updatemtu(struct in_conninf void tcp_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 *); void tcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq); From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 15:55:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14F05106566C; Sun, 16 Oct 2011 15:55:24 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03E778FC0A; Sun, 16 Oct 2011 15:55:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GFtNpe069359; Sun, 16 Oct 2011 15:55:23 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GFtNmT069357; Sun, 16 Oct 2011 15:55:23 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201110161555.p9GFtNmT069357@svn.freebsd.org> From: Ken Smith Date: Sun, 16 Oct 2011 15:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226438 - stable/9/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 15:55:24 -0000 Author: kensmith Date: Sun Oct 16 15:55:23 2011 New Revision: 226438 URL: http://svn.freebsd.org/changeset/base/226438 Log: Ready for RC1. Approved by: re (implicit) Modified: stable/9/sys/conf/newvers.sh Modified: stable/9/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Sun Oct 16 15:08:43 2011 (r226437) +++ stable/9/sys/conf/newvers.sh Sun Oct 16 15:55:23 2011 (r226438) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.0" -BRANCH="BETA3" +BRANCH="RC1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 16:02:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19CE71065673; Sun, 16 Oct 2011 16:02:08 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id BDF8A8FC08; Sun, 16 Oct 2011 16:02:07 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 50089850; Sun, 16 Oct 2011 17:46:56 +0200 (CEST) Date: Sun, 16 Oct 2011 17:46:12 +0200 From: Pawel Jakub Dawidek To: Christian Brueffer Message-ID: <20111016154611.GA1832@garage.freebsd.pl> References: <201110151557.p9FFvuuc020536@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: <201110151557.p9FFvuuc020536@svn.freebsd.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226398 - head/sys/dev/iicbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 16:02:08 -0000 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 15, 2011 at 03:57:56PM +0000, Christian Brueffer wrote: > Author: brueffer > Date: Sat Oct 15 15:57:55 2011 > New Revision: 226398 > URL: http://svn.freebsd.org/changeset/base/226398 >=20 > Log: > Properly free resources in an error case. > =20 > CID: 4203 > Found with: Coverity Prevent(tm) > MFC after: 1 week >=20 > Modified: > head/sys/dev/iicbus/iic.c >=20 > Modified: head/sys/dev/iicbus/iic.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- 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 =3D malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); > usrbufs =3D malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITO= K); > error =3D 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. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --/04w6evG8XlLl3ft Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk6a/EMACgkQForvXbEpPzRoewCgiEM/YOUQpHgZyfj3G/SJ7nnc nW0AoL/Ec8dM5QzJW6NMFxgwfyM/QgCW =X6L5 -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 16:05:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5681B106564A; Sun, 16 Oct 2011 16:05:24 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CC6F8FC13; Sun, 16 Oct 2011 16:05:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GG5NPd069706; Sun, 16 Oct 2011 16:05:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GG5Npt069704; Sun, 16 Oct 2011 16:05:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110161605.p9GG5Npt069704@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 16 Oct 2011 16:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226439 - head/usr.sbin/kbdmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 16:05:24 -0000 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); } From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 16:58:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28D381065670; Sun, 16 Oct 2011 16:58:29 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 184A18FC0C; Sun, 16 Oct 2011 16:58:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GGwS7K071396; Sun, 16 Oct 2011 16:58:28 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GGwSuL071394; Sun, 16 Oct 2011 16:58:28 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201110161658.p9GGwSuL071394@svn.freebsd.org> From: Olivier Houchard Date: Sun, 16 Oct 2011 16:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226440 - head/sbin/atm/atmconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 16:58:29 -0000 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/Makefile Sun Oct 16 16:05:23 2011 (r226439) +++ head/sbin/atm/atmconfig/Makefile Sun 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 From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 17:09:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 767D5106566B; Sun, 16 Oct 2011 17:09:58 +0000 (UTC) (envelope-from SRS0=Y50X=47=FreeBSD.org=brueffer@srs.kundenserver.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id 06E048FC14; Sun, 16 Oct 2011 17:09:57 +0000 (UTC) Received: from hd5b90bea.sedadby.dyn.perspektivbredband.net (hd5b90bea.sedadby.dyn.perspektivbredband.net [213.185.11.234]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0Mccy4-1RX9Or03DE-00Hgdn; Sun, 16 Oct 2011 18:57:21 +0200 Message-ID: <4E9B0CEE.7000809@FreeBSD.org> Date: Sun, 16 Oct 2011 18:57:18 +0200 From: Christian Brueffer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201110151557.p9FFvuuc020536@svn.freebsd.org> <20111016154611.GA1832@garage.freebsd.pl> In-Reply-To: <20111016154611.GA1832@garage.freebsd.pl> Content-Type: multipart/mixed; boundary="------------040404080201060701070605" X-Provags-ID: V02:K0:6QiO0+ryfkYjRi0WOAvzaXFrvr2kRVFsvjPvoB9TVkE GURb9ARhgH9dqEV7d1pC8/LWKAUCX8MzO6yqXRY+4PAQZLQwpr eBb7as/rgZqzhxogE3MBcXS7DGn+IeOjHaMbjomQdEGrUtBcF9 vC17TScHAA+m3sKOGp3keVbdPgptCJ3Dp0wa06NYFtEKom01v/ 7bY9/vlNRNz2brQsxDug4BNXpLo1ZV/jnci07msLML/ZW+y8LU zYxVWZVoz/RarJWohZyBB1006P6liPD4C/vlxCAxldySmNkoX/ 4xjvAEHfY0FHFQ2iwND1FmBKnAj8aRx70IF2KfNmFyAFDE3/Td dnCNh9DE0XV2V4Y3PnEGsqjAtNE80SMnuWn1fYd0shduTanF0d OPAEohwkg0znGJzuF518ri+N/G3z9TqV8A= Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226398 - head/sys/dev/iicbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:09:58 -0000 This is a multi-part message in MIME format. --------------040404080201060701070605 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/16/11 17:46 , Pawel Jakub Dawidek wrote: > On Sat, Oct 15, 2011 at 03:57:56PM +0000, 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? --------------040404080201060701070605 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="iic.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="iic.c.diff" 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; --------------040404080201060701070605-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 17:21:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 813B11065673; Sun, 16 Oct 2011 17:21:16 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 2925D8FC0A; Sun, 16 Oct 2011 17:21:15 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 8580F896; Sun, 16 Oct 2011 19:21:13 +0200 (CEST) Date: Sun, 16 Oct 2011 19:20:28 +0200 From: Pawel Jakub Dawidek To: Christian Brueffer Message-ID: <20111016172028.GB1832@garage.freebsd.pl> References: <201110151557.p9FFvuuc020536@svn.freebsd.org> <20111016154611.GA1832@garage.freebsd.pl> <4E9B0CEE.7000809@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1UWUbFP1cBYEclgG" Content-Disposition: inline In-Reply-To: <4E9B0CEE.7000809@FreeBSD.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226398 - head/sys/dev/iicbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:21:16 -0000 --1UWUbFP1cBYEclgG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > > >=20 > Agreed, how about the attached patch? Looks good. > Index: iic.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- iic.c (revision 226398) > +++ iic.c (working copy) > @@ -346,13 +346,11 @@ > =20 > case I2CRDWR: > buf =3D malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); > - usrbufs =3D malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITO= K); > error =3D 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 =3D malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITO= K); > for (i =3D 0; i < d->nmsgs; i++) { > m =3D &((struct iic_msg *)buf)[i]; > usrbufs[i] =3D m->buf; --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --1UWUbFP1cBYEclgG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk6bElwACgkQForvXbEpPzQRBQCgmeXbugKIMbWQUNpiMxc/C/WK c+0AnjflxBSwg7ugzEnRGK/lfcc/CEei =dpbp -----END PGP SIGNATURE----- --1UWUbFP1cBYEclgG-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 17:37:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DF38106566C; Sun, 16 Oct 2011 17:37:55 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DAFE8FC18; Sun, 16 Oct 2011 17:37:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GHbsf6072697; Sun, 16 Oct 2011 17:37:54 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GHbsen072695; Sun, 16 Oct 2011 17:37:54 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201110161737.p9GHbsen072695@svn.freebsd.org> From: Olivier Houchard Date: Sun, 16 Oct 2011 17:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226441 - head/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:37:55 -0000 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 = 0xffffffff; } SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 17:38:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF95B1065786; Sun, 16 Oct 2011 17:38:20 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F1928FC0A; Sun, 16 Oct 2011 17:38:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GHcKil072747; Sun, 16 Oct 2011 17:38:20 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GHcKFk072745; Sun, 16 Oct 2011 17:38:20 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110161738.p9GHcKFk072745@svn.freebsd.org> From: Christian Brueffer Date: Sun, 16 Oct 2011 17:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226442 - head/sys/dev/iicbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:38:20 -0000 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; From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 17:39:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 679791065670 for ; Sun, 16 Oct 2011 17:39:56 +0000 (UTC) (envelope-from bounces+73574-8822-svn-src-all=freebsd.org@sendgrid.me) Received: from o1.shared.sendgrid.net (o1.shared.sendgrid.net [74.63.231.244]) by mx1.freebsd.org (Postfix) with SMTP id 1FA558FC08 for ; Sun, 16 Oct 2011 17:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=/2ucajSE+27ftwV1d9J2o3nGWgo=; b=X5IzVz9euvzREKqVSdCxiUIk6e0F pusGmNsRbsY0+R+Ok3CXnWpeL27tvSlBQftRxchgbSPt+zKh+VvMmUgsDWlCywKR j1gOXPyO/hWqY3W+DwdUKkA2dPuHhXR1w9cak2qYSyUsVe6ZL1heyy7Yy76iuSmC n2zJRIkyFomX+f8= Received: by 10.4.35.204 with SMTP id mf47.16553.4E9B12A51 Sun, 16 Oct 2011 12:21:41 -0500 (CDT) Received: from mail.tarsnap.com (unknown [10.9.180.5]) by mi11 (SG) with ESMTP id 4e9b12a5.53cd.3a1a4de for ; Sun, 16 Oct 2011 12:21:41 -0500 (CST) Received: (qmail 55642 invoked from network); 16 Oct 2011 17:19:22 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by mail.tarsnap.com with ESMTP; 16 Oct 2011 17:19:22 -0000 Received: (qmail 77746 invoked from network); 16 Oct 2011 17:21:12 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 16 Oct 2011 17:21:12 -0000 Message-ID: <4E9B1287.4050507@freebsd.org> Date: Sun, 16 Oct 2011 10:21:11 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0.2) Gecko/20110914 Thunderbird/6.0.2 MIME-Version: 1.0 To: Ed Schouten References: <201110140724.p9E7OmMB052118@svn.freebsd.org> In-Reply-To: <201110140724.p9E7OmMB052118@svn.freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Sendgrid-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PEZF+cs4LtmiSxPsZymrCYDe7WtdHSyo8HH6pLYDA4m6UCuEEqmexMb8o995pzmQMbFFXrBinOuP7oUY2TjAYz3uphWSKMRAlrQYj1K32GwMGlnV2zvfW0x7rFoOe3WsHk= Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226359 - head/usr.bin/look X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:39:56 -0000 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 From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 17:59:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 810B9106566C; Sun, 16 Oct 2011 17:59:28 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66B248FC0C; Sun, 16 Oct 2011 17:59:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GHxSGx073445; Sun, 16 Oct 2011 17:59:28 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GHxSsC073442; Sun, 16 Oct 2011 17:59:28 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201110161759.p9GHxSsC073442@svn.freebsd.org> From: Olivier Houchard Date: Sun, 16 Oct 2011 17:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226443 - head/sys/arm/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 17:59:28 -0000 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 Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76F84106564A; Sun, 16 Oct 2011 18:20:34 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 12D358FC08; Sun, 16 Oct 2011 18:20:34 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 1DE842A28CC5; Sun, 16 Oct 2011 20:20:33 +0200 (CEST) Date: Sun, 16 Oct 2011 20:20:33 +0200 From: Ed Schouten To: Colin Percival Message-ID: <20111016182033.GS91943@hoeg.nl> References: <201110140724.p9E7OmMB052118@svn.freebsd.org> <4E9B1287.4050507@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Taf0VO/VdHaNBIEp" Content-Disposition: inline In-Reply-To: <4E9B1287.4050507@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226359 - head/usr.bin/look X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 18:20:34 -0000 --Taf0VO/VdHaNBIEp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * 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) =3D -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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- look.c (revision 226430) +++ look.c (working copy) @@ -134,7 +134,7 @@ do { if ((fd =3D 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 =3D=3D 0) { close(fd); %%% --=20 Ed Schouten WWW: http://80386.nl/ --Taf0VO/VdHaNBIEp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJOmyBwAAoJEG5e2P40kaK71ekQAITQU+dcxuPCm/xTaEU6CNOP /6C/zxPIpfOakYRb/qqAFMkyIukYVifgxc7FIpQ7+Nq0sgnc8wPB8btW7Daw4669 VOPjeuVfDOQpg+QBncuETRANlDABJd0TyBtNsh0ZWJLwDFfDtZTSt++0yWzmkoJ9 Cqu318bd61oUEyM7Xr8QX8/autANAaiYjbPmOIi4yFUxEA74Wn/ExncqTjdytTvQ vXnpSHJOqUPbD3WEKLOiJEp1AkxTqLgIMovLpITEmlM4x3qLDKebAg3ysTudmrI8 QbXBp2xME5YVRJa/KrBV5gp0I/juvAeoh0+ngr7xH6Gq/+qexxpBrDq+n+WSWZgC rjZhcRzoBk+qedkqq8nVJjkIooKuSAkD/Hrzjon0IKz+odG92miJLRdVBV+5jeZz 2BoRUcUGGAn4OGNigzEhvbmH90dYYbVHPkSyP4xWcio20PJvMMoPTewt8Z8ZQ2IX TbmSz7Z1zJ6TART5Str1WTX7GdwGgGsTDVAqHg+cPrBKEjbUVA2w2VR8gbX8uhfq orMqueW1Ycav7EjuVIJBypAjqiychOYt7FRenE8MInwthFAeyZxzhHtaSETTclD5 XWEjIIwW5xP7f2aZNX2pO/ziIULuIeNkGvr52BXRmfNvC0JMoV4q+dFiF8gOGXYQ Edp9CE9cs1eRDcXeheT8 =5U1D -----END PGP SIGNATURE----- --Taf0VO/VdHaNBIEp-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 18:39:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD0FF106567A for ; Sun, 16 Oct 2011 18:39:11 +0000 (UTC) (envelope-from bounces+73574-8822-svn-src-all=freebsd.org@sendgrid.me) Received: from o2.shared.sendgrid.net (o2.shared.sendgrid.net [74.63.235.152]) by mx1.freebsd.org (Postfix) with SMTP id 945EE8FC15 for ; Sun, 16 Oct 2011 18:39:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=Aok4ZANUptSZF/k6pBjI3PMACp8=; b=F0b4te2vR1a+JachKlzRlFpLIzHj l/34QLN2+ZYLQtUQDfEUpU7Ec22dDYVdlePIzHyWDpHNje0MgkPHVnwq6Wta850p NGI4Vw1TAQINtWjlRTqecUYjNonuIPkTLNz5Wy0dYgr5uXgaeJOZg2gBC1q0Enz+ RtXboMYExf2k+sQ= Received: by 10.8.49.96 with SMTP id mf44.27880.4E9B24CE10 Sun, 16 Oct 2011 13:39:10 -0500 (CDT) Received: from mail.tarsnap.com (unknown [10.9.180.5]) by mi10 (SG) with ESMTP id 4e9b24ce.e7c.1217c47 for ; Sun, 16 Oct 2011 13:39:10 -0500 (CST) Received: (qmail 56256 invoked from network); 16 Oct 2011 18:36:51 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by mail.tarsnap.com with ESMTP; 16 Oct 2011 18:36:51 -0000 Received: (qmail 78187 invoked from network); 16 Oct 2011 18:38:40 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 16 Oct 2011 18:38:40 -0000 Message-ID: <4E9B24B0.60106@freebsd.org> Date: Sun, 16 Oct 2011 11:38:40 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0.2) Gecko/20110914 Thunderbird/6.0.2 MIME-Version: 1.0 To: Ed Schouten References: <201110140724.p9E7OmMB052118@svn.freebsd.org> <4E9B1287.4050507@freebsd.org> <20111016182033.GS91943@hoeg.nl> In-Reply-To: <20111016182033.GS91943@hoeg.nl> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Sendgrid-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PGWq5JTZXdwYRai3TdLtBxi37ZSTa4K2Y2xCjp2cS4WN1j2fbGD8iqM9qvF4QROUsU4I6gwnpXvSTWIYIPr4LQHS/3Ya9vbQece7LGy0D/OkoE9MnroNbfDlUXhqOZ/93E= Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226359 - head/usr.bin/look X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 18:39:12 -0000 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 From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 18:57:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 4B06B106564A; Sun, 16 Oct 2011 18:57:59 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id F1C7114E12A; Sun, 16 Oct 2011 18:57:58 +0000 (UTC) Message-ID: <4E9B2936.6040108@FreeBSD.org> Date: Sun, 16 Oct 2011 11:57:58 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Eitan Adler References: <201110161430.p9GEUTFj066335@svn.freebsd.org> In-Reply-To: <201110161430.p9GEUTFj066335@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, lstewart@FreeBSD.org, svn-src-all@freebsd.org, src-committers@freebsd.org, sahil@FreeBSD.org Subject: 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 sb... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 18:57:59 -0000 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/ From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 19:11:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 167561065672; Sun, 16 Oct 2011 19:11:55 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 9697A8FC14; Sun, 16 Oct 2011 19:11:54 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 68BD025D38A1; Sun, 16 Oct 2011 19:11:53 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 5D1AEBD3C56; Sun, 16 Oct 2011 19:11:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id gmHE7q7kYirc; Sun, 16 Oct 2011 19:11:51 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 3B21EBD3C39; Sun, 16 Oct 2011 19:11:51 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201110131720.p9DHKjWn024920@svn.freebsd.org> Date: Sun, 16 Oct 2011 19:11:50 +0000 Content-Transfer-Encoding: 7bit Message-Id: <20E8F22B-A5C5-490F-B225-55EE2B5A7350@lists.zabbadoz.net> References: <201110131720.p9DHKjWn024920@svn.freebsd.org> To: Dag-Erling Smorgrav , Xin LI X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226345 - in head: etc/rc.d sbin/dhclient; Re: svn commit: r225849 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 19:11:55 -0000 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 ?? Is 0:00.00 dhclient: em0 [priv] (dhclient) 971 ?? Is 0:00.00 dhclient: em0 (dhclient) 1491 0 RL+ 0:00.00 grep dhc % Which also means I have inet 0.0.0.0 netmask 0xff000000 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. From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 19:15:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98D31106566B; Sun, 16 Oct 2011 19:15:25 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88CE08FC13; Sun, 16 Oct 2011 19:15:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GJFPlb075847; Sun, 16 Oct 2011 19:15:25 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GJFPpo075845; Sun, 16 Oct 2011 19:15:25 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110161915.p9GJFPpo075845@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 19:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226444 - head/usr.bin/look X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 19:15:25 -0000 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.c Sun Oct 16 17:59:28 2011 (r226443) +++ head/usr.bin/look/look.c Sun 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); From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 19:23:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A3DA1065674; Sun, 16 Oct 2011 19:23:44 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A4AD8FC15; Sun, 16 Oct 2011 19:23:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GJNhaU076147; Sun, 16 Oct 2011 19:23:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GJNhsT076145; Sun, 16 Oct 2011 19:23:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110161923.p9GJNhsT076145@svn.freebsd.org> From: Ed Schouten Date: Sun, 16 Oct 2011 19:23:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226445 - head/usr.bin/look X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 19:23:44 -0000 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.c Sun Oct 16 19:15:25 2011 (r226444) +++ head/usr.bin/look/look.c Sun Oct 16 19:23:43 2011 (r226445) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 19:46:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DE5A106566B; Sun, 16 Oct 2011 19:46:53 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 142A58FC12; Sun, 16 Oct 2011 19:46:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GJkqGT077137; Sun, 16 Oct 2011 19:46:52 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GJkqeP077135; Sun, 16 Oct 2011 19:46:52 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201110161946.p9GJkqeP077135@svn.freebsd.org> From: Hiroki Sato Date: Sun, 16 Oct 2011 19:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226446 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 19:46:53 -0000 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; From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 20:06:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADFD3106564A; Sun, 16 Oct 2011 20:06:44 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92B208FC0A; Sun, 16 Oct 2011 20:06:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GK6ia0077803; Sun, 16 Oct 2011 20:06:44 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GK6ite077799; Sun, 16 Oct 2011 20:06:44 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201110162006.p9GK6ite077799@svn.freebsd.org> From: Andre Oppermann Date: Sun, 16 Oct 2011 20:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226447 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 20:06:44 -0000 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.c Sun Oct 16 19:46:52 2011 (r226446) +++ head/sys/netinet/tcp_input.c Sun 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; #define V_tcp_do_tso VNET(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); #define V_tcb VNET(tcb) @@ -623,8 +621,6 @@ VNET_DECLARE(int, tcp_abc_l_var); #define V_tcp_sendspace VNET(tcp_sendspace) #define V_tcp_recvspace VNET(tcp_recvspace) #define V_path_mtu_discovery VNET(path_mtu_discovery) -#define V_ss_fltsz VNET(ss_fltsz) -#define V_ss_fltsz_local VNET(ss_fltsz_local) #define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465) #define V_tcp_abc_l_var VNET(tcp_abc_l_var) From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 20:18:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28CF51065670; Sun, 16 Oct 2011 20:18:40 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEC5A8FC0A; Sun, 16 Oct 2011 20:18:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GKIdf3078341; Sun, 16 Oct 2011 20:18:39 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GKId7c078337; Sun, 16 Oct 2011 20:18:39 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201110162018.p9GKId7c078337@svn.freebsd.org> From: Andre Oppermann Date: Sun, 16 Oct 2011 20:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226448 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 20:18:40 -0000 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.c Sun Oct 16 20:06:44 2011 (r226447) +++ head/sys/netinet/tcp_input.c Sun 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 +#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"); + VNET_DEFINE(int, tcp_do_autorcvbuf) = 1; #define V_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; +#define V_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; #define V_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; -#define V_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 -#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"); - -/* * Attach TCP protocol to socket, allocating * internet protocol control block, tcp control block, * bufer space, and entering LISTEN state if to accept connections. From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 21:01:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 578541065673; Sun, 16 Oct 2011 21:01:43 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4481F8FC18; Sun, 16 Oct 2011 21:01:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GL1hgH079694; Sun, 16 Oct 2011 21:01:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GL1hJX079685; Sun, 16 Oct 2011 21:01:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110162101.p9GL1hJX079685@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 16 Oct 2011 21:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226449 - in head: etc/devd share/man/man4/man4.powerpc sys/conf sys/dev/adb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 21:01:43 -0000 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.conf Sun 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 following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device adb" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the extended Fn keys on Apple notebooks with an ADB +interface. +.Sh HARDWARE +The +.Nm +driver supports extended keyboard keys (special F-keys) on the following devices: +.Pp +.Bl -bullet -compact +.It +Apple iBook Keyboard +.It +Apple PowerBook Keyboard +.El +.Sh EVENTS +The +.Nm +driver sends events to +.Xr devd 8 +for the following events under the +.Cd PMU +system, and +.Cd keys +subsystem: +.Pp +.Bl -bullet -compact +.It +.Cd brightness +- Generates +.Cd up +and +.Cd down +notify types matching the pressed key. +.It +.Cd mute +.It +.Cd volume +- Generates +.Cd up +and +.Cd down +notify types matching the pressed key. +.It +.Cd eject +.El +.Pp +Examples are included in /etc/devd/apple.conf. +.Sh SEE ALSO +.Xr adb 4 , +.Xr akbd 4 , +.Xr cuda 4 , +.Xr pmu 4, +.Xr devd 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Nx 5.0 +and was ported to +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Tsubai Masanari +for +.Nx +and ported to +.Fx +by +.An Justin Hibbits . Modified: head/share/man/man4/man4.powerpc/akbd.4 ============================================================================== --- head/share/man/man4/man4.powerpc/akbd.4 Sun Oct 16 20:18:39 2011 (r226448) +++ head/share/man/man4/man4.powerpc/akbd.4 Sun Oct 16 21:01:42 2011 (r226449) @@ -58,7 +58,36 @@ Apple iBook Keyboard .It Apple PowerBook Keyboard .El +.Sh EVENTS +The +.Nm +driver sends events to +.Xr devd 8 +for the following events under the +.Cd PMU +system: +.Pp +.Bl -bullet -compact +.It +Power button - +.Cd "Button" +subsystem, +.Cd "pressed" +type. +.El +.Sh SYSCTL VARIABLES +The +.Nm +driver supports the following sysctl variable for configuring the Fn keys: +.Bl -tag -width indent +.It Va dev.akbd.%d.fn_keys_function_as_primary +Set the Fn keys to be their F-key type as default. A value of 0 causes the +F-keys keys to work as special keys by default ( +.Xr abtn 4 ) +and a value of 1 sets them to behave as F-keys by default. +.El .Sh SEE ALSO +.Xr abtn 4 , .Xr adb 4 , .Xr cuda 4 , .Xr pmu 4 Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Oct 16 20:18:39 2011 (r226448) +++ head/sys/conf/files.powerpc Sun Oct 16 21:01:42 2011 (r226449) @@ -22,6 +22,7 @@ dev/adb/adb_kbd.c optional adb dev/adb/adb_mouse.c optional adb dev/adb/adb_hb_if.m optional adb dev/adb/adb_if.m optional adb +dev/adb/adb_buttons.c optional adb dev/agp/agp_apple.c optional agp powermac dev/cfi/cfi_bus_fdt.c optional cfi fdt dev/fb/fb.c optional sc Added: head/sys/dev/adb/adb_buttons.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/adb/adb_buttons.c Sun Oct 16 21:01:42 2011 (r226449) @@ -0,0 +1,165 @@ +/*- + * Copyright (c) 2011, Justin Hibbits. + * Copyright (c) 2002, Miodrag Vallat. + * Copyright (C) 1999 Tsubai Masanari. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 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. + * + * OpenBSD: abtn.c,v 1.12 2009/01/10 18:00:59 robert Exp + * NetBSD: abtn.c,v 1.1 1999/07/12 17:48:26 tsubai Exp + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include + +#define ABTN_HANDLER_ID 31 + +struct abtn_softc { + device_t sc_dev; + + int handler_id; +}; + +static int abtn_probe(device_t dev); +static int abtn_attach(device_t dev); +static u_int abtn_receive_packet(device_t dev, u_char status, + u_char command, u_char reg, int len, u_char *data); + +static device_method_t abtn_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, abtn_probe), + DEVMETHOD(device_attach, abtn_attach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* ADB interface */ + DEVMETHOD(adb_receive_packet, abtn_receive_packet), + + { 0, 0 } +}; + +static driver_t abtn_driver = { + "abtn", + abtn_methods, + sizeof(struct abtn_softc), +}; + +static devclass_t abtn_devclass; + +DRIVER_MODULE(abtn, adb, abtn_driver, abtn_devclass, 0, 0); + +static int +abtn_probe(device_t dev) +{ + uint8_t type; + + type = adb_get_device_type(dev); + + if (type != ADB_DEVICE_MISC) + return (ENXIO); + + device_set_desc(dev, "ADB Brightness/Volume/Eject Buttons"); + return (0); +} + +static int +abtn_attach(device_t dev) +{ + struct abtn_softc *sc; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + sc->handler_id = adb_get_device_handler(dev); + + return 0; +} + +static u_int +abtn_receive_packet(device_t dev, u_char status, + u_char command, u_char reg, int len, u_char *data) +{ + u_int cmd; + + cmd = data[0]; + + switch (cmd) { + case 0x0a: /* decrease brightness */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "brightness", + "notify=down"); + break; + + case 0x09: /* increase brightness */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "brightness", "notify=up"); + break; + + case 0x08: /* mute */ + case 0x01: /* mute, AV hardware */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "mute", NULL); + break; + case 0x07: /* decrease volume */ + case 0x02: /* decrease volume, AV hardware */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "volume", "notify=down"); + break; + case 0x06: /* increase volume */ + case 0x03: /* increase volume, AV hardware */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "volume", "notify=up"); + break; + case 0x0c: /* mirror display key */ + /* Need callback to do something with this */ + break; + case 0x0b: /* eject tray */ + if (devctl_process_running()) + devctl_notify("PMU", "keys", "eject", NULL); + case 0x7f: /* numlock */ + /* Need callback to do something with this */ + break; + + default: +#ifdef DEBUG + if ((cmd & ~0x7f) == 0) + device_printf(dev, "unknown ADB button 0x%x\n", cmd); +#endif + break; + } + return 0; +} + Modified: head/sys/dev/adb/adb_kbd.c ============================================================================== --- head/sys/dev/adb/adb_kbd.c Sun Oct 16 20:18:39 2011 (r226448) +++ head/sys/dev/adb/adb_kbd.c Sun Oct 16 21:01:42 2011 (r226449) @@ -35,12 +35,15 @@ #include #include #include +#include #include #include "opt_kbd.h" #include #include +#include +#include #include #include @@ -55,6 +58,7 @@ static int adb_kbd_probe(device_t dev); static int adb_kbd_attach(device_t dev); static int adb_kbd_detach(device_t dev); static void akbd_repeat(void *xsc); +static int adb_fn_keys(SYSCTL_HANDLER_ARGS); static u_int adb_kbd_receive_packet(device_t dev, u_char status, u_char command, u_char reg, int len, u_char *data); @@ -282,6 +286,8 @@ adb_kbd_attach(device_t dev) { struct adb_kbd_softc *sc; keyboard_switch_t *sw; + uint32_t fkeys; + phandle_t handle; sw = kbd_get_switch(KBD_DRIVER_NAME); if (sw == NULL) { @@ -333,6 +339,40 @@ adb_kbd_attach(device_t dev) adb_set_autopoll(dev,1); + handle = OF_finddevice("mac-io/via-pmu/adb/keyboard"); + if (handle != -1 && OF_getprop(handle, "AAPL,has-embedded-fn-keys", + &fkeys, sizeof(fkeys)) != -1) { + static const char *key_names[] = {"F1", "F2", "F3", "F4", "F5", + "F6", "F7", "F8", "F9", "F10", "F11", "F12"}; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + int i; + + if (bootverbose) + device_printf(dev, "Keyboard has embedded Fn keys\n"); + + for (i = 0; i < 12; i++) { + uint32_t keyval; + char buf[3]; + if (OF_getprop(handle, key_names[i], &keyval, + sizeof(keyval)) < 0) + continue; + buf[0] = 1; + buf[1] = i+1; + buf[2] = keyval; + adb_write_register(dev, 0, 3, buf); + } + adb_write_register(dev, 1, 2, &(uint16_t){0}); + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "fn_keys_function_as_primary", CTLTYPE_INT | CTLFLAG_RW, sc, + 0, adb_fn_keys, "I", + "Set the Fn keys to be their F-key type as default"); + } + return (0); } @@ -383,6 +423,13 @@ adb_kbd_receive_packet(device_t dev, u_c return (0); mtx_lock(&sc->sc_mutex); + /* 0x7f is always the power button */ + if (data[0] == 0x7f && devctl_process_running()) { + devctl_notify("PMU", "Button", "pressed", NULL); + return (0); + } else if (data[0] == 0xff) { + return (0); /* Ignore power button release. */ + } if ((data[0] & 0x7f) == 57 && sc->buffers < 7) { /* Fake the down/up cycle for caps lock */ sc->buffer[sc->buffers++] = data[0] & 0x7f; @@ -390,7 +437,6 @@ adb_kbd_receive_packet(device_t dev, u_c } else { sc->buffer[sc->buffers++] = data[0]; } - if (sc->buffer[sc->buffers-1] < 0xff) sc->last_press = sc->buffer[sc->buffers-1]; @@ -814,5 +860,29 @@ akbd_modevent(module_t mod, int type, vo return (0); } +static int +adb_fn_keys(SYSCTL_HANDLER_ARGS) +{ + struct adb_kbd_softc *sc = arg1; + int error; + uint16_t is_fn_enabled; + unsigned int is_fn_enabled_sysctl; + + adb_read_register(sc->sc_dev, 1, &is_fn_enabled); + is_fn_enabled &= 1; + is_fn_enabled_sysctl = is_fn_enabled; + error = sysctl_handle_int(oidp, &is_fn_enabled_sysctl, 0, req); + + if (error || !req->newptr) + return (error); + + is_fn_enabled = is_fn_enabled_sysctl; + if (is_fn_enabled != 1 && is_fn_enabled != 0) + return (EINVAL); + + adb_write_register(sc->sc_dev, 1, 2, &is_fn_enabled); + return (0); +} + DEV_MODULE(akbd, akbd_modevent, NULL); From owner-svn-src-all@FreeBSD.ORG Sun Oct 16 21:30:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94501106564A; Sun, 16 Oct 2011 21:30:15 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78CB48FC0A; Sun, 16 Oct 2011 21:30:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9GLUFe4080627; Sun, 16 Oct 2011 21:30:15 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9GLUFuw080624; Sun, 16 Oct 2011 21:30:15 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110162130.p9GLUFuw080624@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 16 Oct 2011 21:30:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226450 - head/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 21:30:15 -0000 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 = 5000000; 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 = 5000000; + for (;;) { + errno = pidfile_read(pfh->pf_path