From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 01:11:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 3CBB71065670; Sun, 9 Oct 2011 01:11:41 +0000 (UTC) Date: Sun, 9 Oct 2011 01:11:41 +0000 From: Alexander Best To: Ed Schouten Message-ID: <20111009011141.GA63608@freebsd.org> References: <201109290631.p8T6VgJ3008377@svn.freebsd.org> <20110929121457.GA53600@freebsd.org> <20111001130643.GC91943@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111001130643.GC91943@hoeg.nl> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Edward Tomasz Napierala Subject: Re: svn commit: r225868 - head/bin/ps 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, 09 Oct 2011 01:11:41 -0000 On Sat Oct 1 11, Ed Schouten wrote: > * Alexander Best , 20110929 14:14: > > i think i wrote you about the two spaces between the "TT" and "TIME" field > > some time ago. you said that the "TT" entry can contain a postfix "-". can > > you describe a situation, where this can occur? i've never seen the "TT" field > > contain an entry larger than 2 chars. > > Also, it would be better if we replaced the "??" string with "-". When > we print "??", it actually means: this process has no controlling > terminal, not that we don't know which TTY it is. i've adjusted ps(1) and now the output looks like this: otaku% ps -xOtty,tdev PID TTY TDEV TT STAT TIME COMMAND 1427 - - - Is 15:02,64 /usr/local/bin/musicpd /usr/local/etc/musicpd.conf 1692 - - - Is 0:00,15 ssh-agent 1740 - - - Ss 0:00,69 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session 1744 - - - Is 10:02,33 /usr/local/bin/sakura 1746 - - - S 3:24,25 /usr/local/libexec/gam_server 45117 - - - Ss 3:29,84 /usr/local/bin/pidgin 55734 - - - Is 17:03,48 /usr/local/bin/python2.7 /usr/local/bin/sonata 63888 - - - Is 3:21,53 chromium-browser: (chrome) 63889 - - - I 0:05,26 chromium-browser: (chrome) 63890 - - - I 0:00,43 chrome: --type=zygote (chrome) 63891 - - - S 0:50,87 chrome: --type=zygote (chrome) 63892 - - - I 0:21,03 chrome: --type=zygote (chrome) 63893 - - - I 0:06,14 chrome: --type=zygote (chrome) 63894 - - - S 0:21,96 chrome: --type=zygote (chrome) 63904 - - - I 0:08,63 chrome: --type=zygote (chrome) 63905 - - - I 0:03,64 chrome: --type=zygote (chrome) 63907 - - - S 0:38,14 chrome: --type=zygote (chrome) 63908 - - - S 0:33,20 chrome: --type=zygote (chrome) 63909 - - - S 0:14,13 chrome: --type=zygote (chrome) 63910 - - - S 0:14,96 chrome: --type=zygote (chrome) 63911 - - - S 0:21,98 chrome: --type=zygote (chrome) 63913 - - - I 0:06,10 chrome: --type=zygote (chrome) 63914 - - - I 0:05,95 chrome: --type=zygote (chrome) 63915 - - - I 0:03,11 chrome: --type=zygote (chrome) 63916 - - - S 0:20,96 chrome: --type=zygote (chrome) 63917 - - - I 0:09,19 chrome: --type=zygote (chrome) 64191 - - - Z 0:07,58 64270 - - - I 0:31,20 chrome: --type=zygote (chrome) 64271 - - - I 0:12,39 chrome: --type=zygote (chrome) 64326 - - - I 0:08,61 chrome: --type=zygote (chrome) 64327 - - - I 0:03,11 chrome: --type=zygote (chrome) 64341 - - - I 0:05,40 chrome: --type=zygote (chrome) 64361 - - - I 0:12,72 chrome: --type=zygote (chrome) 64664 - - - Z 0:00,60 65411 - - - S 0:00,01 /usr/local/bin/pidgin 1664 ttyv0 0x2f v0 IW 0:00,00 -zsh (zsh) 1712 ttyv0 0x2f v0 IW+ 0:00,00 /bin/sh /usr/local/bin/startx 1730 ttyv0 0x2f v0 IW+ 0:00,00 xinit /home/arundel/.xinitrc -- /home/arundel/.xserverrc :0 -auth /home/arundel/.serverauth.1712 1734 ttyv0 0x2f v0 IW 0:00,00 sh /home/arundel/.xinitrc 1735 ttyv0 0x2f v0 S 39:35,89 /usr/local/bin/awesome 1739 ttyv0 0x2f v0 I 0:00,00 dbus-launch --autolaunch 1210d605f192e5e97cd9d23a00043997 --binary-syntax --close-stderr 55738 pts/0 0x6b 0 IWs 0:00,00 /usr/local/bin/zsh 62073 pts/0 0x6b 0 I+ 0:02,11 ssh hub 64131 pts/5 0x6c 5 Is+ 0:00,09 /usr/local/bin/zsh 64134 pts/6 0x96 6 Is+ 0:00,50 /usr/local/bin/zsh 63523 pts/1 0x99 1 Is+ 0:00,10 /usr/local/bin/zsh 63586 pts/2 0x9a 2 Is 0:00,05 /usr/local/bin/zsh 64254 pts/2 0x9a 2 I+ 0:00,37 ssh hub 63656 pts/3 0x9c 3 Is 0:00,22 /usr/local/bin/zsh 64267 pts/3 0x9c 3 I+ 0:00,63 ssh freefall 64382 pts/7 0x9d 7 Ss 0:00,16 /usr/local/bin/zsh 65413 pts/7 0x9d 7 R+ 0:00,00 ps -xOtty,tdev 64384 pts/8 0x9e 8 Is 0:00,13 /usr/local/bin/zsh 64470 pts/8 0x9e 8 I 0:00,12 zsh 64642 pts/8 0x9e 8 I+ 0:00,09 edit machine.c 64484 pts/9 0x9f 9 Is+ 0:00,24 /usr/local/bin/zsh is this what you had in mind? cheers. alex > > -- > Ed Schouten > WWW: http://80386.nl/ From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 06:34: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 E9258106564A; Sun, 9 Oct 2011 06:34:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 81E718FC0A; Sun, 9 Oct 2011 06:34:22 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p996YLEr047335; Sun, 9 Oct 2011 10:34:21 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p996YKb0047334; Sun, 9 Oct 2011 10:34:21 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 9 Oct 2011 10:34:20 +0400 From: Gleb Smirnoff To: melifaro@FreeBSD.org Message-ID: <20111009063420.GZ94905@FreeBSD.org> References: <201109151228.p8FCSHVY073618@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201109151228.p8FCSHVY073618@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, "Andrey V. Elsukov" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r225586 - in head/sys: modules/netgraph/ipfw netgraph 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, 09 Oct 2011 06:34:23 -0000 Alexander, Andrey, see a couple of comments below please. On Thu, Sep 15, 2011 at 12:28:17PM +0000, Andrey V. Elsukov wrote: A> Author: ae A> Date: Thu Sep 15 12:28:17 2011 A> New Revision: 225586 A> URL: http://svn.freebsd.org/changeset/base/225586 A> A> Log: A> Add IPv6 support to the ng_ipfw(4) [1]. Also add ifdefs to be able A> build it with and without INET/INET6 support. A> A> Submitted by: Alexander V. Chernikov [1] A> Tested by: Alexander V. Chernikov [1] A> Approved by: re (bz) A> MFC after: 2 weeks A> A> Modified: A> head/sys/modules/netgraph/ipfw/Makefile A> head/sys/netgraph/ng_ipfw.c A> A> Modified: head/sys/modules/netgraph/ipfw/Makefile A> ============================================================================== A> --- head/sys/modules/netgraph/ipfw/Makefile Thu Sep 15 12:27:26 2011 (r225585) A> +++ head/sys/modules/netgraph/ipfw/Makefile Thu Sep 15 12:28:17 2011 (r225586) A> @@ -1,6 +1,20 @@ A> # $FreeBSD$ A> A> +.include A> + A> KMOD= ng_ipfw A> -SRCS= ng_ipfw.c A> +SRCS= ng_ipfw.c opt_inet.h opt_inet6.h A> + A> +.if !defined(KERNBUILDDIR) A> + A> +.if ${MK_INET_SUPPORT} != "no" A> +opt_inet.h: A> + echo "#define INET 1" > ${.TARGET} A> +.endif A> +.if ${MK_INET6_SUPPORT} != "no" A> +opt_inet6.h: A> + echo "#define INET6 1" > ${.TARGET} A> +.endif A> +.endif A> A> .include A> A> Modified: head/sys/netgraph/ng_ipfw.c A> ============================================================================== A> --- head/sys/netgraph/ng_ipfw.c Thu Sep 15 12:27:26 2011 (r225585) A> +++ head/sys/netgraph/ng_ipfw.c Thu Sep 15 12:28:17 2011 (r225586) A> @@ -26,6 +26,9 @@ A> * $FreeBSD$ A> */ A> A> +#include "opt_inet.h" A> +#include "opt_inet6.h" A> + A> #include A> #include A> #include A> @@ -47,6 +50,8 @@ A> #include A> #include A> #include A> +#include A> +#include A> A> #include A> #include A> @@ -224,6 +229,7 @@ ng_ipfw_rcvdata(hook_p hook, item_p item A> struct m_tag *tag; A> struct ipfw_rule_ref *r; A> struct mbuf *m; A> + struct ip *ip; A> A> NGI_GET_M(item, m); A> NG_FREE_ITEM(item); A> @@ -234,23 +240,47 @@ ng_ipfw_rcvdata(hook_p hook, item_p item A> return (EINVAL); /* XXX: find smth better */ A> }; A> A> + if (m->m_len < sizeof(struct ip) && A> + (m = m_pullup(m, sizeof(struct ip))) == NULL) A> + return (EINVAL); In most cases we return ENOBUFS in case if m_pullup() failure. Lesser amount of code uses ENOMEM and EINVAL. I personally hate EINVAL, since it is usually used as one-for-all error, and thus is meaningless for user. A> + ip = mtod(m, struct ip *); A> + A> r = (struct ipfw_rule_ref *)(tag + 1); A> if (r->info & IPFW_INFO_IN) { A> - ip_input(m); A> + switch (ip->ip_v) { A> +#ifdef INET A> + case IPVERSION: A> + ip_input(m); A> + break; A> +#endif A> +#ifdef INET6 A> + case IPV6_VERSION >> 4: A> + ip6_input(m); A> + break; A> +#endif A> + default: A> + NG_FREE_M(m); A> + return (EINVAL); A> + } A> return (0); A> } else { A> - struct ip *ip; A> - A> - if (m->m_len < sizeof(struct ip) && A> - (m = m_pullup(m, sizeof(struct ip))) == NULL) A> + switch (ip->ip_v) { A> +#ifdef INET A> + case IPVERSION: A> + SET_HOST_IPLEN(ip); A> + return (ip_output(m, NULL, NULL, IP_FORWARDING, A> + NULL, NULL)); A> +#endif A> +#ifdef INET6 A> + case IPV6_VERSION >> 4: A> + return (ip6_output(m, NULL, NULL, 0, NULL, A> + NULL, NULL)); A> +#endif A> + default: A> return (EINVAL); Shouldn't you free the mbuf before returning? A> - A> - ip = mtod(m, struct ip *); A> - A> - SET_HOST_IPLEN(ip); A> - A> - return ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL); A> - } A> + } A> + } A> } A> A> static int -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 07:20:09 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 AE759106566C; Sun, 9 Oct 2011 07:20:09 +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 46B368FC13; Sun, 9 Oct 2011 07:20:09 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 6C35D2A28CBF; Sun, 9 Oct 2011 09:20:08 +0200 (CEST) Date: Sun, 9 Oct 2011 09:20:08 +0200 From: Ed Schouten To: Alexander Best Message-ID: <20111009072008.GJ91943@hoeg.nl> References: <201109290631.p8T6VgJ3008377@svn.freebsd.org> <20110929121457.GA53600@freebsd.org> <20111001130643.GC91943@hoeg.nl> <20111009011141.GA63608@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XKlTcsWBbb8blmHd" Content-Disposition: inline In-Reply-To: <20111009011141.GA63608@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, Edward Tomasz Napierala Subject: Re: svn commit: r225868 - head/bin/ps 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, 09 Oct 2011 07:20:09 -0000 --XKlTcsWBbb8blmHd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Alexander Best , 20111009 03:11: > is this what you had in mind? Yes, exactly. :-) --=20 Ed Schouten WWW: http://80386.nl/ --XKlTcsWBbb8blmHd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJOkUsoAAoJEG5e2P40kaK7b60QAJeVZ9kPjA0wIaw+NOCnSsic LinInVfi0F/Enu64mQjUUS2SeBL/7+NkudUSMH1ucrToRXbsZLV5SDqER+Nka1MO 6SF5ukR6iE/vex5VYLf8ChChdlr+Se4mVA87FE7SFweHCD5mySZSX/BQLqBNNvkj gIW1GFI/+u8m9FBIKmMgJvDAiSnA1/WVvZEvR1n7aygXV35Jj76wtDuQXMICjdGl MEfdZh67XLcMbb7v020Skyfgjd8Q2R2ZPnxxWWc/la+HcJn5lTd98uefBUAD7Jf7 BuGjqBBBc+BjH5bggp0izgowvUfZEu2dNPlsyB8Mm1BxfOLRUgTihJ/hwziwOIFD zwAOwPhzILsGDuURSKrYKTMuH++IYnljVF0IjiHGkzG0dyQBQzdMkwzJTGEGFgIN LWmP/qnkOCFsT2l1N17lSydNBoCZ8QsDKC9LO7PN35LVEWm+uc2yJ6cCT8aCrQ5a NnS45O2JQ/oTT1X1Gp74IVaRTH093N4Wt0ZNPUhCRuQitdPG7Jqn0m3GSsa/7yh3 Fb4eHXG+gfON/Gz2sDJtyGC48WevJzkNDmvSSrsVBAf7qZ1lTdxXS4PtkxB6DoMu lrX+p0kCgZEyco5gTAzslazOk1et+Iabp/nR8ly2WHmprT+JWAHPxFzf77mzr/gg 06nie7a8ihhTkRHXkvuf =5CFZ -----END PGP SIGNATURE----- --XKlTcsWBbb8blmHd-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 08:16:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 29FC2106566C; Sun, 9 Oct 2011 08:16:16 +0000 (UTC) Date: Sun, 9 Oct 2011 08:16:16 +0000 From: Alexander Best To: Ed Schouten Message-ID: <20111009081615.GA42235@freebsd.org> References: <201109290631.p8T6VgJ3008377@svn.freebsd.org> <20110929121457.GA53600@freebsd.org> <20111001130643.GC91943@hoeg.nl> <20111009011141.GA63608@freebsd.org> <20111009072008.GJ91943@hoeg.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <20111009072008.GJ91943@hoeg.nl> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Edward Tomasz Napierala Subject: Re: svn commit: r225868 - head/bin/ps 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, 09 Oct 2011 08:16:16 -0000 --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun Oct 9 11, Ed Schouten wrote: > * Alexander Best , 20111009 03:11: > > is this what you had in mind? > > Yes, exactly. :-) here you are. ;) > > -- > Ed Schouten > WWW: http://80386.nl/ --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="print.c.diff" diff --git a/bin/ps/print.c b/bin/ps/print.c index 45c7823..021415f 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -362,7 +362,7 @@ tdev(KINFO *k, VARENT *ve) v = ve->var; dev = k->ki_p->ki_tdev; if (dev == NODEV) - str = strdup("??"); + str = strdup("-"); else asprintf(&str, "%#jx", (uintmax_t)dev); @@ -379,7 +379,7 @@ tname(KINFO *k, VARENT *ve) v = ve->var; dev = k->ki_p->ki_tdev; if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) - str = strdup("?? "); + str = strdup("- "); else { if (strncmp(ttname, "tty", 3) == 0 || strncmp(ttname, "cua", 3) == 0) @@ -403,7 +403,7 @@ longtname(KINFO *k, VARENT *ve) v = ve->var; dev = k->ki_p->ki_tdev; if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) - ttname = "??"; + ttname = "-"; return (strdup(ttname)); } --AhhlLboLdkugWU4S-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 09:22:48 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 C02FD106564A; Sun, 9 Oct 2011 09:22:48 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3609A8FC0C; Sun, 9 Oct 2011 09:22:47 +0000 (UTC) Received: by vcbf13 with SMTP id f13so5681026vcb.13 for ; Sun, 09 Oct 2011 02:22:47 -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 :content-transfer-encoding; bh=e4e8VfpbfbvIyo08KsswH/4XQQHbBf0m2owQDcFBXAQ=; b=daRKjrD+e2DSAVSJrFAo0DCRZEZgBMc03Ht6DfJc9iRMTtlyAE1DWt8DWvv5S7M4S2 HNWR6WiKLQArQi3yKRWXneaY5mnM/aX6PFy0fpHYpRXo5MGwXLS8KHFcMXr/BPS4jy8V /bhAHJKwMT4BXIdsIBvqOdYMb22RoWEkdkFAA= MIME-Version: 1.0 Received: by 10.52.25.75 with SMTP id a11mr9165723vdg.1.1318150759458; Sun, 09 Oct 2011 01:59:19 -0700 (PDT) Sender: kmacybsd@gmail.com Received: by 10.52.113.202 with HTTP; Sun, 9 Oct 2011 01:59:19 -0700 (PDT) In-Reply-To: <20111005161737.GA19568@dragon.NUXI.org> References: <201109161358.p8GDwptH024793@svn.freebsd.org> <20111005161737.GA19568@dragon.NUXI.org> Date: Sun, 9 Oct 2011 10:59:19 +0200 X-Google-Sender-Auth: EzVTLThxKtISwjdkn8GM1WtobVg Message-ID: From: "K. Macy" To: obrien@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r225617 - in head/sys: amd64/amd64 amd64/linux32 arm/arm cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/sparc/dtrace compat/freebsd32 compat/linux compat/svr4 d... 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, 09 Oct 2011 09:22:48 -0000 Will do - sorry for the delay. Thanks, Kip On Wed, Oct 5, 2011 at 6:17 PM, David O'Brien wrote: > On Fri, Sep 16, 2011 at 01:58:51PM +0000, Kip Macy wrote: >> Author: kmacy >> Date: Fri Sep 16 13:58:51 2011 >> New Revision: 225617 >> Log: >> =A0 In order to maximize the re-usability of kernel code in user space t= his >> =A0 patch modifies makesyscalls.sh to prefix all of the non-compatibilit= y >> =A0 calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel >> =A0 entry points and all places in the code that use them. It also > > Hi Kip, > __FreeBSD_version does not seem to have been bumped for this. > Unfortunately this change has made a kernel module we use at work > unbuildable, and I don't have a __FreeBSD_version value to #ifdef > on. > > If ever there was a change that needed __FreeBSD_version this is one. > > Can you please get __FreeBSD_version bumped in 9-STABLE along with > 9-RELENG? > > thanks, > -- > -- David =A0(obrien@FreeBSD.org) > From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 10:18: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 88ACD1065673 for ; Sun, 9 Oct 2011 10:18:18 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 00C2C8FC12 for ; Sun, 9 Oct 2011 10:18:17 +0000 (UTC) Received: (qmail 9193 invoked from network); 9 Oct 2011 08:33:28 -0000 Received: from localhost (HELO [127.0.0.1]) ([127.0.0.1]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 9 Oct 2011 08:33:28 -0000 Message-ID: <4E916EA6.3020300@freebsd.org> Date: Sun, 09 Oct 2011 11:51:34 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Lawrence Stewart References: <201110071639.p97Gd3t4019128@svn.freebsd.org> <4E8F9FAD.7070103@freebsd.org> In-Reply-To: <4E8F9FAD.7070103@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, FreeBSD Release Engineering Team , John Baldwin Subject: Re: svn commit: r226113 - 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, 09 Oct 2011 10:18:18 -0000 Hi Lawrence, Sorry for jumping in here. There was some urgency felt at EuroBSDCon to get this issue fixed before the next RC. -- Andre On 08.10.2011 02:56, Lawrence Stewart wrote: > Hi Andre and RE team, > > I've had a patch sitting in re@'s inbox for this problem since 15th Sep and have been waiting for > their go-ahead to commit. The patch I submitted is at: > > http://people.freebsd.org/~lstewart/patches/misctcp/tcpreassstackfix_9.x.r225576.diff > > The proposed commit message was: > > ########## > Use a backup (stack allocated) struct tseg_qent when we are unable to allocate one from the TCP > reassembly UMA zone and the incoming segment is the one we've been waiting for (i.e. th_seq == > rcv_nxt). This avoids TCP connections stalling when the zone limit is reached. > > PR: kern/155407 > Reported by: Slawa Olhovchenkov and Steven Hartland > Tested by: Steven Hartland > Submitted by: andre > Reviewed by: jhb > Approved by: re (?) > MFC after: 1 week > ########## > > I feel the logging changes should have been committed separately to the fix, but other than that, > what you committed achieves the same thing as the patch I proposed. > > I should have updated the ML thread to say it was submitted and awaiting approval, so you weren't to > know. > > Anyhoo, I guess I'll leave it up to you and re@ to sort out how you want to proceed, but wanted to > make sure everyone was on the same page as RE would have gotten confused when you requested your > patch be MFCed. > > Cheers, > Lawrence > > On 10/08/11 03:39, Andre Oppermann wrote: >> Author: andre >> Date: Fri Oct 7 16:39:03 2011 >> New Revision: 226113 >> URL: http://svn.freebsd.org/changeset/base/226113 >> >> Log: >> Prevent TCP sessions from stalling indefinitely in reassembly >> when reaching the zone limit of reassembly queue entries. >> >> When the zone limit was reached not even the missing segment >> that would complete the sequence space could be processed >> preventing the TCP session forever from making any further >> progress. >> >> Solve this deadlock by using a temporary on-stack queue entry >> for the missing segment followed by an immediate dequeue again >> by delivering the contiguous sequence space to the socket. >> >> Add logging under net.inet.tcp.log_debug for reassembly queue >> issues. >> >> Reviewed by: lsteward (previous version) >> Tested by: Steven Hartland >> MFC after: 3 days >> >> Modified: >> head/sys/netinet/tcp_reass.c >> >> Modified: head/sys/netinet/tcp_reass.c >> ============================================================================== >> --- head/sys/netinet/tcp_reass.c Fri Oct 7 16:09:44 2011 (r226112) >> +++ head/sys/netinet/tcp_reass.c Fri Oct 7 16:39:03 2011 (r226113) >> @@ -177,7 +177,9 @@ tcp_reass(struct tcpcb *tp, struct tcphd >> struct tseg_qent *nq; >> struct tseg_qent *te = NULL; >> struct socket *so = tp->t_inpcb->inp_socket; >> + char *s = NULL; >> int flags; >> + struct tseg_qent tqs; >> >> INP_WLOCK_ASSERT(tp->t_inpcb); >> >> @@ -215,19 +217,40 @@ tcp_reass(struct tcpcb *tp, struct tcphd >> TCPSTAT_INC(tcps_rcvmemdrop); >> m_freem(m); >> *tlenp = 0; >> + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { >> + log(LOG_DEBUG, "%s; %s: queue limit reached, " >> + "segment dropped\n", s, __func__); >> + free(s, M_TCPLOG); >> + } >> return (0); >> } >> >> /* >> * Allocate a new queue entry. If we can't, or hit the zone limit >> * just drop the pkt. >> + * >> + * Use a temporary structure on the stack for the missing segment >> + * when the zone is exhausted. Otherwise we may get stuck. >> */ >> te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT); >> - if (te == NULL) { >> + if (te == NULL&& th->th_seq != tp->rcv_nxt) { >> TCPSTAT_INC(tcps_rcvmemdrop); >> m_freem(m); >> *tlenp = 0; >> + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { >> + log(LOG_DEBUG, "%s; %s: global zone limit reached, " >> + "segment dropped\n", s, __func__); >> + free(s, M_TCPLOG); >> + } >> return (0); >> + } else if (th->th_seq == tp->rcv_nxt) { >> + bzero(&tqs, sizeof(struct tseg_qent)); >> + te =&tqs; >> + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { >> + log(LOG_DEBUG, "%s; %s: global zone limit reached, " >> + "using stack for missing segment\n", s, __func__); >> + free(s, M_TCPLOG); >> + } >> } >> tp->t_segqlen++; >> >> @@ -304,6 +327,8 @@ tcp_reass(struct tcpcb *tp, struct tcphd >> if (p == NULL) { >> LIST_INSERT_HEAD(&tp->t_segq, te, tqe_q); >> } else { >> + KASSERT(te !=&tqs, ("%s: temporary stack based entry not " >> + "first element in queue", __func__)); >> LIST_INSERT_AFTER(p, te, tqe_q); >> } >> >> @@ -327,7 +352,8 @@ present: >> m_freem(q->tqe_m); >> else >> sbappendstream_locked(&so->so_rcv, q->tqe_m); >> - uma_zfree(V_tcp_reass_zone, q); >> + if (q !=&tqs) >> + uma_zfree(V_tcp_reass_zone, q); >> tp->t_segqlen--; >> q = nq; >> } while (q&& q->tqe_th->th_seq == tp->rcv_nxt); > > > From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 10:55: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 B56C6106566C; Sun, 9 Oct 2011 10:55:15 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4CE78FC12; Sun, 9 Oct 2011 10:55: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 p99AtFRC007650; Sun, 9 Oct 2011 10:55:15 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99AtFLe007648; Sun, 9 Oct 2011 10:55:15 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110091055.p99AtFLe007648@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 9 Oct 2011 10:55: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: r226166 - head/lib/libc/sys 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, 09 Oct 2011 10:55:15 -0000 Author: des Date: Sun Oct 9 10:55:15 2011 New Revision: 226166 URL: http://svn.freebsd.org/changeset/base/226166 Log: Document some not-so-recently added trace points. MFC after: 1 week Modified: head/lib/libc/sys/ktrace.2 Modified: head/lib/libc/sys/ktrace.2 ============================================================================== --- head/lib/libc/sys/ktrace.2 Sat Oct 8 21:15:39 2011 (r226165) +++ head/lib/libc/sys/ktrace.2 Sun Oct 9 10:55:15 2011 (r226166) @@ -28,7 +28,7 @@ .\" @(#)ktrace.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 13, 2008 +.Dd October 9, 2011 .Dt KTRACE 2 .Os .Sh NAME @@ -80,7 +80,7 @@ The .Fa trpoints argument specifies the trace points of interest. The defined trace points are: -.Bl -column KTRFAC_SYSCALLXXX -offset indent +.Bl -column KTRFAC_PROCCTORXXX -offset indent .It "KTRFAC_SYSCALL Trace system calls." .It "KTRFAC_SYSRET Trace return values from system calls." .It "KTRFAC_NAMEI Trace name lookup operations." @@ -88,6 +88,11 @@ The defined trace points are: generate much output). .It "KTRFAC_PSIG Trace posted signals." .It "KTRFAC_CSW Trace context switch points." +.It "KTRFAC_USER Trace application-specific events." +.It "KTRFAC_STRUCT Trace certain data structures." +.It "KTRFAC_SYSCTL Trace sysctls." +.It "KTRFAC_PROCCTOR Trace process construction." +.It "KTRFAC_PROCDTOR Trace process destruction." .It "KTRFAC_INHERIT Inherit tracing to future children." .El .Pp From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 10:59: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 401BE1065670; Sun, 9 Oct 2011 10:58:59 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F8B28FC13; Sun, 9 Oct 2011 10:58:59 +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 p99AwxsG007788; Sun, 9 Oct 2011 10:58:59 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99Awxlc007786; Sun, 9 Oct 2011 10:58:59 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110091058.p99Awxlc007786@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 9 Oct 2011 10:58:59 +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: r226167 - head/lib/libc/sys 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, 09 Oct 2011 10:59:00 -0000 Author: des Date: Sun Oct 9 10:58:58 2011 New Revision: 226167 URL: http://svn.freebsd.org/changeset/base/226167 Log: Line up the struct declaration (yes, I know this isn't what it looks like in the header file) Modified: head/lib/libc/sys/ktrace.2 Modified: head/lib/libc/sys/ktrace.2 ============================================================================== --- head/lib/libc/sys/ktrace.2 Sun Oct 9 10:55:15 2011 (r226166) +++ head/lib/libc/sys/ktrace.2 Sun Oct 9 10:58:58 2011 (r226167) @@ -101,12 +101,12 @@ followed by a trace point specific struc The generic header is: .Bd -literal struct ktr_header { - int ktr_len; /* length of buf */ - short ktr_type; /* trace record type */ - pid_t ktr_pid; /* process id */ - char ktr_comm[MAXCOMLEN+1]; /* command name */ - struct timeval ktr_time; /* timestamp */ - intptr_t ktr_tid; /* was ktr_buffer */ + int ktr_len; /* length of buf */ + short ktr_type; /* trace record type */ + pid_t ktr_pid; /* process id */ + char ktr_comm[MAXCOMLEN+1]; /* command name */ + struct timeval ktr_time; /* timestamp */ + intptr_t ktr_tid; /* was ktr_buffer */ }; .Ed .Pp From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 11:59:19 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 5585D106566B; Sun, 9 Oct 2011 11:59:19 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0E8348FC0A; Sun, 9 Oct 2011 11:59:19 +0000 (UTC) Received: from secured.by.ipfw.ru ([81.200.11.182] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1RCs2G-000GUm-ID; Sun, 09 Oct 2011 15:59:16 +0400 Message-ID: <4E918B48.5080408@FreeBSD.org> Date: Sun, 09 Oct 2011 15:53:44 +0400 From: "Alexander V. Chernikov" User-Agent: Thunderbird 2.0.0.24 (X11/20100515) MIME-Version: 1.0 To: Gleb Smirnoff References: <201109151228.p8FCSHVY073618@svn.freebsd.org> <20111009063420.GZ94905@FreeBSD.org> In-Reply-To: <20111009063420.GZ94905@FreeBSD.org> X-Enigmail-Version: 0.96.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5083CEE90FB8C4014FC03A03" Cc: svn-src-head@FreeBSD.org, "Andrey V. Elsukov" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r225586 - in head/sys: modules/netgraph/ipfw netgraph 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, 09 Oct 2011 11:59:19 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5083CEE90FB8C4014FC03A03 Content-Type: multipart/mixed; boundary="------------080608030806000102020101" This is a multi-part message in MIME format. --------------080608030806000102020101 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Gleb Smirnoff wrote: > Alexander, Andrey, >=20 > see a couple of comments below please. =2E.. > A> + if (m->m_len < sizeof(struct ip) && > A> + (m =3D m_pullup(m, sizeof(struct ip))) =3D=3D NULL) > A> + return (EINVAL); >=20 > In most cases we return ENOBUFS in case if m_pullup() failure. Lesser a= mount > of code uses ENOMEM and EINVAL. I personally hate EINVAL, since it is u= sually > used as one-for-all error, and thus is meaningless for user. Understood. So can we use more descriptive ENOENT in code below? tag =3D m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); if (tag =3D=3D NULL) { NG_FREE_M(m); return (EINVAL); /* XXX: find smth better */ }; >=20 > A> + ip =3D mtod(m, struct ip *); > A> + =2E... > A> + default: > A> return (EINVAL); >=20 > Shouldn't you free the mbuf before returning? Ups. Please see an attached patch --------------080608030806000102020101 Content-Type: text/plain; name="ng_ipfw.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="ng_ipfw.diff" Index: sys/netgraph/ng_ipfw.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 --- sys/netgraph/ng_ipfw.c (revision 226165) +++ sys/netgraph/ng_ipfw.c (working copy) @@ -242,7 +242,7 @@ ng_ipfw_rcvdata(hook_p hook, item_p item) =20 if (m->m_len < sizeof(struct ip) && (m =3D m_pullup(m, sizeof(struct ip))) =3D=3D NULL) - return (EINVAL); + return (ENOBUFS); =20 ip =3D mtod(m, struct ip *); =20 @@ -252,18 +252,14 @@ ng_ipfw_rcvdata(hook_p hook, item_p item) #ifdef INET case IPVERSION: ip_input(m); - break; + return (0); #endif #ifdef INET6 case IPV6_VERSION >> 4: ip6_input(m); - break; + return (0); #endif - default: - NG_FREE_M(m); - return (EINVAL); } - return (0); } else { switch (ip->ip_v) { #ifdef INET @@ -277,10 +273,12 @@ ng_ipfw_rcvdata(hook_p hook, item_p item) return (ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL)); #endif - default: - return (EINVAL); } } + + /* unknown IP protocol version */ + NG_FREE_M(m); + return (EPROTONOSUPPORT); } =20 static int --------------080608030806000102020101-- --------------enig5083CEE90FB8C4014FC03A03 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6Ri0sACgkQwcJ4iSZ1q2nWGgCfX/EJZpmQCskKQxphoCpQ3TMn 2U4An1Tmbj4lAvEhY77Vp1LULJpRKfOo =8LMM -----END PGP SIGNATURE----- --------------enig5083CEE90FB8C4014FC03A03-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 12:14: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 160A9106564A; Sun, 9 Oct 2011 12:14:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 5FF1C8FC0A; Sun, 9 Oct 2011 12:14:09 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p99CE7Zm048488; Sun, 9 Oct 2011 16:14:07 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p99CE7cn048487; Sun, 9 Oct 2011 16:14:07 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 9 Oct 2011 16:14:07 +0400 From: Gleb Smirnoff To: "Alexander V. Chernikov" Message-ID: <20111009121407.GA94905@FreeBSD.org> References: <201109151228.p8FCSHVY073618@svn.freebsd.org> <20111009063420.GZ94905@FreeBSD.org> <4E918B48.5080408@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4E918B48.5080408@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, "Andrey V. Elsukov" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r225586 - in head/sys: modules/netgraph/ipfw netgraph 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, 09 Oct 2011 12:14:10 -0000 On Sun, Oct 09, 2011 at 03:53:44PM +0400, Alexander V. Chernikov wrote: A> Understood. So can we use more descriptive ENOENT in code below? A> A> tag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); A> if (tag == NULL) { A> NG_FREE_M(m); A> return (EINVAL); /* XXX: find smth better */ A> }; Let you decide that. However, you can first analyze other places in kernel, where m_tag_locate() really should succeed but fails. After that you probably would want to have the same error return value in all these places :) A> Please see an attached patch Patch is ok from my view. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 14:12:17 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 E796B1065677; Sun, 9 Oct 2011 14:12:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D704F8FC17; Sun, 9 Oct 2011 14:12: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 p99ECHfS013755; Sun, 9 Oct 2011 14:12:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99ECHDl013752; Sun, 9 Oct 2011 14:12:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201110091412.p99ECHDl013752@svn.freebsd.org> From: Michael Tuexen Date: Sun, 9 Oct 2011 14:12: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: r226168 - 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, 09 Oct 2011 14:12:18 -0000 Author: tuexen Date: Sun Oct 9 14:12:17 2011 New Revision: 226168 URL: http://svn.freebsd.org/changeset/base/226168 Log: Update the inp stored in a HB-timer when moving an stcb to a new inp. Use only this stored inp when processing a HB timeout. This fixes a bug which results in a crash. MFC after: 3 days. Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Oct 9 10:58:58 2011 (r226167) +++ head/sys/netinet/sctp_pcb.c Sun Oct 9 14:12:17 2011 (r226168) @@ -2804,6 +2804,7 @@ sctp_move_pcb_and_assoc(struct sctp_inpc /* now what about the nets? */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { net->pmtu_timer.ep = (void *)new_inp; + net->hb_timer.ep = (void *)new_inp; net->rxt_timer.ep = (void *)new_inp; } SCTP_INP_WUNLOCK(new_inp); Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Oct 9 10:58:58 2011 (r226167) +++ head/sys/netinet/sctputil.c Sun Oct 9 14:12:17 2011 (r226168) @@ -1661,7 +1661,7 @@ sctp_timeout_handler(void *t) sctp_auditing(4, inp, stcb, net); #endif if (!(net->dest_state & SCTP_ADDR_NOHB)) { - sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); + sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_HB_TMR, SCTP_SO_NOT_LOCKED); } break; From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 16:22:31 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 B06D6106564A; Sun, 9 Oct 2011 16:22:31 +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 8688A8FC1B; Sun, 9 Oct 2011 16:22:31 +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 p99GMVjk017742; Sun, 9 Oct 2011 16:22:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99GMVW9017736; Sun, 9 Oct 2011 16:22:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110091622.p99GMVW9017736@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 9 Oct 2011 16:22:31 +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: r226169 - in head/usr.sbin/makefs: . ffs 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, 09 Oct 2011 16:22:31 -0000 Author: nwhitehorn Date: Sun Oct 9 16:22:31 2011 New Revision: 226169 URL: http://svn.freebsd.org/changeset/base/226169 Log: Add support to makefs(8) to add UFS labels to images. Submitted by: avg MFC after: 3 days Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs.h head/usr.sbin/makefs/ffs/mkfs.c head/usr.sbin/makefs/makefs.8 Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Sun Oct 9 14:12:17 2011 (r226168) +++ head/usr.sbin/makefs/ffs.c Sun Oct 9 16:22:31 2011 (r226169) @@ -236,6 +236,9 @@ ffs_parse_opts(const char *option, fsinf goto leave_ffs_parse_opts; } rv = 1; + } else if (strcmp(var, "label") == 0) { + strlcpy(ffs_opts->label, val, sizeof(ffs_opts->label)); + rv = 1; } else rv = set_option(ffs_options, var, val); Modified: head/usr.sbin/makefs/ffs.h ============================================================================== --- head/usr.sbin/makefs/ffs.h Sun Oct 9 14:12:17 2011 (r226168) +++ head/usr.sbin/makefs/ffs.h Sun Oct 9 16:22:31 2011 (r226169) @@ -40,7 +40,11 @@ #ifndef _FFS_H #define _FFS_H +#include +#include + typedef struct { + char label[MAXVOLLEN]; /* volume name/label */ int bsize; /* block size */ int fsize; /* fragment size */ int cpg; /* cylinders per group */ Modified: head/usr.sbin/makefs/ffs/mkfs.c ============================================================================== --- head/usr.sbin/makefs/ffs/mkfs.c Sun Oct 9 14:12:17 2011 (r226168) +++ head/usr.sbin/makefs/ffs/mkfs.c Sun Oct 9 16:22:31 2011 (r226169) @@ -139,7 +139,9 @@ ffs_mkfs(const char *fsys, const fsinfo_ avgfpdir = ffs_opts->avgfpdir; bbsize = BBSIZE; sbsize = SBLOCKSIZE; - + + strlcpy(sblock.fs_volname, ffs_opts->label, sizeof(sblock.fs_volname)); + if (Oflag == 0) { sblock.fs_old_inodefmt = FS_42INODEFMT; sblock.fs_maxsymlinklen = 0; Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Sun Oct 9 14:12:17 2011 (r226168) +++ head/usr.sbin/makefs/makefs.8 Sun Oct 9 16:22:31 2011 (r226169) @@ -242,6 +242,8 @@ Block size. Bytes per inode. .It Sy fsize Fragment size. +.It Sy label +Label name of the image. .It Sy maxbpg Maximum blocks per file in a cylinder group. .It Sy minfree From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 16:23: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 27DB51065672; Sun, 9 Oct 2011 16:23:05 +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 0CFF18FC18; Sun, 9 Oct 2011 16:23: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 p99GN40x017797; Sun, 9 Oct 2011 16:23:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99GN4FW017794; Sun, 9 Oct 2011 16:23:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110091623.p99GN4FW017794@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 9 Oct 2011 16:23: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: r226170 - in head/release: amd64 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, 09 Oct 2011 16:23:05 -0000 Author: nwhitehorn Date: Sun Oct 9 16:23:04 2011 New Revision: 226170 URL: http://svn.freebsd.org/changeset/base/226170 Log: Use UFS labels and bsdlabels (like the 8.x memsticks) instead of GPT to fix problems with some BIOSes. MFC after: 3 days Modified: head/release/amd64/make-memstick.sh head/release/i386/make-memstick.sh Modified: head/release/amd64/make-memstick.sh ============================================================================== --- head/release/amd64/make-memstick.sh Sun Oct 9 16:22:31 2011 (r226169) +++ head/release/amd64/make-memstick.sh Sun Oct 9 16:23:04 2011 (r226170) @@ -13,15 +13,11 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH -BLOCKSIZE=10240 - if [ $# -ne 2 ]; then echo "make-memstick.sh /path/to/directory /path/to/image/file" exit 1 fi -tempfile="${2}.$$" - if [ ! -d ${1} ]; then echo "${1} must be a directory" exit 1 @@ -32,47 +28,21 @@ if [ -e ${2} ]; then exit 1 fi -echo '/dev/gpt/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab -rm -f ${tempfile} -makefs -B little ${tempfile} ${1} +echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab +makefs -B little -o label=FreeBSD_Install ${2} ${1} if [ $? -ne 0 ]; then echo "makefs failed" exit 1 fi rm ${1}/etc/fstab -# -# Use $BLOCKSIZE for transfers to improve efficiency. When calculating -# how many blocks to transfer "+ 2" is to account for truncation in the -# division and to provide space for the label. -# - -filesize=`stat -f "%z" ${tempfile}` -blocks=$(($filesize / ${BLOCKSIZE} + 256)) -dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks} -if [ $? -ne 0 ]; then - echo "creation of image file failed" - exit 1 -fi - unit=`mdconfig -a -t vnode -f ${2}` if [ $? -ne 0 ]; then echo "mdconfig failed" exit 1 fi - -gpart create -s GPT ${unit} -gpart add -t freebsd-boot -s 64K ${unit} -gpart bootcode -b ${1}/boot/pmbr -p ${1}/boot/gptboot -i 1 ${unit} -gpart add -t freebsd-ufs -l FreeBSD_Install ${unit} - -dd if=${tempfile} of=/dev/${unit}p2 bs=$BLOCKSIZE conv=sync -if [ $? -ne 0 ]; then - echo "copying filesystem into image file failed" - exit 1 -fi - +gpart create -s BSD ${unit} +gpart bootcode -b ${1}/boot/boot ${unit} +gpart add -t freebsd-ufs ${unit} mdconfig -d -u ${unit} -rm -f ${tempfile} - Modified: head/release/i386/make-memstick.sh ============================================================================== --- head/release/i386/make-memstick.sh Sun Oct 9 16:22:31 2011 (r226169) +++ head/release/i386/make-memstick.sh Sun Oct 9 16:23:04 2011 (r226170) @@ -13,15 +13,11 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH -BLOCKSIZE=10240 - if [ $# -ne 2 ]; then echo "make-memstick.sh /path/to/directory /path/to/image/file" exit 1 fi -tempfile="${2}.$$" - if [ ! -d ${1} ]; then echo "${1} must be a directory" exit 1 @@ -32,47 +28,21 @@ if [ -e ${2} ]; then exit 1 fi -echo '/dev/gpt/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab -rm -f ${tempfile} -makefs -B little ${tempfile} ${1} +echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab +makefs -B little -o label=FreeBSD_Install ${2} ${1} if [ $? -ne 0 ]; then echo "makefs failed" exit 1 fi rm ${1}/etc/fstab -# -# Use $BLOCKSIZE for transfers to improve efficiency. When calculating -# how many blocks to transfer "+ 2" is to account for truncation in the -# division and to provide space for the label. -# - -filesize=`stat -f "%z" ${tempfile}` -blocks=$(($filesize / ${BLOCKSIZE} + 256)) -dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks} -if [ $? -ne 0 ]; then - echo "creation of image file failed" - exit 1 -fi - unit=`mdconfig -a -t vnode -f ${2}` if [ $? -ne 0 ]; then echo "mdconfig failed" exit 1 fi - -gpart create -s GPT ${unit} -gpart add -t freebsd-boot -s 64K ${unit} -gpart bootcode -b ${1}/boot/pmbr -p ${1}/boot/gptboot -i 1 ${unit} -gpart add -t freebsd-ufs -l FreeBSD_Install ${unit} - -dd if=${tempfile} of=/dev/${unit}p2 bs=$BLOCKSIZE conv=sync -if [ $? -ne 0 ]; then - echo "copying filesystem into image file failed" - exit 1 -fi - +gpart create -s BSD ${unit} +gpart bootcode -b ${1}/boot/boot ${unit} +gpart add -t freebsd-ufs ${unit} mdconfig -d -u ${unit} -rm -f ${tempfile} - From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 18:39: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 7A086106564A; Sun, 9 Oct 2011 18:39:21 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 035938FC17; Sun, 9 Oct 2011 18:39:20 +0000 (UTC) Received: by qadz30 with SMTP id z30so4713379qad.13 for ; Sun, 09 Oct 2011 11:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ziqe4lGVKf+m1D+ESFpWx/njmGn9rIzUUtCxwhrgUFc=; b=t+GWgLL1GhMRsyi71p8XX1MlHiRrNY23mJEu08lyFGnV3tCn5EbCYQid0kMIIgi90M hzu87MaM9zocwN3LkF0yfrChhwjSitLPipBwBE9KRbxrjNe+C1lqscs5PXS5x8zd3ykx guAdvqb4o91agyp+z3CZZmwXtd2Ld5EK6RG4A= MIME-Version: 1.0 Received: by 10.224.178.19 with SMTP id bk19mr8504317qab.72.1318185560138; Sun, 09 Oct 2011 11:39:20 -0700 (PDT) Received: by 10.224.74.82 with HTTP; Sun, 9 Oct 2011 11:39:20 -0700 (PDT) In-Reply-To: <201110081825.p98IP22D073560@svn.freebsd.org> References: <201110081825.p98IP22D073560@svn.freebsd.org> Date: Sun, 9 Oct 2011 11:39:20 -0700 Message-ID: From: Garrett Cooper To: Chris Rees Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226162 - head/share/mk 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, 09 Oct 2011 18:39:21 -0000 On Sat, Oct 8, 2011 at 11:25 AM, Chris Rees wrote: > Author: crees (ports committer) > Date: Sat Oct =A08 18:25:01 2011 > New Revision: 226162 > URL: http://svn.freebsd.org/changeset/base/226162 > > Log: > =A0Revert unapproved commit to bsd.port.mk. > > =A0This would have had more discussion, but it was explicitly rejected at= submission by portmgr: > > =A0http://lists.freebsd.org/pipermail/freebsd-ports/2011-September/070591= .html First off, I'm not advocating commit wars by reverting this change. What I think happened was a simple misunderstanding, assumptions were made, and an accidental lapse in communication occurred. It happens.. let's just try not to make the same mistake twice and move on. I'm not currently blocked by this change if I upgrade to a later version pending that I unmerge this change via svn merge -c -226162. That being said, not everyone uses svn to manage /usr/src though (cv?sup comes to mind), so I think it would be smart to revert this change primarily for those individuals so they don't have to grow a new custom system for applying patches, similar to what the FreeNAS build system's build/do_build.sh script does, and so we can have greater test coverage with 10-CURRENT in the coming months until all of the ports breakage from the double digit branding scheme is fully resolved. Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 19:47:35 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 6D33C1065672; Sun, 9 Oct 2011 19:47:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id F3D958FC18; Sun, 9 Oct 2011 19:47:34 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p99JlWMg050163; Sun, 9 Oct 2011 23:47:32 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p99JlWf9050162; Sun, 9 Oct 2011 23:47:32 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 9 Oct 2011 23:47:32 +0400 From: Gleb Smirnoff To: Qing Li Message-ID: <20111009194732.GB94905@glebius.int.ru> References: <201110031951.p93JpJLA025249@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline In-Reply-To: <201110031951.p93JpJLA025249@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, bz@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r225947 - 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, 09 Oct 2011 19:47:35 -0000 --jI8keyz6grp/JLjh Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Qing, [cced Bjoern as reviewer] On Mon, Oct 03, 2011 at 07:51:19PM +0000, Qing Li wrote: Q> Author: qingli Q> Date: Mon Oct 3 19:51:18 2011 Q> New Revision: 225947 Q> URL: http://svn.freebsd.org/changeset/base/225947 Q> Q> Log: Q> A system may have multiple physical interfaces, all of which are on the Q> same prefix. Since a single route entry is installed for the prefix Q> (without RADIX_MPATH), incoming packets on the interfaces that are not Q> associated with the prefix route may trigger an error message about Q> unable to allocation LLE entry, and fails L2. This patch makes sure a Q> valid route is present in the system, and allow the aforementioned Q> condition to exist and treats as valid. Q> Q> Reviewed by: bz Q> MFC after: 5 days this commit together with r225946 makes the in_lltable_rtcheck() quite difficult to understand. What confuses me most, is that in lines 1435-1445 you are assigning error to a positive value, BUT proceeding further with function. Well, after third review it is clear, that next if() case would definitely be true, and you would proceed with return. But that is difficult to see from first glance. I'd suggest to remove error variable, return immediately in all error cases, and also the RTF_GATEWAY check can be shifted up, since it is the most simple and the most usual to be true. Also, in this commit you really do not need the __DECONST hacks. Here is a snap, only compile-tested patch. -- Totus tuus, Glebius. --jI8keyz6grp/JLjh Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="in.c.diff" Index: in.c =================================================================== --- in.c (revision 226163) +++ in.c (working copy) @@ -1414,8 +1414,6 @@ in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr) { struct rtentry *rt; - struct ifnet *xifp; - int error = 0; KASSERT(l3addr->sa_family == AF_INET, ("sin_family %d", l3addr->sa_family)); @@ -1426,25 +1424,22 @@ if (rt == NULL) return (EINVAL); + if (rt->rt_flags & RTF_GATEWAY) { + RTFREE_LOCKED(rt); + return (EINVAL); + } + /* * If the gateway for an existing host route matches the target L3 * address, which is a special route inserted by some implementation * such as MANET, and the interface is of the correct type, then * allow for ARP to proceed. */ - if (rt->rt_flags & (RTF_GATEWAY | RTF_HOST)) { - xifp = rt->rt_ifp; - - if (xifp && (xifp->if_type != IFT_ETHER || - (xifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0)) - error = EINVAL; - - if (memcmp(rt->rt_gateway->sa_data, l3addr->sa_data, - sizeof(in_addr_t)) != 0) - error = EINVAL; - } - - if (rt->rt_flags & RTF_GATEWAY) { + if (rt->rt_flags & RTF_HOST && + ((rt->rt_ifp && (rt->rt_ifp->if_type != IFT_ETHER || + (rt->rt_ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0)) || + (memcmp(rt->rt_gateway->sa_data, l3addr->sa_data, + sizeof(in_addr_t)) != 0))) { RTFREE_LOCKED(rt); return (EINVAL); } @@ -1455,32 +1450,31 @@ * interfaces have the same prefix. An incoming packet arrives * on one interface and the corresponding outgoing packet leaves * another interface. - * */ if (rt->rt_ifp != ifp) { - char *sa, *mask, *addr, *lim; + const char *sa, *mask, *addr, *lim; int len; - sa = (char *)rt_key(rt); - mask = (char *)rt_mask(rt); - addr = (char *)__DECONST(struct sockaddr *, l3addr); - len = ((struct sockaddr_in *)__DECONST(struct sockaddr *, l3addr))->sin_len; + sa = (const char *)rt_key(rt); + mask = (const char *)rt_mask(rt); + addr = (const char *)l3addr; + len = ((const struct sockaddr_in *)l3addr)->sin_len; lim = addr + len; for ( ; addr < lim; sa++, mask++, addr++) { if ((*sa ^ *addr) & *mask) { - error = EINVAL; #ifdef DIAGNOSTIC log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n", inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr)); #endif - break; + RTFREE_LOCKED(rt); + return (EINVAL); } } } RTFREE_LOCKED(rt); - return (error); + return (0); } /* --jI8keyz6grp/JLjh-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 20:16:51 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 AB403106566B; Sun, 9 Oct 2011 20:16:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81BB68FC15; Sun, 9 Oct 2011 20:16:51 +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 p99KGpjE025041; Sun, 9 Oct 2011 20:16:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99KGp2p025039; Sun, 9 Oct 2011 20:16:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201110092016.p99KGp2p025039@svn.freebsd.org> From: Marius Strobl Date: Sun, 9 Oct 2011 20:16:51 +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: r226171 - head/sys/dev/vr 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, 09 Oct 2011 20:16:51 -0000 Author: marius Date: Sun Oct 9 20:16:51 2011 New Revision: 226171 URL: http://svn.freebsd.org/changeset/base/226171 Log: Sprinkle const. Modified: head/sys/dev/vr/if_vr.c Modified: head/sys/dev/vr/if_vr.c ============================================================================== --- head/sys/dev/vr/if_vr.c Sun Oct 9 16:23:04 2011 (r226170) +++ head/sys/dev/vr/if_vr.c Sun Oct 9 20:16:51 2011 (r226171) @@ -114,12 +114,12 @@ MODULE_DEPEND(vr, miibus, 1, 1, 1); #define VR_Q_CSUM (1<<1) #define VR_Q_CAM (1<<2) -static struct vr_type { +static const struct vr_type { u_int16_t vr_vid; u_int16_t vr_did; int vr_quirks; - char *vr_name; -} vr_devs[] = { + const char *vr_name; +} const vr_devs[] = { { VIA_VENDORID, VIA_DEVICEID_RHINE, VR_Q_NEEDALIGN, "VIA VT3043 Rhine I 10/100BaseTX" }, @@ -195,11 +195,11 @@ static void vr_setwol(struct vr_softc *) static void vr_clrwol(struct vr_softc *); static int vr_sysctl_stats(SYSCTL_HANDLER_ARGS); -static struct vr_tx_threshold_table { +static const struct vr_tx_threshold_table { int tx_cfg; int bcr_cfg; int value; -} vr_tx_threshold_tables[] = { +} const vr_tx_threshold_tables[] = { { VR_TXTHRESH_64BYTES, VR_BCR1_TXTHRESH64BYTES, 64 }, { VR_TXTHRESH_128BYTES, VR_BCR1_TXTHRESH128BYTES, 128 }, { VR_TXTHRESH_256BYTES, VR_BCR1_TXTHRESH256BYTES, 256 }, @@ -557,10 +557,10 @@ vr_reset(const struct vr_softc *sc) * Probe for a VIA Rhine chip. Check the PCI vendor and device * IDs against our list and return a match or NULL */ -static struct vr_type * +static const struct vr_type * vr_match(device_t dev) { - struct vr_type *t = vr_devs; + const struct vr_type *t = vr_devs; for (t = vr_devs; t->vr_name != NULL; t++) if ((pci_get_vendor(dev) == t->vr_vid) && @@ -576,7 +576,7 @@ vr_match(device_t dev) static int vr_probe(device_t dev) { - struct vr_type *t; + const struct vr_type *t; t = vr_match(dev); if (t != NULL) { @@ -595,7 +595,7 @@ vr_attach(device_t dev) { struct vr_softc *sc; struct ifnet *ifp; - struct vr_type *t; + const struct vr_type *t; uint8_t eaddr[ETHER_ADDR_LEN]; int error, rid; int i, phy, pmc; From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 20:21: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 7829E106566C; Sun, 9 Oct 2011 20:21:07 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 683D68FC14; Sun, 9 Oct 2011 20:21:07 +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 p99KL7XC025211; Sun, 9 Oct 2011 20:21:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99KL7kn025209; Sun, 9 Oct 2011 20:21:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110092021.p99KL7kn025209@svn.freebsd.org> From: Glen Barber Date: Sun, 9 Oct 2011 20:21:07 +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: r226172 - head/share/man/man7 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, 09 Oct 2011 20:21:07 -0000 Author: gjb (doc committer) Date: Sun Oct 9 20:21:07 2011 New Revision: 226172 URL: http://svn.freebsd.org/changeset/base/226172 Log: Bump .Dd to reflect the date of the last content change, so MFC content makes sense. Pointy-hat to: gjb (myself) Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Sun Oct 9 20:16:51 2011 (r226171) +++ head/share/man/man7/build.7 Sun Oct 9 20:21:07 2011 (r226172) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2011 +.Dd September 29, 2011 .Dt BUILD 7 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 20:27: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 6B5CD106566C; Sun, 9 Oct 2011 20:27:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B5C08FC12; Sun, 9 Oct 2011 20:27: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 p99KRKcD025481; Sun, 9 Oct 2011 20:27:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99KRKdR025479; Sun, 9 Oct 2011 20:27:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201110092027.p99KRKdR025479@svn.freebsd.org> From: Marius Strobl Date: Sun, 9 Oct 2011 20:27: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: r226173 - head/sys/dev/stge 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, 09 Oct 2011 20:27:20 -0000 Author: marius Date: Sun Oct 9 20:27:20 2011 New Revision: 226173 URL: http://svn.freebsd.org/changeset/base/226173 Log: Prefer KOBJMETHOD_END. Modified: head/sys/dev/stge/if_stge.c Modified: head/sys/dev/stge/if_stge.c ============================================================================== --- head/sys/dev/stge/if_stge.c Sun Oct 9 20:21:07 2011 (r226172) +++ head/sys/dev/stge/if_stge.c Sun Oct 9 20:27:20 2011 (r226173) @@ -199,8 +199,7 @@ static device_method_t stge_methods[] = DEVMETHOD(miibus_writereg, stge_miibus_writereg), DEVMETHOD(miibus_statchg, stge_miibus_statchg), - { 0, 0 } - + KOBJMETHOD_END }; static driver_t stge_driver = { From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 21:21:38 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 118E0106566B; Sun, 9 Oct 2011 21:21:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01D998FC0A; Sun, 9 Oct 2011 21:21:38 +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 p99LLblW027234; Sun, 9 Oct 2011 21:21:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99LLbYB027232; Sun, 9 Oct 2011 21:21:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201110092121.p99LLbYB027232@svn.freebsd.org> From: Marius Strobl Date: Sun, 9 Oct 2011 21:21:37 +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: r226175 - 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, 09 Oct 2011 21:21:38 -0000 Author: marius Date: Sun Oct 9 21:21:37 2011 New Revision: 226175 URL: http://svn.freebsd.org/changeset/base/226175 Log: In device_get_children() avoid malloc(0) in order to increase portability to other operating systems. PR: 154287 Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sun Oct 9 20:58:02 2011 (r226174) +++ head/sys/kern/subr_bus.c Sun Oct 9 21:21:37 2011 (r226175) @@ -2140,6 +2140,11 @@ device_get_children(device_t dev, device TAILQ_FOREACH(child, &dev->children, link) { count++; } + if (count == 0) { + *devlistp = NULL; + *devcountp = 0; + return (0); + } list = malloc(count * sizeof(device_t), M_TEMP, M_NOWAIT|M_ZERO); if (!list) From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 21:36: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 0E063106566B; Sun, 9 Oct 2011 21:36:15 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F23C18FC0A; Sun, 9 Oct 2011 21:36:14 +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 p99LaEHI027713; Sun, 9 Oct 2011 21:36:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99LaEWi027711; Sun, 9 Oct 2011 21:36:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201110092136.p99LaEWi027711@svn.freebsd.org> From: Marius Strobl Date: Sun, 9 Oct 2011 21:36:14 +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: r226176 - head/sys/dev/iwn 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, 09 Oct 2011 21:36:15 -0000 Author: marius Date: Sun Oct 9 21:36:14 2011 New Revision: 226176 URL: http://svn.freebsd.org/changeset/base/226176 Log: Recognize the Intel(R) Centrino(R) Wireless-N 130. PR: 161162 Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Oct 9 21:21:37 2011 (r226175) +++ head/sys/dev/iwn/if_iwn.c Sun Oct 9 21:36:14 2011 (r226176) @@ -89,6 +89,7 @@ static const struct iwn_ident iwn_ident_ { 0x8086, 0x008b, "Intel(R) Centrino(R) Wireless-N 1030" }, { 0x8086, 0x0090, "Intel(R) Centrino(R) Advanced-N 6230" }, { 0x8086, 0x0091, "Intel(R) Centrino(R) Advanced-N 6230" }, + { 0x8086, 0x0896, "Intel(R) Centrino(R) Wireless-N 130" }, { 0x8086, 0x4229, "Intel(R) Wireless WiFi Link 4965" }, { 0x8086, 0x422b, "Intel(R) Centrino(R) Ultimate-N 6300" }, { 0x8086, 0x422c, "Intel(R) Centrino(R) Advanced-N 6200" }, From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 21:42:03 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 2A877106566C; Sun, 9 Oct 2011 21:42:03 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1943B8FC0C; Sun, 9 Oct 2011 21:42:03 +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 p99Lg2K7028022; Sun, 9 Oct 2011 21:42:02 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99Lg29k028016; Sun, 9 Oct 2011 21:42:02 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201110092142.p99Lg29k028016@svn.freebsd.org> From: Craig Rodrigues Date: Sun, 9 Oct 2011 21:42: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: r226179 - in head: sbin/atacontrol sys/dev/ata usr.sbin/burncd 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, 09 Oct 2011 21:42:03 -0000 Author: rodrigc Date: Sun Oct 9 21:42:02 2011 New Revision: 226179 URL: http://svn.freebsd.org/changeset/base/226179 Log: Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel option is defined. This sysctl can be queried by feature_present(3). Query for this feature in /sbin/atacontrol and /usr/sbin/burncd. If these utilities detect that ATA_CAM is enabled, then these utilities will error out. These utilities are compatible with the old ATA driver, but are incomptible with the new ATA_CAM driver. By erroring out, we give end-users an idea as to what remedies to use, and reduce the need for them to file PR's. For atacontrol, camcontrol must be used instead, and for burncd, alternative utilties from the ports collection must be used such as sysutils/cdrtools. In future, maybe someone can re-write burncd to work with ATA_CAM, but at least for now, we give a somewhat useful error message to end users. PR: 160979 Reviewed by: jh, Arnaud Lacombe Reported by: Joe Barbish MFC after: 3 days Modified: head/sbin/atacontrol/atacontrol.8 head/sbin/atacontrol/atacontrol.c head/sys/dev/ata/ata-all.c head/usr.sbin/burncd/burncd.8 head/usr.sbin/burncd/burncd.c Modified: head/sbin/atacontrol/atacontrol.8 ============================================================================== --- head/sbin/atacontrol/atacontrol.8 Sun Oct 9 21:40:38 2011 (r226178) +++ head/sbin/atacontrol/atacontrol.8 Sun Oct 9 21:42:02 2011 (r226179) @@ -25,12 +25,19 @@ .\" .\" $FreeBSD$ .\" -.Dd February 21, 2009 +.Dd October 9, 2011 .Dt ATACONTROL 8 .Os .Sh NAME .Nm atacontrol .Nd ATA device driver control program +.Pp +This utility was +.Em deprecated +in +.Fx 9.0 . +See +.Sx NOTES . .Sh SYNOPSIS .Nm .Aq Ar command @@ -361,11 +368,17 @@ or syslog logging on it as the disk will up all the time. .Sh SEE ALSO .Xr ata 4 +.Xr cam 4 +.Xr camcontrol 8 .Sh HISTORY The .Nm utility first appeared in .Fx 4.6 . +.Pp +.Nm +was deprecated in +.Fx 9.0 . .Sh AUTHORS .An -nosplit The @@ -377,3 +390,16 @@ utility was written by This manual page was written by .An S\(/oren Schmidt .Aq sos@FreeBSD.org . +.Sh NOTES +The +.Nm +utility was deprecated in +.Fx 9.0 . +When +.Bd -ragged -offset indent +.Cd "options ATA_CAM" +.Ed +.Pp +is compiled into the kernel, then +.Xr camcontrol 8 +must be used instead. Modified: head/sbin/atacontrol/atacontrol.c ============================================================================== --- head/sbin/atacontrol/atacontrol.c Sun Oct 9 21:40:38 2011 (r226178) +++ head/sbin/atacontrol/atacontrol.c Sun Oct 9 21:42:02 2011 (r226179) @@ -378,6 +378,11 @@ main(int argc, char **argv) { int fd, mode, channel, array; + if (feature_present("ata_cam")) { + errx(1, "\nATA_CAM option is enabled in kernel.\n" + "Please use camcontrol instead."); + } + if (argc < 2) usage(); Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sun Oct 9 21:40:38 2011 (r226178) +++ head/sys/dev/ata/ata-all.c Sun Oct 9 21:42:02 2011 (r226179) @@ -120,6 +120,9 @@ SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLA TUNABLE_INT("hw.ata.setmax", &ata_setmax); SYSCTL_INT(_hw_ata, OID_AUTO, setmax, CTLFLAG_RDTUN, &ata_setmax, 0, "ATA disk set max native address"); +#ifdef ATA_CAM +FEATURE(ata_cam, "ATA devices are accessed through the cam(4) driver"); +#endif /* * newbus device interface related functions Modified: head/usr.sbin/burncd/burncd.8 ============================================================================== --- head/usr.sbin/burncd/burncd.8 Sun Oct 9 21:40:38 2011 (r226178) +++ head/usr.sbin/burncd/burncd.8 Sun Oct 9 21:42:02 2011 (r226179) @@ -27,12 +27,19 @@ .\" .\" $FreeBSD$ .\" -.Dd December 21, 2009 +.Dd October 9, 2011 .Dt BURNCD 8 .Os .Sh NAME .Nm burncd .Nd control the ATAPI CD-R/RW driver +.Pp +This utility was +.Em deprecated +in +.Fx 9.0 . +See +.Sx NOTES . .Sh SYNOPSIS .Nm .Op Fl deFlmnpqtv @@ -211,6 +218,10 @@ The .Nm utility appeared in .Fx 4.0 . +.Pp +.Nm +was deprecated in +.Fx 9.0 . .Sh AUTHORS The .Nm @@ -220,3 +231,19 @@ Denmark .Aq sos@FreeBSD.org . .Sh BUGS Probably, please report when found. +.Sh NOTES +When +.Bd -ragged -offset indent +.Cd "options ATA_CAM" +.Ed +.Pp +is compiled into the kernel, then +.Xr cdrecord 1 , +available in the +.Fx +Ports Collection as part of the +.Pa sysutils/cdrtools +port, must be used instead. +Refer to: +.Pp +http://www.freebsd.org/doc/handbook/creating-cds.html#CDRECORD Modified: head/usr.sbin/burncd/burncd.c ============================================================================== --- head/usr.sbin/burncd/burncd.c Sun Oct 9 21:40:38 2011 (r226178) +++ head/usr.sbin/burncd/burncd.c Sun Oct 9 21:42:02 2011 (r226179) @@ -82,6 +82,13 @@ main(int argc, char **argv) int block_size = 0, block_type = 0, cdopen = 0, dvdrw = 0; const char *dev, *env_speed; + if (feature_present("ata_cam")) { + errx(1, "\nATA_CAM option is enabled in kernel.\n" + "Install the sysutils/cdrtools port and use cdrecord instead.\n\n" + "Please refer to:\n" + "http://www.freebsd.org/doc/handbook/creating-cds.html#CDRECORD"); + } + if ((dev = getenv("CDROM")) == NULL) dev = "/dev/acd0"; From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 02:49:22 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 3E38F106564A; Mon, 10 Oct 2011 02:49:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E3148FC14; Mon, 10 Oct 2011 02:49:22 +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 p9A2nMU0038811; Mon, 10 Oct 2011 02:49:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A2nMjZ038809; Mon, 10 Oct 2011 02:49:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110100249.p9A2nMjZ038809@svn.freebsd.org> From: Adrian Chadd Date: Mon, 10 Oct 2011 02:49:22 +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: r226181 - head/sys/dev/bwi 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: Mon, 10 Oct 2011 02:49:22 -0000 Author: adrian Date: Mon Oct 10 02:49:21 2011 New Revision: 226181 URL: http://svn.freebsd.org/changeset/base/226181 Log: Update from OpenBSD: Include 0x4402 in the bbp id mapping table used on older devices. http://bcm-specs.sipsolutions.net/BackPlane agrees. Obtained from: OpenBSD, sys/dev/ic/bwi.c r1.88 Modified: head/sys/dev/bwi/if_bwi.c Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Mon Oct 10 00:37:23 2011 (r226180) +++ head/sys/dev/bwi/if_bwi.c Mon Oct 10 02:49:21 2011 (r226181) @@ -220,7 +220,7 @@ static const struct { } bwi_bbpid_map[] = { { 0x4301, 0x4301, 0x4301 }, { 0x4305, 0x4307, 0x4307 }, - { 0x4403, 0x4403, 0x4402 }, + { 0x4402, 0x4403, 0x4402 }, { 0x4610, 0x4615, 0x4610 }, { 0x4710, 0x4715, 0x4710 }, { 0x4720, 0x4725, 0x4309 } From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 02:54: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 DCA98106566B; Mon, 10 Oct 2011 02:54:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCEB18FC0A; Mon, 10 Oct 2011 02:54:58 +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 p9A2swsT039001; Mon, 10 Oct 2011 02:54:58 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A2swxo038999; Mon, 10 Oct 2011 02:54:58 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110100254.p9A2swxo038999@svn.freebsd.org> From: Adrian Chadd Date: Mon, 10 Oct 2011 02:54:58 +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: r226182 - head/sys/dev/bwi 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: Mon, 10 Oct 2011 02:54:59 -0000 Author: adrian Date: Mon Oct 10 02:54:58 2011 New Revision: 226182 URL: http://svn.freebsd.org/changeset/base/226182 Log: Fix an incorrect use of sizeof(). Obtained from: OpenBSD sys/dev/ic/bwi.c r1.87 Modified: head/sys/dev/bwi/bwiphy.c Modified: head/sys/dev/bwi/bwiphy.c ============================================================================== --- head/sys/dev/bwi/bwiphy.c Mon Oct 10 02:49:21 2011 (r226181) +++ head/sys/dev/bwi/bwiphy.c Mon Oct 10 02:54:58 2011 (r226182) @@ -796,7 +796,7 @@ bwi_phy_config_11g(struct bwi_mac *mac) bwi_tbl_write_2(mac, BWI_PHYTBL_RSSI + i, i); /* Fill noise table */ - for (i = 0; i < sizeof(bwi_phy_noise_11g); ++i) { + for (i = 0; i < N(bwi_phy_noise_11g); ++i) { bwi_tbl_write_2(mac, BWI_PHYTBL_NOISE + i, bwi_phy_noise_11g[i]); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 05:11: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 5B1021065672; Mon, 10 Oct 2011 05:11:58 +0000 (UTC) (envelope-from tomelite82@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id BCC848FC1C; Mon, 10 Oct 2011 05:11:57 +0000 (UTC) Received: by ywp17 with SMTP id 17so6314894ywp.13 for ; Sun, 09 Oct 2011 22:11:57 -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 :content-transfer-encoding; bh=D7hjLd/+IblJxYICu28IzCTaL4KQhaxHozA+zae0PUM=; b=GHRNJlR830st8u3r8Vk0eBhV/ogZoyXLQ1/yFvNWXuIYCJzbIsBCqg4HMpZU+BqEKK fzymXoQBpSO8k8bNFsZc3L6xjmu7GURwasv21SNZ2WMaG3lCnqqfQQm/b44ezdrCRjOA G/bKDEJkvAJO5zrPKJZOozi+0fGNdnrZwQzKY= MIME-Version: 1.0 Received: by 10.150.209.10 with SMTP id h10mr5006032ybg.52.1318223517032; Sun, 09 Oct 2011 22:11:57 -0700 (PDT) Sender: tomelite82@gmail.com Received: by 10.151.78.21 with HTTP; Sun, 9 Oct 2011 22:11:56 -0700 (PDT) In-Reply-To: <20111009194732.GB94905@glebius.int.ru> References: <201110031951.p93JpJLA025249@svn.freebsd.org> <20111009194732.GB94905@glebius.int.ru> Date: Sun, 9 Oct 2011 22:11:56 -0700 X-Google-Sender-Auth: mbeBQJQo2KNF0BpYfev7ohWw5kk Message-ID: From: Qing Li To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, bz@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r225947 - 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: Mon, 10 Oct 2011 05:11:58 -0000 Hi Gleb, > > On Mon, Oct 03, 2011 at 07:51:19PM +0000, Qing Li wrote: > Q> Author: qingli > Q> Date: Mon Oct =A03 19:51:18 2011 > Q> New Revision: 225947 > Q> URL: http://svn.freebsd.org/changeset/base/225947 > Q> > Q> Log: > Q> =A0 A system may have multiple physical interfaces, all of which are o= n the > Q> =A0 same prefix. Since a single route entry is installed for the prefi= x > Q> =A0 (without RADIX_MPATH), incoming packets on the interfaces that are= not > Q> =A0 associated with the prefix route may trigger an error message abou= t > Q> =A0 unable to allocation LLE entry, and fails L2. This patch makes sur= e a > Q> =A0 valid route is present in the system, and allow the aforementioned > Q> =A0 condition to exist and treats as valid. > Q> > Q> =A0 Reviewed by: =A0 =A0 =A0 bz > Q> =A0 MFC after: 5 days > > =A0this commit together with r225946 makes the in_lltable_rtcheck() > quite difficult to understand. > > =A0What confuses me most, is that in lines 1435-1445 you are > assigning error to a positive value, BUT proceeding further > with function. > This is what was there before (meaning returning error immediately), but I guess a couple of folks felt it looked a bit cluttered. This is mostly due to the fact the "RTFREE_LOCKED()" operation has to be performed before returning. > > Well, after third review it is clear, that > next if() case would definitely be true, and you would proceed > with return. But that is difficult to see from first glance. > Not so, only for an indirect prefix route. > > I'd suggest to remove error variable, return immediately in > all error cases, and also the RTF_GATEWAY check can be shifted up, > since it is the most simple and the most usual to be true. > No, the RTF_GATEWAY check cannot be shifted up because if we did that, the (indirect host route, with destination matching the gateway IP) would never be executed, if when that set of conditions are true, which i= s allowed and the reason for the patch in the first place. > > Also, in this commit you really do not need the __DECONST hacks. > Okay, I must had a temporary short circuit. I will fix that. Thanks --Qing From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 05:41:12 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 4F036106566C; Mon, 10 Oct 2011 05:41:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id C66AC8FC0A; Mon, 10 Oct 2011 05:41:11 +0000 (UTC) Received: from c122-106-165-191.carlnfd1.nsw.optusnet.com.au (c122-106-165-191.carlnfd1.nsw.optusnet.com.au [122.106.165.191]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p9A5f86T028442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Oct 2011 16:41:09 +1100 Date: Mon, 10 Oct 2011 16:41:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dag-Erling Smorgrav In-Reply-To: <201110082102.p98L28gZ078423@svn.freebsd.org> Message-ID: <20111010164007.N866@besplex.bde.org> References: <201110082102.p98L28gZ078423@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226164 - head/usr.bin/kdump 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: Mon, 10 Oct 2011 05:41:12 -0000 On Sat, 8 Oct 2011, Dag-Erling Smorgrav wrote: > Author: des > Date: Sat Oct 8 21:02:08 2011 > New Revision: 226164 > URL: http://svn.freebsd.org/changeset/base/226164 > > Log: > Address some of bde@'s concerns with the new code. Thanks. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 06:13: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 D20A0106566C; Mon, 10 Oct 2011 06:13:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 412BD8FC0A; Mon, 10 Oct 2011 06:13:15 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p9A6DDg6054307; Mon, 10 Oct 2011 10:13:13 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p9A6DDPX054306; Mon, 10 Oct 2011 10:13:13 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 10 Oct 2011 10:13:13 +0400 From: Gleb Smirnoff To: Qing Li Message-ID: <20111010061313.GC94905@FreeBSD.org> References: <201110031951.p93JpJLA025249@svn.freebsd.org> <20111009194732.GB94905@glebius.int.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, bz@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r225947 - 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: Mon, 10 Oct 2011 06:13:15 -0000 On Sun, Oct 09, 2011 at 10:11:56PM -0700, Qing Li wrote: Q> > šWhat confuses me most, is that in lines 1435-1445 you are Q> > assigning error to a positive value, BUT proceeding further Q> > with function. Q> Q> This is what was there before (meaning returning error immediately), Q> but I guess a couple of folks felt it looked a bit cluttered. Q> This is mostly due to the fact the "RTFREE_LOCKED()" operation Q> has to be performed before returning. Well, we can assign error and then goto "done" label. Assigning error and continuing processing is confusing, isn't it? Q> > Well, after third review it is clear, that Q> > next if() case would definitely be true, and you would proceed Q> > with return. But that is difficult to see from first glance. Q> Q> Not so, only for an indirect prefix route. Q> Q> > I'd suggest to remove error variable, return immediately in Q> > all error cases, and also the RTF_GATEWAY check can be shifted up, Q> > since it is the most simple and the most usual to be true. Q> > Q> Q> No, the RTF_GATEWAY check cannot be shifted up because if we did Q> that, the (indirect host route, with destination matching the gateway IP) Q> would never be executed, if when that set of conditions are true, which is Q> allowed and the reason for the patch in the first place. Can you elaborate on that please? As far as I see, any rtentry that has RTF_GATEWAY would return with EINVAL. The first if() clause doesn't do any actual processing, only checking flags and memcmp()ing. The third clause either. The error is never reset to 0. So, I don't see any difference in returning EINVAL for RTF_GATEWAY immediately or later after other checks. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 06:13: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 8EAE410657F1; Mon, 10 Oct 2011 06:13: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 7E9B38FC13; Mon, 10 Oct 2011 06:13: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 p9A6DRCk045388; Mon, 10 Oct 2011 06:13:27 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A6DRmB045386; Mon, 10 Oct 2011 06:13:27 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110100613.p9A6DRmB045386@svn.freebsd.org> From: Ed Schouten Date: Mon, 10 Oct 2011 06:13: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: r226183 - head/sys/teken 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: Mon, 10 Oct 2011 06:13:27 -0000 Author: ed Date: Mon Oct 10 06:13:27 2011 New Revision: 226183 URL: http://svn.freebsd.org/changeset/base/226183 Log: Properly use the cursor to bound the position for CUP. We must take the origin region into account when clamping the cursor position. MFC after: 3 days Modified: head/sys/teken/teken_subr.h Modified: head/sys/teken/teken_subr.h ============================================================================== --- head/sys/teken/teken_subr.h Mon Oct 10 02:54:58 2011 (r226182) +++ head/sys/teken/teken_subr.h Mon Oct 10 06:13:27 2011 (r226183) @@ -325,7 +325,7 @@ teken_subr_cursor_position(teken_t *t, u { t->t_cursor.tp_row = t->t_originreg.ts_begin + row - 1; - if (row >= t->t_originreg.ts_end) + if (t->t_cursor.tp_row >= t->t_originreg.ts_end) t->t_cursor.tp_row = t->t_originreg.ts_end - 1; t->t_cursor.tp_col = col - 1; From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 06:37:32 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 6EB441065672; Mon, 10 Oct 2011 06:37:32 +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 53F968FC13; Mon, 10 Oct 2011 06:37:32 +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 p9A6bW3p046204; Mon, 10 Oct 2011 06:37:32 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A6bWW4046199; Mon, 10 Oct 2011 06:37:32 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110100637.p9A6bWW4046199@svn.freebsd.org> From: Xin LI Date: Mon, 10 Oct 2011 06:37:32 +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: r226184 - 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: Mon, 10 Oct 2011 06:37:32 -0000 Author: delphij Date: Mon Oct 10 06:37:32 2011 New Revision: 226184 URL: http://svn.freebsd.org/changeset/base/226184 Log: Incorporate recent changes from NetBSD. Most notable change is the addition of support of decompressing xz files. Obtained from: NetBSD Added: head/usr.bin/gzip/unxz.c (contents, props changed) Modified: head/usr.bin/gzip/Makefile head/usr.bin/gzip/gzip.1 head/usr.bin/gzip/gzip.c Modified: head/usr.bin/gzip/Makefile ============================================================================== --- head/usr.bin/gzip/Makefile Mon Oct 10 06:13:27 2011 (r226183) +++ head/usr.bin/gzip/Makefile Mon Oct 10 06:37:32 2011 (r226184) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2009/04/14 22:15:20 lukem Exp $ +# $NetBSD: Makefile,v 1.16 2011/06/21 13:25:45 joerg Exp $ # $FreeBSD$ .include @@ -6,8 +6,8 @@ PROG= gzip MAN= gzip.1 gzexe.1 zdiff.1 zforce.1 zmore.1 znew.1 -DPADD= ${LIBZ} -LDADD= -lz +DPADD= ${LIBZ} ${LIBLZMA} +LDADD= -lz -llzma .if ${MK_BZIP2_SUPPORT} != "no" DPADD+= ${LIBBZ2} Modified: head/usr.bin/gzip/gzip.1 ============================================================================== --- head/usr.bin/gzip/gzip.1 Mon Oct 10 06:13:27 2011 (r226183) +++ head/usr.bin/gzip/gzip.1 Mon Oct 10 06:37:32 2011 (r226184) @@ -1,4 +1,4 @@ -.\" $NetBSD: gzip.1,v 1.20 2009/04/01 08:15:37 mrg Exp $ +.\" $NetBSD: gzip.1,v 1.21 2011/06/19 02:22:36 christos Exp $ .\" .\" Copyright (c) 1997, 2003, 2004 Matthew R. Green .\" All rights reserved. @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd May 23, 2011 +.Dd October 9, 2011 .Dt GZIP 1 .Os .Sh NAME @@ -185,6 +185,7 @@ Options on the command line will overrid .Sh SEE ALSO .Xr bzip2 1 , .Xr compress 1 , +.Xr xz 1 , .Xr fts 3 , .Xr zlib 3 .Sh HISTORY Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Mon Oct 10 06:13:27 2011 (r226183) +++ head/usr.bin/gzip/gzip.c Mon Oct 10 06:37:32 2011 (r226184) @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.99 2011/03/23 12:59:44 tsutsui Exp $ */ +/* $NetBSD: gzip.c,v 1.105 2011/08/30 23:06:00 joerg Exp $ */ /*- * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -77,6 +77,9 @@ enum filetype { #ifndef NO_PACK_SUPPORT FT_PACK, #endif +#ifndef NO_XZ_SUPPORT + FT_XZ, +#endif FT_LAST, FT_UNKNOWN }; @@ -97,6 +100,12 @@ enum filetype { #define PACK_MAGIC "\037\036" #endif +#ifndef NO_XZ_SUPPORT +#include +#define XZ_SUFFIX ".xz" +#define XZ_MAGIC "\3757zXZ" +#endif + #define GZ_SUFFIX ".gz" #define BUFLEN (64 * 1024) @@ -139,6 +148,9 @@ static suffixes_t suffixes[] = { #ifndef NO_COMPRESS_SUPPORT SUFFIX(Z_SUFFIX, ""), #endif +#ifndef NO_XZ_SUPPORT + SUFFIX(XZ_SUFFIX, ""), +#endif SUFFIX(GZ_SUFFIX, ""), /* Overwritten by -S "" */ #endif /* SMALL */ #undef SUFFIX @@ -146,7 +158,7 @@ static suffixes_t suffixes[] = { #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) #define SUFFIX_MAXLEN 30 -static const char gzip_version[] = "FreeBSD gzip 20110523"; +static const char gzip_version[] = "FreeBSD gzip 20111009"; #ifndef SMALL static const char gzip_copyright[] = \ @@ -199,16 +211,13 @@ static int exit_value = 0; /* exit valu static char *infile; /* name of file coming in */ -static void maybe_err(const char *fmt, ...) __dead2 - __attribute__((__format__(__printf__, 1, 2))); -#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) -static void maybe_errx(const char *fmt, ...) __dead2 - __attribute__((__format__(__printf__, 1, 2))); -#endif -static void maybe_warn(const char *fmt, ...) - __attribute__((__format__(__printf__, 1, 2))); -static void maybe_warnx(const char *fmt, ...) - __attribute__((__format__(__printf__, 1, 2))); +static void maybe_err(const char *fmt, ...) __printflike(1, 2) __dead2; +#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) || \ + !defined(NO_XZ_SUPPORT) +static void maybe_errx(const char *fmt, ...) __printflike(1, 2) __dead2; +#endif +static void maybe_warn(const char *fmt, ...) __printflike(1, 2); +static void maybe_warnx(const char *fmt, ...) __printflike(1, 2); static enum filetype file_gettype(u_char *); #ifdef SMALL #define gz_compress(if, of, sz, fn, tm) gz_compress(if, of, sz) @@ -223,8 +232,8 @@ static void handle_stdin(void); static void handle_stdout(void); static void print_ratio(off_t, off_t, FILE *); static void print_list(int fd, off_t, const char *, time_t); -static void usage(void); -static void display_version(void); +static void usage(void) __dead2; +static void display_version(void) __dead2; #ifndef SMALL static void display_license(void); static void sigint_handler(int); @@ -257,7 +266,9 @@ static off_t zuncompress(FILE *, FILE *, static off_t unpack(int, int, char *, size_t, off_t *); #endif -int main(int, char **p); +#ifndef NO_XZ_SUPPORT +static off_t unxz(int, int, char *, size_t, off_t *); +#endif #ifdef SMALL #define getopt_long(a,b,c,d,e) getopt(a,b,c) @@ -456,7 +467,8 @@ maybe_err(const char *fmt, ...) exit(2); } -#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) +#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) || \ + !defined(NO_XZ_SUPPORT) /* ... without an errno. */ void maybe_errx(const char *fmt, ...) @@ -1122,6 +1134,11 @@ file_gettype(u_char *buf) return FT_PACK; else #endif +#ifndef NO_XZ_SUPPORT + if (memcmp(buf, XZ_MAGIC, 4) == 0) /* XXX: We only have 4 bytes */ + return FT_XZ; + else +#endif return FT_UNKNOWN; } @@ -1369,7 +1386,6 @@ file_uncompress(char *file, char *outfil } method = file_gettype(header1); - #ifndef SMALL if (fflag == 0 && method == FT_UNKNOWN) { maybe_warnx("%s: not in gzip format", file); @@ -1447,9 +1463,9 @@ file_uncompress(char *file, char *outfil } else zfd = STDOUT_FILENO; + switch (method) { #ifndef NO_BZIP2_SUPPORT - if (method == FT_BZIP2) { - + case FT_BZIP2: /* XXX */ if (lflag) { maybe_warnx("no -l with bzip2 files"); @@ -1457,11 +1473,11 @@ file_uncompress(char *file, char *outfil } size = unbzip2(fd, zfd, NULL, 0, NULL); - } else + break; #endif #ifndef NO_COMPRESS_SUPPORT - if (method == FT_Z) { + case FT_Z: { FILE *in, *out; /* XXX */ @@ -1494,30 +1510,42 @@ file_uncompress(char *file, char *outfil unlink(outfile); goto lose; } - } else + break; + } #endif #ifndef NO_PACK_SUPPORT - if (method == FT_PACK) { + case FT_PACK: if (lflag) { maybe_warnx("no -l with packed files"); goto lose; } size = unpack(fd, zfd, NULL, 0, NULL); - } else + break; +#endif + +#ifndef NO_XZ_SUPPORT + case FT_XZ: + if (lflag) { + maybe_warnx("no -l with xz files"); + goto lose; + } + + size = unxz(fd, zfd, NULL, 0, NULL); + break; #endif #ifndef SMALL - if (method == FT_UNKNOWN) { + case FT_UNKNOWN: if (lflag) { maybe_warnx("no -l for unknown filetypes"); goto lose; } size = cat_fd(NULL, 0, NULL, fd); - } else + break; #endif - { + default: if (lflag) { print_list(fd, isb.st_size, outfile, isb.st_mtime); close(fd); @@ -1525,6 +1553,7 @@ file_uncompress(char *file, char *outfil } size = gz_uncompress(fd, zfd, NULL, 0, NULL, file); + break; } if (close(fd) != 0) @@ -1697,7 +1726,8 @@ handle_stdin(void) return; } - usize = zuncompress(in, stdout, (char *)header1, sizeof header1, &gsize); + usize = zuncompress(in, stdout, (char *)header1, + sizeof header1, &gsize); fclose(in); break; #endif @@ -1707,6 +1737,12 @@ handle_stdin(void) (char *)header1, sizeof header1, &gsize); break; #endif +#ifndef NO_XZ_SUPPORT + case FT_XZ: + usize = unxz(STDIN_FILENO, STDOUT_FILENO, + (char *)header1, sizeof header1, &gsize); + break; +#endif } #ifndef SMALL @@ -2074,7 +2110,7 @@ static void display_license(void) { - fprintf(stderr, "%s (based on NetBSD gzip 20091011)\n", gzip_version); + fprintf(stderr, "%s (based on NetBSD gzip 20111009)\n", gzip_version); fprintf(stderr, "%s\n", gzip_copyright); exit(0); } @@ -2098,6 +2134,9 @@ display_version(void) #ifndef NO_PACK_SUPPORT #include "unpack.c" #endif +#ifndef NO_XZ_SUPPORT +#include "unxz.c" +#endif static ssize_t read_retry(int fd, void *buf, size_t sz) Added: head/usr.bin/gzip/unxz.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/gzip/unxz.c Mon Oct 10 06:37:32 2011 (r226184) @@ -0,0 +1,160 @@ +/* $NetBSD: unxz.c,v 1.5 2011/09/30 01:32:21 christos Exp $ */ + +/*- + * Copyright (c) 2011 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by 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 + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +static off_t +unxz(int i, int o, char *pre, size_t prelen, off_t *bytes_in) +{ + lzma_stream strm = LZMA_STREAM_INIT; + static const int flags = LZMA_TELL_UNSUPPORTED_CHECK|LZMA_CONCATENATED; + lzma_ret ret; + lzma_action action = LZMA_RUN; + off_t bytes_out, bp; + uint8_t ibuf[BUFSIZ]; + uint8_t obuf[BUFSIZ]; + + if (bytes_in == NULL) + bytes_in = &bp; + + strm.next_in = ibuf; + memcpy(ibuf, pre, prelen); + strm.avail_in = read(i, ibuf + prelen, sizeof(ibuf) - prelen); + if (strm.avail_in == (size_t)-1) + maybe_err("read failed"); + strm.avail_in += prelen; + *bytes_in = strm.avail_in; + + if ((ret = lzma_stream_decoder(&strm, UINT64_MAX, flags)) != LZMA_OK) + maybe_errx("Can't initialize decoder (%d)", ret); + + strm.next_out = NULL; + strm.avail_out = 0; + if ((ret = lzma_code(&strm, LZMA_RUN)) != LZMA_OK) + maybe_errx("Can't read headers (%d)", ret); + + bytes_out = 0; + strm.next_out = obuf; + strm.avail_out = sizeof(obuf); + + for (;;) { + if (strm.avail_in == 0) { + strm.next_in = ibuf; + strm.avail_in = read(i, ibuf, sizeof(ibuf)); + switch (strm.avail_in) { + case (size_t)-1: + maybe_err("read failed"); + /*NOTREACHED*/ + case 0: + action = LZMA_FINISH; + break; + default: + *bytes_in += strm.avail_in; + break; + } + } + + ret = lzma_code(&strm, action); + + // Write and check write error before checking decoder error. + // This way as much data as possible gets written to output + // even if decoder detected an error. + if (strm.avail_out == 0 || ret != LZMA_OK) { + const size_t write_size = sizeof(obuf) - strm.avail_out; + + if (write(o, obuf, write_size) != (ssize_t)write_size) + maybe_err("write failed"); + + strm.next_out = obuf; + strm.avail_out = sizeof(obuf); + bytes_out += write_size; + } + + if (ret != LZMA_OK) { + if (ret == LZMA_STREAM_END) { + // Check that there's no trailing garbage. + if (strm.avail_in != 0 || read(i, ibuf, 1)) + ret = LZMA_DATA_ERROR; + else { + lzma_end(&strm); + return bytes_out; + } + } + + const char *msg; + switch (ret) { + case LZMA_MEM_ERROR: + msg = strerror(ENOMEM); + break; + + case LZMA_FORMAT_ERROR: + msg = "File format not recognized"; + break; + + case LZMA_OPTIONS_ERROR: + // FIXME: Better message? + msg = "Unsupported compression options"; + break; + + case LZMA_DATA_ERROR: + msg = "File is corrupt"; + break; + + case LZMA_BUF_ERROR: + msg = "Unexpected end of input"; + break; + + case LZMA_MEMLIMIT_ERROR: + msg = "Reached memory limit"; + break; + + default: + maybe_errx("Unknown error (%d)", ret); + break; + } + maybe_errx("%s", msg); + + } + } +} From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 08:44:32 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 820B6106566C; Mon, 10 Oct 2011 08:44:32 +0000 (UTC) (envelope-from tomelite82@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id E17508FC17; Mon, 10 Oct 2011 08:44:31 +0000 (UTC) Received: by yxk36 with SMTP id 36so6455991yxk.13 for ; Mon, 10 Oct 2011 01:44:31 -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=DXyffEZ5byNkgAVzgy+UQCDHf2NoS9xZ+jvdeYmhLRQ=; b=YYSFnf6Y8P6g1R8J+NxcbYVFurn1dHNv2Elh7pkL4dtkmShfiUEGmWdOdrx7G7/w83 qh+9UWMIDaFDpnOw2j50F+zWI8lNhdnil8ML1OrGWf6dna6HYP2cmfxVSGsOrOdUDal0 CsKAVKmELzR3iQoRG4O188C92DpkXIBv9a6M8= MIME-Version: 1.0 Received: by 10.150.209.10 with SMTP id h10mr5454266ybg.52.1318236271182; Mon, 10 Oct 2011 01:44:31 -0700 (PDT) Sender: tomelite82@gmail.com Received: by 10.151.78.21 with HTTP; Mon, 10 Oct 2011 01:44:30 -0700 (PDT) In-Reply-To: <20111010061313.GC94905@FreeBSD.org> References: <201110031951.p93JpJLA025249@svn.freebsd.org> <20111009194732.GB94905@glebius.int.ru> <20111010061313.GC94905@FreeBSD.org> Date: Mon, 10 Oct 2011 01:44:30 -0700 X-Google-Sender-Auth: DHcS6B9HwITccSdpnBDJrOn9yMk Message-ID: From: Qing Li To: Gleb Smirnoff Content-Type: multipart/mixed; boundary=000e0cd37a74ac83fa04aeedcc3c Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, bz@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r225947 - 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: Mon, 10 Oct 2011 08:44:32 -0000 --000e0cd37a74ac83fa04aeedcc3c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Okay, now I know what's confusing you ... it's that bug I introduced :-) The 2nd "if()" check on the RTF_GATEWAY flag should have been an "else if()". In a nutshell, the logic is any indirect route should fail the check, except for that special host route. Attached is the rework of that part of the patch, with some cleaning up per your suggestion. Thank you very much for catching that bug. --Qing > Q> > Well, after third review it is clear, that > Q> > next if() case would definitely be true, and you would proceed > Q> > with return. But that is difficult to see from first glance. > Q> > Q> =A0 =A0Not so, only for an indirect prefix route. > Q> > Q> > I'd suggest to remove error variable, return immediately in > Q> > all error cases, and also the RTF_GATEWAY check can be shifted up, > Q> > since it is the most simple and the most usual to be true. > Q> > > Q> > Q> =A0 No, the RTF_GATEWAY check cannot be shifted up because if we did > Q> =A0 that, the (indirect host route, with destination matching the gate= way IP) > Q> =A0 would never be executed, if when that set of conditions are true, = which is > Q> =A0 allowed and the reason for the patch in the first place. > > Can you elaborate on that please? As far as I see, any rtentry that has > RTF_GATEWAY would return with EINVAL. The first if() clause doesn't > do any actual processing, only checking flags and memcmp()ing. The third > clause either. The error is never reset to 0. So, I don't see any > difference in returning EINVAL for RTF_GATEWAY immediately or later > after other checks. > --000e0cd37a74ac83fa04aeedcc3c Content-Type: application/octet-stream; name="in.c.diff" Content-Disposition: attachment; filename="in.c.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gtl7sf890 SW5kZXg6IGluLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PQotLS0gaW4uYwkocmV2aXNpb24gMjI2MTg0KQorKysgaW4u Ywkod29ya2luZyBjb3B5KQpAQCAtMTQxNCw4ICsxNDE0LDYgQEAgc3RhdGljIGludAogaW5fbGx0 YWJsZV9ydGNoZWNrKHN0cnVjdCBpZm5ldCAqaWZwLCB1X2ludCBmbGFncywgY29uc3Qgc3RydWN0 IHNvY2thZGRyICpsM2FkZHIpCiB7CiAJc3RydWN0IHJ0ZW50cnkgKnJ0OwotCXN0cnVjdCBpZm5l dCAqeGlmcDsKLQlpbnQgZXJyb3IgPSAwOwogCiAJS0FTU0VSVChsM2FkZHItPnNhX2ZhbWlseSA9 PSBBRl9JTkVULAogCSAgICAoInNpbl9mYW1pbHkgJWQiLCBsM2FkZHItPnNhX2ZhbWlseSkpOwpA QCAtMTQzMiwyMSArMTQzMCwxNiBAQCBpbl9sbHRhYmxlX3J0Y2hlY2soc3RydWN0IGlmbmV0ICpp ZnAsIHVfaW50IGZsYWdzLAogCSAqIHN1Y2ggYXMgTUFORVQsIGFuZCB0aGUgaW50ZXJmYWNlIGlz IG9mIHRoZSBjb3JyZWN0IHR5cGUsIHRoZW4KIAkgKiBhbGxvdyBmb3IgQVJQIHRvIHByb2NlZWQu CiAJICovCi0JaWYgKHJ0LT5ydF9mbGFncyAmIChSVEZfR0FURVdBWSB8IFJURl9IT1NUKSkgewot CQl4aWZwID0gcnQtPnJ0X2lmcDsKLQkJCi0JCWlmICh4aWZwICYmICh4aWZwLT5pZl90eXBlICE9 IElGVF9FVEhFUiB8fAotCQkgICAgICh4aWZwLT5pZl9mbGFncyAmIChJRkZfTk9BUlAgfCBJRkZf U1RBVElDQVJQKSkgIT0gMCkpCi0JCQllcnJvciA9IEVJTlZBTDsKLQotCQlpZiAobWVtY21wKHJ0 LT5ydF9nYXRld2F5LT5zYV9kYXRhLCBsM2FkZHItPnNhX2RhdGEsCi0JCSAgICBzaXplb2YoaW5f YWRkcl90KSkgIT0gMCkKLQkJCWVycm9yID0gRUlOVkFMOwotCX0KLQogCWlmIChydC0+cnRfZmxh Z3MgJiBSVEZfR0FURVdBWSkgewotCQlSVEZSRUVfTE9DS0VEKHJ0KTsKLQkJcmV0dXJuIChFSU5W QUwpOworCQlpZiAoIShydC0+cnRfZmxhZ3MgJiBSVEZfSE9TVCkgfHwgKCFydC0+cnRfaWZwIHx8 CisJCQlydC0+cnRfaWZwLT5pZl90eXBlICE9IElGVF9FVEhFUiB8fAorCQkJICAocnQtPnJ0X2lm cC0+aWZfZmxhZ3MgJiAKKwkJCSAgIChJRkZfTk9BUlAgfCBJRkZfU1RBVElDQVJQKSkgIT0gMCB8 fAorCQkJICBtZW1jbXAocnQtPnJ0X2dhdGV3YXktPnNhX2RhdGEsIGwzYWRkci0+c2FfZGF0YSwK KwkJCQkgc2l6ZW9mKGluX2FkZHJfdCkpICE9IDApKSB7CisJCQlSVEZSRUVfTE9DS0VEKHJ0KTsK KwkJCXJldHVybiAoRUlOVkFMKTsKKwkJfQogCX0KIAogCS8qCkBAIC0xNDU1LDMyICsxNDQ4LDMx IEBAIGluX2xsdGFibGVfcnRjaGVjayhzdHJ1Y3QgaWZuZXQgKmlmcCwgdV9pbnQgZmxhZ3MsCiAJ ICogaW50ZXJmYWNlcyBoYXZlIHRoZSBzYW1lIHByZWZpeC4gQW4gaW5jb21pbmcgcGFja2V0IGFy cml2ZXMKIAkgKiBvbiBvbmUgaW50ZXJmYWNlIGFuZCB0aGUgY29ycmVzcG9uZGluZyBvdXRnb2lu ZyBwYWNrZXQgbGVhdmVzCiAJICogYW5vdGhlciBpbnRlcmZhY2UuCi0JICogCiAJICovCiAJaWYg KHJ0LT5ydF9pZnAgIT0gaWZwKSB7Ci0JCWNoYXIgKnNhLCAqbWFzaywgKmFkZHIsICpsaW07CisJ CWNvbnN0IGNoYXIgKnNhLCAqbWFzaywgKmFkZHIsICpsaW07CiAJCWludCBsZW47CiAKLQkJc2Eg PSAoY2hhciAqKXJ0X2tleShydCk7Ci0JCW1hc2sgPSAoY2hhciAqKXJ0X21hc2socnQpOwotCQlh ZGRyID0gKGNoYXIgKilfX0RFQ09OU1Qoc3RydWN0IHNvY2thZGRyICosIGwzYWRkcik7Ci0JCWxl biA9ICgoc3RydWN0IHNvY2thZGRyX2luICopX19ERUNPTlNUKHN0cnVjdCBzb2NrYWRkciAqLCBs M2FkZHIpKS0+c2luX2xlbjsKKwkJc2EgPSAoY29uc3QgY2hhciAqKXJ0X2tleShydCk7CisJCW1h c2sgPSAoY29uc3QgY2hhciAqKXJ0X21hc2socnQpOworCQlhZGRyID0gKGNvbnN0IGNoYXIgKils M2FkZHI7CisJCWxlbiA9ICgoY29uc3Qgc3RydWN0IHNvY2thZGRyX2luICopbDNhZGRyKS0+c2lu X2xlbjsKIAkJbGltID0gYWRkciArIGxlbjsKIAogCQlmb3IgKCA7IGFkZHIgPCBsaW07IHNhKyss IG1hc2srKywgYWRkcisrKSB7CiAJCQlpZiAoKCpzYSBeICphZGRyKSAmICptYXNrKSB7Ci0JCQkJ ZXJyb3IgPSBFSU5WQUw7CiAjaWZkZWYgRElBR05PU1RJQwogCQkJCWxvZyhMT0dfSU5GTywgIklQ djQgYWRkcmVzczogXCIlc1wiIGlzIG5vdCBvbiB0aGUgbmV0d29ya1xuIiwKIAkJCQkgICAgaW5l dF9udG9hKCgoY29uc3Qgc3RydWN0IHNvY2thZGRyX2luICopbDNhZGRyKS0+c2luX2FkZHIpKTsK ICNlbmRpZgotCQkJCWJyZWFrOworCQkJCVJURlJFRV9MT0NLRUQocnQpOworCQkJCXJldHVybiAo RUlOVkFMKTsKIAkJCX0KIAkJfQogCX0KIAogCVJURlJFRV9MT0NLRUQocnQpOwotCXJldHVybiAo ZXJyb3IpOworCXJldHVybiAoMCk7CiB9CiAKIC8qCg== --000e0cd37a74ac83fa04aeedcc3c-- From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 09:13: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 8218A106566B; Mon, 10 Oct 2011 09:13:07 +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 71CB58FC08; Mon, 10 Oct 2011 09:13:07 +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 p9A9D7Df051039; Mon, 10 Oct 2011 09:13:07 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A9D7aG051037; Mon, 10 Oct 2011 09:13:07 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110100913.p9A9D7aG051037@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 09:13:07 +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: r226185 - head/sys/kgssapi/krb5 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: Mon, 10 Oct 2011 09:13:07 -0000 Author: brueffer Date: Mon Oct 10 09:13:07 2011 New Revision: 226185 URL: http://svn.freebsd.org/changeset/base/226185 Log: Add missing break statement to make sure all 3DES etypes really are treated the same. CID: 3624 Found with: Coverity Prevent(tm) Reviewed by: dfr MFC after: 1 week Modified: head/sys/kgssapi/krb5/krb5_mech.c Modified: head/sys/kgssapi/krb5/krb5_mech.c ============================================================================== --- head/sys/kgssapi/krb5/krb5_mech.c Mon Oct 10 06:37:32 2011 (r226184) +++ head/sys/kgssapi/krb5/krb5_mech.c Mon Oct 10 09:13:07 2011 (r226185) @@ -288,6 +288,7 @@ get_keys(struct krb5_context *kc) case ETYPE_DES3_CBC_SHA1: case ETYPE_OLD_DES3_CBC_SHA1: etype = ETYPE_DES3_CBC_SHA1; + break; default: etype = keydata->kk_type; From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 09:33: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 E1CCF1065670; Mon, 10 Oct 2011 09:33:07 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D16D38FC15; Mon, 10 Oct 2011 09:33:07 +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 p9A9X75Q051704; Mon, 10 Oct 2011 09:33:07 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A9X7fD051702; Mon, 10 Oct 2011 09:33:07 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201110100933.p9A9X7fD051702@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 10 Oct 2011 09:33:07 +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: r226186 - head/sys/netgraph 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: Mon, 10 Oct 2011 09:33:08 -0000 Author: melifaro Date: Mon Oct 10 09:33:07 2011 New Revision: 226186 URL: http://svn.freebsd.org/changeset/base/226186 Log: Free mbuf in case when protocol in unknown in ng_ipfw_rcvdata(). This change fixes (theoretically) possible mbuf leak introduced in r225586. Reorder code a bit and change return codes to be more specific Reviewed by: glebius Approved by: kib (mentor) Modified: head/sys/netgraph/ng_ipfw.c Modified: head/sys/netgraph/ng_ipfw.c ============================================================================== --- head/sys/netgraph/ng_ipfw.c Mon Oct 10 09:13:07 2011 (r226185) +++ head/sys/netgraph/ng_ipfw.c Mon Oct 10 09:33:07 2011 (r226186) @@ -242,7 +242,7 @@ ng_ipfw_rcvdata(hook_p hook, item_p item if (m->m_len < sizeof(struct ip) && (m = m_pullup(m, sizeof(struct ip))) == NULL) - return (EINVAL); + return (ENOBUFS); ip = mtod(m, struct ip *); @@ -252,18 +252,14 @@ ng_ipfw_rcvdata(hook_p hook, item_p item #ifdef INET case IPVERSION: ip_input(m); - break; + return (0); #endif #ifdef INET6 case IPV6_VERSION >> 4: ip6_input(m); - break; + return (0); #endif - default: - NG_FREE_M(m); - return (EINVAL); } - return (0); } else { switch (ip->ip_v) { #ifdef INET @@ -277,10 +273,12 @@ ng_ipfw_rcvdata(hook_p hook, item_p item return (ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL)); #endif - default: - return (EINVAL); } } + + /* unknown IP protocol version */ + NG_FREE_M(m); + return (EPROTONOSUPPORT); } static int From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:05: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 AFB96106564A; Mon, 10 Oct 2011 11:05:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85B128FC14; Mon, 10 Oct 2011 11:05:58 +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 p9AB5wgE056774; Mon, 10 Oct 2011 11:05:58 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AB5wIj056772; Mon, 10 Oct 2011 11:05:58 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101105.p9AB5wIj056772@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:05:58 +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: r226187 - stable/9/usr.bin/script 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: Mon, 10 Oct 2011 11:05:58 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:05:58 2011 New Revision: 226187 URL: http://svn.freebsd.org/changeset/base/226187 Log: MFC r225857: - Fix a few grammar and mdoc nits in script.1 PR: 161088 Approved by: re (kib) Modified: stable/9/usr.bin/script/script.1 Directory Properties: stable/9/usr.bin/script/ (props changed) Modified: stable/9/usr.bin/script/script.1 ============================================================================== --- stable/9/usr.bin/script/script.1 Mon Oct 10 09:33:07 2011 (r226186) +++ stable/9/usr.bin/script/script.1 Mon Oct 10 11:05:58 2011 (r226187) @@ -28,7 +28,7 @@ .\" @(#)script.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 22, 2004 +.Dd September 28, 2011 .Dt SCRIPT 1 .Os .Sh NAME @@ -73,15 +73,16 @@ or .Pa typescript , retaining the prior contents. .It Fl k -Log keys sent to program as well as output. +Log keys sent to the program as well as output. .It Fl q Run in quiet mode, omit the start and stop status messages. .It Fl t Ar time -Specify time interval between flushing script output file. +Specify the interval at which the script output file will be flushed +to disk, in seconds. A value of 0 causes .Nm -to flush for every character I/O event. +to flush after every character I/O event. The default interval is 30 seconds. .El @@ -136,13 +137,15 @@ If .Ev SHELL is not set, the Bourne shell is assumed. -(Most shells set this variable automatically). +.Pq Most shells set this variable automatically . .El .Sh SEE ALSO .Xr csh 1 -(for the +.Po +for the .Em history -mechanism). +mechanism +.Pc . .Sh HISTORY The .Nm @@ -165,13 +168,15 @@ mode, echo cancelling is far from ideal. The slave terminal mode is checked for ECHO mode to check when to avoid manual echo logging. This does not -work when in a raw mode where the program being run is doing manual echo. +work when the terminal is in a raw mode where +the program being run is doing manual echo. .Pp -If the +If .Nm -reads zero bytes from the terminal it switches to a mode when it probes read -only once a second until it gets some data. -This prevents the +reads zero bytes from the terminal, it switches to a mode when it +only attempts to read +once a second until there is data to read. +This prevents .Nm -spinning on zero-byte reads, but might cause a 1-second delay in -processing of the user input. +from spinning on zero-byte reads, but might cause a 1-second delay in +processing of user input. From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:06:49 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 714EF1065670; Mon, 10 Oct 2011 11:06:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 477468FC25; Mon, 10 Oct 2011 11:06:49 +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 p9AB6n3K056837; Mon, 10 Oct 2011 11:06:49 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AB6nRm056835; Mon, 10 Oct 2011 11:06:49 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101106.p9AB6nRm056835@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226188 - stable/8/usr.bin/script 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: Mon, 10 Oct 2011 11:06:49 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:06:48 2011 New Revision: 226188 URL: http://svn.freebsd.org/changeset/base/226188 Log: MFC r225857: - Fix a few grammar and mdoc nits in script.1 PR: 161088 Modified: stable/8/usr.bin/script/script.1 Directory Properties: stable/8/usr.bin/script/ (props changed) Modified: stable/8/usr.bin/script/script.1 ============================================================================== --- stable/8/usr.bin/script/script.1 Mon Oct 10 11:05:58 2011 (r226187) +++ stable/8/usr.bin/script/script.1 Mon Oct 10 11:06:48 2011 (r226188) @@ -32,7 +32,7 @@ .\" @(#)script.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 22, 2004 +.Dd September 28, 2011 .Dt SCRIPT 1 .Os .Sh NAME @@ -77,15 +77,16 @@ or .Pa typescript , retaining the prior contents. .It Fl k -Log keys sent to program as well as output. +Log keys sent to the program as well as output. .It Fl q Run in quiet mode, omit the start and stop status messages. .It Fl t Ar time -Specify time interval between flushing script output file. +Specify the interval at which the script output file will be flushed +to disk, in seconds. A value of 0 causes .Nm -to flush for every character I/O event. +to flush after every character I/O event. The default interval is 30 seconds. .El @@ -140,13 +141,15 @@ If .Ev SHELL is not set, the Bourne shell is assumed. -(Most shells set this variable automatically). +.Pq Most shells set this variable automatically . .El .Sh SEE ALSO .Xr csh 1 -(for the +.Po +for the .Em history -mechanism). +mechanism +.Pc . .Sh HISTORY The .Nm @@ -169,13 +172,15 @@ mode, echo cancelling is far from ideal. The slave terminal mode is checked for ECHO mode to check when to avoid manual echo logging. This does not -work when in a raw mode where the program being run is doing manual echo. +work when the terminal is in a raw mode where +the program being run is doing manual echo. .Pp -If the +If .Nm -reads zero bytes from the terminal it switches to a mode when it probes read -only once a second until it gets some data. -This prevents the +reads zero bytes from the terminal, it switches to a mode when it +only attempts to read +once a second until there is data to read. +This prevents .Nm -spinning on zero-byte reads, but might cause a 1-second delay in -processing of the user input. +from spinning on zero-byte reads, but might cause a 1-second delay in +processing of user input. From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:07:37 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 1703F1065677; Mon, 10 Oct 2011 11:07:37 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E152E8FC1F; Mon, 10 Oct 2011 11:07:36 +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 p9AB7a6s056906; Mon, 10 Oct 2011 11:07:36 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AB7anG056904; Mon, 10 Oct 2011 11:07:36 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101107.p9AB7anG056904@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226189 - stable/7/usr.bin/script 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: Mon, 10 Oct 2011 11:07:37 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:07:36 2011 New Revision: 226189 URL: http://svn.freebsd.org/changeset/base/226189 Log: MFC r225857: - Fix a few grammar and mdoc nits in script.1 PR: 161088 Modified: stable/7/usr.bin/script/script.1 Directory Properties: stable/7/usr.bin/script/ (props changed) Modified: stable/7/usr.bin/script/script.1 ============================================================================== --- stable/7/usr.bin/script/script.1 Mon Oct 10 11:06:48 2011 (r226188) +++ stable/7/usr.bin/script/script.1 Mon Oct 10 11:07:36 2011 (r226189) @@ -32,7 +32,7 @@ .\" @(#)script.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 22, 2004 +.Dd September 28, 2011 .Dt SCRIPT 1 .Os .Sh NAME @@ -77,15 +77,16 @@ or .Pa typescript , retaining the prior contents. .It Fl k -Log keys sent to program as well as output. +Log keys sent to the program as well as output. .It Fl q Run in quiet mode, omit the start and stop status messages. .It Fl t Ar time -Specify time interval between flushing script output file. +Specify the interval at which the script output file will be flushed +to disk, in seconds. A value of 0 causes .Nm -to flush for every character I/O event. +to flush after every character I/O event. The default interval is 30 seconds. .El @@ -140,13 +141,15 @@ If .Ev SHELL is not set, the Bourne shell is assumed. -(Most shells set this variable automatically). +.Pq Most shells set this variable automatically . .El .Sh SEE ALSO .Xr csh 1 -(for the +.Po +for the .Em history -mechanism). +mechanism +.Pc . .Sh HISTORY The .Nm @@ -169,13 +172,15 @@ mode, echo cancelling is far from ideal. The slave terminal mode is checked for ECHO mode to check when to avoid manual echo logging. This does not -work when in a raw mode where the program being run is doing manual echo. +work when the terminal is in a raw mode where +the program being run is doing manual echo. .Pp -If the +If .Nm -reads zero bytes from the terminal it switches to a mode when it probes read -only once a second until it gets some data. -This prevents the +reads zero bytes from the terminal, it switches to a mode when it +only attempts to read +once a second until there is data to read. +This prevents .Nm -spinning on zero-byte reads, but might cause a 1-second delay in -processing of the user input. +from spinning on zero-byte reads, but might cause a 1-second delay in +processing of user input. From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11: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 6EE6B106566C; Mon, 10 Oct 2011 11:11:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E48F8FC20; Mon, 10 Oct 2011 11: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 p9ABB5CT057062; Mon, 10 Oct 2011 11:11:05 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABB5M8057060; Mon, 10 Oct 2011 11:11:05 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101111.p9ABB5M8057060@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:11:05 +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: r226190 - stable/9/bin/ps 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: Mon, 10 Oct 2011 11:11:05 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:11:05 2011 New Revision: 226190 URL: http://svn.freebsd.org/changeset/base/226190 Log: MFC 225908, 225912, 225927: 225908: - Reorder default ps(1) output according to reality. 225912: - there's no reason the semantics of the -x flag are being explained in the -a flag description - be more precise regarding the relation between the -a flag and the security.bsd.see_other_uids sysctl - describe the format of the -t flag's argument - 'con' no longer is a possible entry in the 'TT' column - explain that the 'TT' column refers to pseudo-terminals via mere numbers - add a hint in the 'tt' keyword description that a keyword 'tty' exists, which will give the full terminal pathname 225859: - Correct a typo that was introduced in 225912 Approved by: re (kib) Modified: stable/9/bin/ps/ps.1 Directory Properties: stable/9/bin/ps/ (props changed) Modified: stable/9/bin/ps/ps.1 ============================================================================== --- stable/9/bin/ps/ps.1 Mon Oct 10 11:07:36 2011 (r226189) +++ stable/9/bin/ps/ps.1 Mon Oct 10 11:11:05 2011 (r226190) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd July 1, 2011 +.Dd October 1, 2011 .Dt PS 1 .Os .Sh NAME @@ -54,6 +54,11 @@ utility displays a header line, followed by lines containing information about all of your processes that have controlling terminals. +If the +.Fl x +options is specified, +.Nm +will also display processes that do not have controlling terminals. .Pp A different set of processes can be selected for display by using any combination of the @@ -90,8 +95,8 @@ and .Fl o options). The default output format includes, for each process, the process' ID, -controlling terminal, CPU time (including both user and system time), -state, and associated command. +controlling terminal, state, CPU time (including both user and system time) +and associated command. .Pp The process file system (see .Xr procfs 5 ) @@ -103,13 +108,9 @@ The options are as follows: .Bl -tag -width indent .It Fl a Display information about other users' processes as well as your own. -This will skip any processes which do not have a controlling terminal, -unless the -.Fl x -option is also specified. -This can be disabled by setting the +If the .Va security.bsd.see_other_uids -sysctl to zero. +sysctl is set to zero, this option is honored only if the UID of the user is 0. .It Fl c Change the .Dq command @@ -216,6 +217,9 @@ with the standard input. .It Fl t Display information about processes attached to the specified terminal devices. +Full pathnames, as well as abbreviations (see explanation of the +.Cm tt +keyword) can be specified. .It Fl U Display the processes belonging to the specified usernames. .It Fl u @@ -427,12 +431,15 @@ The process is being traced or debugged. An abbreviation for the pathname of the controlling terminal, if any. The abbreviation consists of the three letters following .Pa /dev/tty , -or, for the console, -.Dq Li con . +or, for pseudo-terminals, the corresponding entry in +.Pa /dev/pts . This is followed by a .Ql - if the process can no longer reach that controlling terminal (i.e., it has been revoked). +The full pathname of the controlling terminal is available via the +.Cm tty +keyword. .It Cm wchan The event (an address in the system) on which a process waits. When printed numerically, the initial part of the address is From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:11: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 D523F106564A; Mon, 10 Oct 2011 11:11:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4B128FC12; Mon, 10 Oct 2011 11:11:59 +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 p9ABBxEN057125; Mon, 10 Oct 2011 11:11:59 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABBx3e057123; Mon, 10 Oct 2011 11:11:59 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101111.p9ABBx3e057123@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226191 - stable/8/bin/ps 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: Mon, 10 Oct 2011 11:12:00 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:11:59 2011 New Revision: 226191 URL: http://svn.freebsd.org/changeset/base/226191 Log: MFC 225908, 225912, 225927: 225908: - Reorder default ps(1) output according to reality. 225912: - there's no reason the semantics of the -x flag are being explained in the -a flag description - be more precise regarding the relation between the -a flag and the security.bsd.see_other_uids sysctl - describe the format of the -t flag's argument - 'con' no longer is a possible entry in the 'TT' column - explain that the 'TT' column refers to pseudo-terminals via mere numbers - add a hint in the 'tt' keyword description that a keyword 'tty' exists, which will give the full terminal pathname 225859: - Correct a typo that was introduced in 225912 Modified: stable/8/bin/ps/ps.1 Directory Properties: stable/8/bin/ps/ (props changed) Modified: stable/8/bin/ps/ps.1 ============================================================================== --- stable/8/bin/ps/ps.1 Mon Oct 10 11:11:05 2011 (r226190) +++ stable/8/bin/ps/ps.1 Mon Oct 10 11:11:59 2011 (r226191) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 16, 2011 +.Dd October 1, 2011 .Dt PS 1 .Os .Sh NAME @@ -54,6 +54,11 @@ utility displays a header line, followed by lines containing information about all of your processes that have controlling terminals. +If the +.Fl x +options is specified, +.Nm +will also display processes that do not have controlling terminals. .Pp A different set of processes can be selected for display by using any combination of the @@ -90,8 +95,8 @@ and .Fl o options). The default output format includes, for each process, the process' ID, -controlling terminal, CPU time (including both user and system time), -state, and associated command. +controlling terminal, state, CPU time (including both user and system time) +and associated command. .Pp The process file system (see .Xr procfs 5 ) @@ -103,13 +108,9 @@ The options are as follows: .Bl -tag -width indent .It Fl a Display information about other users' processes as well as your own. -This will skip any processes which do not have a controlling terminal, -unless the -.Fl x -option is also specified. -This can be disabled by setting the +If the .Va security.bsd.see_other_uids -sysctl to zero. +sysctl is set to zero, this option is honored only if the UID of the user is 0. .It Fl c Change the .Dq command @@ -213,6 +214,9 @@ with the standard input. .It Fl t Display information about processes attached to the specified terminal devices. +Full pathnames, as well as abbreviations (see explanation of the +.Cm tt +keyword) can be specified. .It Fl U Display the processes belonging to the specified usernames. .It Fl u @@ -418,12 +422,15 @@ The process is being traced or debugged. An abbreviation for the pathname of the controlling terminal, if any. The abbreviation consists of the three letters following .Pa /dev/tty , -or, for the console, -.Dq Li con . +or, for pseudo-terminals, the corresponding entry in +.Pa /dev/pts . This is followed by a .Ql - if the process can no longer reach that controlling terminal (i.e., it has been revoked). +The full pathname of the controlling terminal is available via the +.Cm tty +keyword. .It Cm wchan The event (an address in the system) on which a process waits. When printed numerically, the initial part of the address is From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:12: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 8B1D6106567A; Mon, 10 Oct 2011 11:12:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 021838FC20; Mon, 10 Oct 2011 11:12: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 p9ABCeJw057186; Mon, 10 Oct 2011 11:12:40 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABCejq057184; Mon, 10 Oct 2011 11:12:40 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101112.p9ABCejq057184@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226192 - stable/7/bin/ps 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: Mon, 10 Oct 2011 11:12:41 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:12:40 2011 New Revision: 226192 URL: http://svn.freebsd.org/changeset/base/226192 Log: MFC 225908, 225912, 225927: 225908: - Reorder default ps(1) output according to reality. 225912: - there's no reason the semantics of the -x flag are being explained in the -a flag description - be more precise regarding the relation between the -a flag and the security.bsd.see_other_uids sysctl - describe the format of the -t flag's argument - 'con' no longer is a possible entry in the 'TT' column - explain that the 'TT' column refers to pseudo-terminals via mere numbers - add a hint in the 'tt' keyword description that a keyword 'tty' exists, which will give the full terminal pathname 225859: - Correct a typo that was introduced in 225912 Modified: stable/7/bin/ps/ps.1 Directory Properties: stable/7/bin/ps/ (props changed) Modified: stable/7/bin/ps/ps.1 ============================================================================== --- stable/7/bin/ps/ps.1 Mon Oct 10 11:11:59 2011 (r226191) +++ stable/7/bin/ps/ps.1 Mon Oct 10 11:12:40 2011 (r226192) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 16, 2009 +.Dd October 1, 2011 .Dt PS 1 .Os .Sh NAME @@ -54,6 +54,11 @@ utility displays a header line, followed by lines containing information about all of your processes that have controlling terminals. +If the +.Fl x +options is specified, +.Nm +will also display processes that do not have controlling terminals. .Pp A different set of processes can be selected for display by using any combination of the @@ -90,8 +95,8 @@ and .Fl o options). The default output format includes, for each process, the process' ID, -controlling terminal, CPU time (including both user and system time), -state, and associated command. +controlling terminal, state, CPU time (including both user and system time) +and associated command. .Pp The process file system (see .Xr procfs 5 ) @@ -103,13 +108,9 @@ The options are as follows: .Bl -tag -width indent .It Fl a Display information about other users' processes as well as your own. -This will skip any processes which do not have a controlling terminal, -unless the -.Fl x -option is also specified. -This can be disabled by setting the +If the .Va security.bsd.see_other_uids -sysctl to zero. +sysctl is set to zero, this option is honored only if the UID of the user is 0. .It Fl c Change the .Dq command @@ -213,6 +214,9 @@ with the standard input. .It Fl t Display information about processes attached to the specified terminal devices. +Full pathnames, as well as abbreviations (see explanation of the +.Cm tt +keyword) can be specified. .It Fl U Display the processes belonging to the specified usernames. .It Fl u @@ -411,12 +415,15 @@ The process is being traced or debugged. An abbreviation for the pathname of the controlling terminal, if any. The abbreviation consists of the three letters following .Pa /dev/tty , -or, for the console, -.Dq Li con . +or, for pseudo-terminals, the corresponding entry in +.Pa /dev/pts . This is followed by a .Ql - if the process can no longer reach that controlling terminal (i.e., it has been revoked). +The full pathname of the controlling terminal is available via the +.Cm tty +keyword. .It Cm wchan The event (an address in the system) on which a process waits. When printed numerically, the initial part of the address is From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:14: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 2909B106567A; Mon, 10 Oct 2011 11:14:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F37788FC0C; Mon, 10 Oct 2011 11:14:03 +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 p9ABE36j057272; Mon, 10 Oct 2011 11:14:03 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABE3go057270; Mon, 10 Oct 2011 11:14:03 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101114.p9ABE3go057270@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:14:03 +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: r226193 - stable/9/share/man/man7 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: Mon, 10 Oct 2011 11:14:04 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:14:03 2011 New Revision: 226193 URL: http://svn.freebsd.org/changeset/base/226193 Log: MFC r225858, 225859, 226172: 225858: - Document and provide an example for PORTS_MODULES [1] 225859: - Whitespace cleanup 226172: - Bump date PR: 161017 [1] Approved by: re (kib) Modified: stable/9/share/man/man7/build.7 Directory Properties: stable/9/share/man/man7/ (props changed) Modified: stable/9/share/man/man7/build.7 ============================================================================== --- stable/9/share/man/man7/build.7 Mon Oct 10 11:12:40 2011 (r226192) +++ stable/9/share/man/man7/build.7 Mon Oct 10 11:14:03 2011 (r226193) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2011 +.Dd September 29, 2011 .Dt BUILD 7 .Os .Sh NAME @@ -238,7 +238,7 @@ This command takes a long time. Get updated sources as configured in .Xr make.conf 5 . .It Cm targets -Print a list of supported +Print a list of supported .Va TARGET / .Va TARGET_ARCH @@ -399,21 +399,31 @@ It defaults to .It Va KERNFAST If set, the build target .Cm buildkernel -defaults to setting +defaults to setting .Va NO_KERNELCLEAN , .Va NO_KERNELCONFIG , -.Va NO_KERNELDEPEND +.Va NO_KERNELDEPEND and .Va NO_KERNELOBJ . When set to a value other than .Cm 1 -then -.Va KERNCONF -is set to the value of +then +.Va KERNCONF +is set to the value of .Va KERNFAST . .It Va LOCAL_DIRS If set, this variable supplies a list of additional directories to build, relative to the root of the source tree. +.It Va PORTS_MODULES +A list of ports with kernel modules that should be built and installed +as part of the +.Cm buildkernel +and +.Cm installkernel +process. +.Bd -literal -offset indent +make PORTS_MODULES=emulators/kqemu-kmod kernel +.Ed .It Va SUBDIR_OVERRIDE Override the default list of sub-directories and only build the sub-directory named in this variable. @@ -442,11 +452,11 @@ output. Set this to cross-build for a different architecture. If not set, .Va TARGET_ARCH -defaults to the current machine architecture, unless +defaults to the current machine architecture, unless .Va TARGET is also set, in which case it defaults to the appropriate value for that platform. -Typically, one only needs to set +Typically, one only needs to set .Va TARGET . .El .Pp From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:14: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 82BE01065672; Mon, 10 Oct 2011 11:14:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58E1F8FC25; Mon, 10 Oct 2011 11:14: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 p9ABEitp057326; Mon, 10 Oct 2011 11:14:44 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABEiVK057324; Mon, 10 Oct 2011 11:14:44 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101114.p9ABEiVK057324@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226194 - stable/8/share/man/man7 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: Mon, 10 Oct 2011 11:14:44 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:14:44 2011 New Revision: 226194 URL: http://svn.freebsd.org/changeset/base/226194 Log: MFC r225858, 225859, 226172: 225858: - Document and provide an example for PORTS_MODULES [1] 225859: - Whitespace cleanup 226172: - Bump date PR: 161017 [1] Modified: stable/8/share/man/man7/build.7 Directory Properties: stable/8/share/man/man7/ (props changed) stable/8/share/man/man7/ports.7 (props changed) Modified: stable/8/share/man/man7/build.7 ============================================================================== --- stable/8/share/man/man7/build.7 Mon Oct 10 11:14:03 2011 (r226193) +++ stable/8/share/man/man7/build.7 Mon Oct 10 11:14:44 2011 (r226194) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 10, 2011 +.Dd September 29, 2011 .Dt BUILD 7 .Os .Sh NAME @@ -365,21 +365,31 @@ It defaults to .It Va KERNFAST If set, the build target .Cm buildkernel -defaults to setting +defaults to setting .Va NO_KERNELCLEAN , .Va NO_KERNELCONFIG , -.Va NO_KERNELDEPEND +.Va NO_KERNELDEPEND and .Va NO_KERNELOBJ . When set to a value other than .Cm 1 -then -.Va KERNCONF -is set to the value of +then +.Va KERNCONF +is set to the value of .Va KERNFAST . .It Va LOCAL_DIRS If set, this variable supplies a list of additional directories to build, relative to the root of the source tree. +.It Va PORTS_MODULES +A list of ports with kernel modules that should be built and installed +as part of the +.Cm buildkernel +and +.Cm installkernel +process. +.Bd -literal -offset indent +make PORTS_MODULES=emulators/kqemu-kmod kernel +.Ed .It Va SUBDIR_OVERRIDE Override the default list of sub-directories and only build the sub-directory named in this variable. @@ -408,11 +418,11 @@ output. Set this to cross-build for a different architecture. If not set, .Va TARGET_ARCH -defaults to the current machine architecture, unless +defaults to the current machine architecture, unless .Va TARGET is also set, in which case it defaults to the appropriate value for that platform. -Typically, one only needs to set +Typically, one only needs to set .Va TARGET . .El .Pp From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:15:57 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 B1164106567E; Mon, 10 Oct 2011 11:15:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0C838FC1D; Mon, 10 Oct 2011 11:15:57 +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 p9ABFv5i057414; Mon, 10 Oct 2011 11:15:57 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABFvON057412; Mon, 10 Oct 2011 11:15:57 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101115.p9ABFvON057412@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226195 - stable/7/share/man/man7 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: Mon, 10 Oct 2011 11:15:57 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:15:57 2011 New Revision: 226195 URL: http://svn.freebsd.org/changeset/base/226195 Log: MFC r225858, 225859, 226172: 225858: - Document and provide an example for PORTS_MODULES [1] 225859: - Whitespace cleanup 226172: - Bump date PR: 161017 [1] Modified: stable/7/share/man/man7/build.7 Directory Properties: stable/7/share/man/man7/ (props changed) stable/7/share/man/man7/ports.7 (props changed) Modified: stable/7/share/man/man7/build.7 ============================================================================== --- stable/7/share/man/man7/build.7 Mon Oct 10 11:14:44 2011 (r226194) +++ stable/7/share/man/man7/build.7 Mon Oct 10 11:15:57 2011 (r226195) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 31, 2010 +.Dd September 29, 2011 .Dt BUILD 7 .Os .Sh NAME @@ -352,6 +352,16 @@ variables: .It Va LOCAL_DIRS If set, this variable supplies a list of additional directories to build, relative to the root of the source tree. +.It Va PORTS_MODULES +A list of ports with kernel modules that should be built and installed +as part of the +.Cm buildkernel +and +.Cm installkernel +process. +.Bd -literal -offset indent +make PORTS_MODULES=emulators/kqemu-kmod kernel +.Ed .It Va SUBDIR_OVERRIDE Override the default list of sub-directories and only build the sub-directory named in this variable. From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:23:19 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 EE2F5106564A; Mon, 10 Oct 2011 11:23:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4E9F8FC12; Mon, 10 Oct 2011 11:23:19 +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 p9ABNJra057750; Mon, 10 Oct 2011 11:23:19 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABNJuE057749; Mon, 10 Oct 2011 11:23:19 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101123.p9ABNJuE057749@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226196 - stable/8/share/man/man7 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: Mon, 10 Oct 2011 11:23:20 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:23:19 2011 New Revision: 226196 URL: http://svn.freebsd.org/changeset/base/226196 Log: Pull mergeinfo up to the directory. Modified: Directory Properties: stable/8/share/man/man7/ (props changed) stable/8/share/man/man7/ports.7 (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:23:49 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 827791065677; Mon, 10 Oct 2011 11:23:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 411208FC1F; Mon, 10 Oct 2011 11:23:49 +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 p9ABNnf5057800; Mon, 10 Oct 2011 11:23:49 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABNnDV057799; Mon, 10 Oct 2011 11:23:49 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101123.p9ABNnDV057799@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226197 - stable/7/share/man/man7 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: Mon, 10 Oct 2011 11:23:49 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:23:48 2011 New Revision: 226197 URL: http://svn.freebsd.org/changeset/base/226197 Log: Pull mergeinfo up to the directory. Modified: Directory Properties: stable/7/share/man/man7/ (props changed) stable/7/share/man/man7/ports.7 (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:06:37 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 26A4C1065673; Mon, 10 Oct 2011 12:06:37 +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 164408FC14; Mon, 10 Oct 2011 12:06:37 +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 p9AC6aOn059194; Mon, 10 Oct 2011 12:06:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AC6a35059192; Mon, 10 Oct 2011 12:06:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110101206.p9AC6a35059192@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 12:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226198 - stable/8/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: Mon, 10 Oct 2011 12:06:37 -0000 Author: brueffer Date: Mon Oct 10 12:06:36 2011 New Revision: 226198 URL: http://svn.freebsd.org/changeset/base/226198 Log: MFC: r225560 Minor spelling, wording and punctuation fixes in comments. Modified: stable/8/etc/network.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/network.subr ============================================================================== --- stable/8/etc/network.subr Mon Oct 10 11:23:48 2011 (r226197) +++ stable/8/etc/network.subr Mon Oct 10 12:06:36 2011 (r226198) @@ -31,7 +31,7 @@ # # ifn_start ifn -# Bring up and configure an interface. If some configuration is applied +# Bring up and configure an interface. If some configuration is applied, # print the interface configuration. # ifn_start() @@ -52,7 +52,7 @@ ifn_start() } # ifn_start ifn -# Shutdown and de-configure an interface. If action is taken print the +# Shutdown and de-configure an interface. If action is taken, print the # interface name. # ifn_stop() @@ -202,7 +202,7 @@ ifconfig_getargs() } # autoif -# Returns 0 if the interface should be automaticly configured at +# Returns 0 if the interface should be automatically configured at # boot time and 1 otherwise. autoif() { From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:07: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 35D96106566B; Mon, 10 Oct 2011 12:07:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C72B58FC19; Mon, 10 Oct 2011 12:07: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 p9AC74Vo059247; Mon, 10 Oct 2011 12:07:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AC74WW059244; Mon, 10 Oct 2011 12:07:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101207.p9AC74WW059244@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 12:07:04 +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: r226199 - in stable/9/sys: kern sys 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: Mon, 10 Oct 2011 12:07:05 -0000 Author: kib Date: Mon Oct 10 12:07:04 2011 New Revision: 226199 URL: http://svn.freebsd.org/changeset/base/226199 Log: MFC r225894: The sigwait(3) function shall not return EINTR, according to the POSIX/SUSvN. The sigwait(2) syscall does return EINTR, and libc.so.7 contains the wrapper sigwait(3) which hides EINTR from callers. The EINTR return is used by libthr to handle required cancellation point in the sigwait(3). To help the binaries linked against pre-libc.so.7, i.e. RELENG_6 and earlier, to have right ABI for sigwait(3), transform EINTR return from sigwait(2) into ERESTART. Approved by: re (bz) Modified: stable/9/sys/kern/kern_sig.c stable/9/sys/sys/param.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/kern/kern_sig.c ============================================================================== --- stable/9/sys/kern/kern_sig.c Mon Oct 10 12:06:36 2011 (r226198) +++ stable/9/sys/kern/kern_sig.c Mon Oct 10 12:07:04 2011 (r226199) @@ -1094,6 +1094,8 @@ sys_sigwait(struct thread *td, struct si error = kern_sigtimedwait(td, set, &ksi, NULL); if (error) { + if (error == EINTR && td->td_proc->p_osrel < P_OSREL_SIGWAIT) + error = ERESTART; if (error == ERESTART) return (error); td->td_retval[0] = error; Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Mon Oct 10 12:06:36 2011 (r226198) +++ stable/9/sys/sys/param.h Mon Oct 10 12:07:04 2011 (r226199) @@ -61,6 +61,7 @@ #define __FreeBSD_version 900044 /* Master, propagated to newvers */ #ifdef _KERNEL +#define P_OSREL_SIGWAIT 700000 #define P_OSREL_SIGSEGV 700004 #define P_OSREL_MAP_ANON 800104 #endif From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:15: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 28209106566C; Mon, 10 Oct 2011 12:15:11 +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 178B98FC15; Mon, 10 Oct 2011 12:15:11 +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 p9ACFAI5059555; Mon, 10 Oct 2011 12:15:10 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ACFAjf059553; Mon, 10 Oct 2011 12:15:10 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110101215.p9ACFAjf059553@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 12:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226200 - stable/7/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: Mon, 10 Oct 2011 12:15:11 -0000 Author: brueffer Date: Mon Oct 10 12:15:10 2011 New Revision: 226200 URL: http://svn.freebsd.org/changeset/base/226200 Log: MFC: r225560 Minor spelling, wording and punctuation fixes in comments. Modified: stable/7/etc/network.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/network.subr ============================================================================== --- stable/7/etc/network.subr Mon Oct 10 12:07:04 2011 (r226199) +++ stable/7/etc/network.subr Mon Oct 10 12:15:10 2011 (r226200) @@ -32,7 +32,7 @@ # ifn_start ifn # Bring up and configure an interface. If some configuration is -# applied print the interface configuration. +# applied, print the interface configuration. # ifn_start() { @@ -52,7 +52,7 @@ ifn_start() } # ifn_stop ifn -# Shutdown and de-configure an interface. If action is taken +# Shutdown and de-configure an interface. If action is taken, # print the interface name. # ifn_stop() @@ -161,8 +161,8 @@ get_if_var() } # _ifconfig_getargs if -# Echos the arguments for the supplied interface to stdout. -# returns 1 if empty. In general, ifconfig_getargs should be used +# Prints the arguments for the supplied interface to stdout. +# Returns 1 if empty. In general, ifconfig_getargs should be used # outside this file. _ifconfig_getargs() { @@ -202,7 +202,7 @@ ifconfig_getargs() } # autoif -# Returns 0 if the interface should be automaticly configured at +# Returns 0 if the interface should be automatically configured at # boot time and 1 otherwise. autoif() { From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:16:45 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 D2805106564A; Mon, 10 Oct 2011 12:16:45 +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 C26148FC13; Mon, 10 Oct 2011 12:16:45 +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 p9ACGjwD059638; Mon, 10 Oct 2011 12:16:45 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ACGj03059636; Mon, 10 Oct 2011 12:16:45 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110101216.p9ACGj03059636@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 12:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226201 - stable/8/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: Mon, 10 Oct 2011 12:16:45 -0000 Author: brueffer Date: Mon Oct 10 12:16:45 2011 New Revision: 226201 URL: http://svn.freebsd.org/changeset/base/226201 Log: MFC: One hunk missed during the merge of r225560 (spelling fixes in comments). Modified: stable/8/etc/network.subr Modified: stable/8/etc/network.subr ============================================================================== --- stable/8/etc/network.subr Mon Oct 10 12:15:10 2011 (r226200) +++ stable/8/etc/network.subr Mon Oct 10 12:16:45 2011 (r226201) @@ -161,8 +161,8 @@ get_if_var() } # _ifconfig_getargs if -# Echos the arguments for the supplied interface to stdout. -# returns 1 if empty. In general, ifconfig_getargs should be used +# Prints the arguments for the supplied interface to stdout. +# Returns 1 if empty. In general, ifconfig_getargs should be used # outside this file. _ifconfig_getargs() { From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:27: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 B3EBA106566B; Mon, 10 Oct 2011 12:27:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3AC08FC18; Mon, 10 Oct 2011 12:27:40 +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 p9ACRen8060073; Mon, 10 Oct 2011 12:27:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ACReGA060071; Mon, 10 Oct 2011 12:27:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101227.p9ACReGA060071@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 12:27:40 +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: r226202 - stable/9/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: Mon, 10 Oct 2011 12:27:40 -0000 Author: kib Date: Mon Oct 10 12:27:40 2011 New Revision: 226202 URL: http://svn.freebsd.org/changeset/base/226202 Log: MFC r225942: Assert that exiting process does not return to usermode. Approved by: re (bz) Modified: stable/9/sys/kern/subr_trap.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/kern/subr_trap.c ============================================================================== --- stable/9/sys/kern/subr_trap.c Mon Oct 10 12:16:45 2011 (r226201) +++ stable/9/sys/kern/subr_trap.c Mon Oct 10 12:27:40 2011 (r226202) @@ -99,6 +99,8 @@ userret(struct thread *td, struct trapfr CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, td->td_name); + KASSERT((p->p_flag & P_WEXIT) == 0, + ("Exiting process returns to usermode")); #if 0 #ifdef DIAGNOSTIC /* Check that we called signotify() enough. */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:28:47 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 D3ADE106564A; Mon, 10 Oct 2011 12:28:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C42958FC08; Mon, 10 Oct 2011 12:28:47 +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 p9ACSllE060154; Mon, 10 Oct 2011 12:28:47 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ACSlOq060152; Mon, 10 Oct 2011 12:28:47 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201110101228.p9ACSlOq060152@svn.freebsd.org> From: Michael Tuexen Date: Mon, 10 Oct 2011 12:28:47 +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: r226203 - 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: Mon, 10 Oct 2011 12:28:47 -0000 Author: tuexen Date: Mon Oct 10 12:28:47 2011 New Revision: 226203 URL: http://svn.freebsd.org/changeset/base/226203 Log: When moving an stcb to a new inp and we copy over the list of bound addresses, update the last used address pointer. If not, it might result in a crash if the old inp goes away. MFC after: 3 days. Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Mon Oct 10 12:27:40 2011 (r226202) +++ head/sys/netinet/sctp_pcb.c Mon Oct 10 12:28:47 2011 (r226203) @@ -2786,6 +2786,9 @@ sctp_move_pcb_and_assoc(struct sctp_inpc LIST_INSERT_HEAD(&new_inp->sctp_addr_list, laddr, sctp_nxt_addr); new_inp->laddr_count++; + if (oladdr == stcb->asoc.last_used_address) { + stcb->asoc.last_used_address = laddr; + } } } /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:30:17 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 4305F106564A; Mon, 10 Oct 2011 12:30:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 191C48FC0C; Mon, 10 Oct 2011 12:30: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 p9ACUG3D060241; Mon, 10 Oct 2011 12:30:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ACUGDx060238; Mon, 10 Oct 2011 12:30:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101230.p9ACUGDx060238@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 12:30:16 +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: r226204 - in stable/9/sys: amd64/amd64 i386/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: Mon, 10 Oct 2011 12:30:17 -0000 Author: kib Date: Mon Oct 10 12:30:16 2011 New Revision: 226204 URL: http://svn.freebsd.org/changeset/base/226204 Log: MFC r225943: Do not allow the kernel to access usermode pages without installed fault handler. Panic immediately in such situation, on i386 and amd64. Approved by: re (bz) Modified: stable/9/sys/amd64/amd64/trap.c stable/9/sys/i386/i386/trap.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Mon Oct 10 12:28:47 2011 (r226203) +++ stable/9/sys/amd64/amd64/trap.c Mon Oct 10 12:30:16 2011 (r226204) @@ -674,6 +674,19 @@ trap_pfault(frame, usermode) goto nogo; map = &vm->vm_map; + + /* + * When accessing a usermode address, kernel must be + * ready to accept the page fault, and provide a + * handling routine. Since accessing the address + * without the handler is a bug, do not try to handle + * it normally, and panic immediately. + */ + if (!usermode && (td->td_intr_nesting_level != 0 || + PCPU_GET(curpcb)->pcb_onfault == NULL)) { + trap_fatal(frame, eva); + return (-1); + } } /* Modified: stable/9/sys/i386/i386/trap.c ============================================================================== --- stable/9/sys/i386/i386/trap.c Mon Oct 10 12:28:47 2011 (r226203) +++ stable/9/sys/i386/i386/trap.c Mon Oct 10 12:30:16 2011 (r226204) @@ -831,6 +831,11 @@ trap_pfault(frame, usermode, eva) goto nogo; map = &vm->vm_map; + if (!usermode && (td->td_intr_nesting_level != 0 || + PCPU_GET(curpcb)->pcb_onfault == NULL)) { + trap_fatal(frame, eva); + return (-1); + } } /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:03:14 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 DB770106566B; Mon, 10 Oct 2011 13:03:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB0C78FC08; Mon, 10 Oct 2011 13:03:14 +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 p9AD3Et7061328; Mon, 10 Oct 2011 13:03:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AD3E4H061325; Mon, 10 Oct 2011 13:03:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101303.p9AD3E4H061325@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 13:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226205 - in stable/8/sys: kern sys 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: Mon, 10 Oct 2011 13:03:15 -0000 Author: kib Date: Mon Oct 10 13:03:14 2011 New Revision: 226205 URL: http://svn.freebsd.org/changeset/base/226205 Log: MFC r225894: The sigwait(3) function shall not return EINTR, according to the POSIX/SUSvN. The sigwait(2) syscall does return EINTR, and libc.so.7 contains the wrapper sigwait(3) which hides EINTR from callers. The EINTR return is used by libthr to handle required cancellation point in the sigwait(3). To help the binaries linked against pre-libc.so.7, i.e. RELENG_6 and earlier, to have right ABI for sigwait(3), transform EINTR return from sigwait(2) into ERESTART. Modified: stable/8/sys/kern/kern_sig.c stable/8/sys/sys/param.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_sig.c ============================================================================== --- stable/8/sys/kern/kern_sig.c Mon Oct 10 12:30:16 2011 (r226204) +++ stable/8/sys/kern/kern_sig.c Mon Oct 10 13:03:14 2011 (r226205) @@ -1102,6 +1102,8 @@ sigwait(struct thread *td, struct sigwai error = kern_sigtimedwait(td, set, &ksi, NULL); if (error) { + if (error == EINTR && td->td_proc->p_osrel < P_OSREL_SIGWAIT) + error = ERESTART; if (error == ERESTART) return (error); td->td_retval[0] = error; Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Mon Oct 10 12:30:16 2011 (r226204) +++ stable/8/sys/sys/param.h Mon Oct 10 13:03:14 2011 (r226205) @@ -61,6 +61,7 @@ #define __FreeBSD_version 802512 /* Master, propagated to newvers */ #ifdef _KERNEL +#define P_OSREL_SIGWAIT 700000 #define P_OSREL_SIGSEGV 700004 #define P_OSREL_MAP_ANON 800104 #endif From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:16: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 77CE21065677; Mon, 10 Oct 2011 13:16:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 677D68FC12; Mon, 10 Oct 2011 13:16: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 p9ADGdOX061797; Mon, 10 Oct 2011 13:16:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ADGdiM061795; Mon, 10 Oct 2011 13:16:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101316.p9ADGdiM061795@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 13:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226206 - stable/8/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: Mon, 10 Oct 2011 13:16:39 -0000 Author: kib Date: Mon Oct 10 13:16:39 2011 New Revision: 226206 URL: http://svn.freebsd.org/changeset/base/226206 Log: MFC r225942: Assert that exiting process does not return to usermode. Modified: stable/8/sys/kern/subr_trap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/subr_trap.c ============================================================================== --- stable/8/sys/kern/subr_trap.c Mon Oct 10 13:03:14 2011 (r226205) +++ stable/8/sys/kern/subr_trap.c Mon Oct 10 13:16:39 2011 (r226206) @@ -96,6 +96,8 @@ userret(struct thread *td, struct trapfr CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, td->td_name); + KASSERT((p->p_flag & P_WEXIT) == 0, + ("Exiting process returns to usermode")); #if 0 #ifdef DIAGNOSTIC /* Check that we called signotify() enough. */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:18: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 603BD106564A; Mon, 10 Oct 2011 13:18:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F7458FC17; Mon, 10 Oct 2011 13:18: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 p9ADIuJ5061926; Mon, 10 Oct 2011 13:18:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ADIu2R061923; Mon, 10 Oct 2011 13:18:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101318.p9ADIu2R061923@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 13:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226207 - in stable/8/sys: amd64/amd64 i386/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: Mon, 10 Oct 2011 13:18:56 -0000 Author: kib Date: Mon Oct 10 13:18:55 2011 New Revision: 226207 URL: http://svn.freebsd.org/changeset/base/226207 Log: MFC r225943: Do not allow the kernel to access usermode pages without installed fault handler. Panic immediately in such situation, on i386 and amd64. Modified: stable/8/sys/amd64/amd64/trap.c stable/8/sys/i386/i386/trap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Mon Oct 10 13:16:39 2011 (r226206) +++ stable/8/sys/amd64/amd64/trap.c Mon Oct 10 13:18:55 2011 (r226207) @@ -678,6 +678,19 @@ trap_pfault(frame, usermode) goto nogo; map = &vm->vm_map; + + /* + * When accessing a usermode address, kernel must be + * ready to accept the page fault, and provide a + * handling routine. Since accessing the address + * without the handler is a bug, do not try to handle + * it normally, and panic immediately. + */ + if (!usermode && (td->td_intr_nesting_level != 0 || + PCPU_GET(curpcb)->pcb_onfault == NULL)) { + trap_fatal(frame, eva); + return (-1); + } } /* Modified: stable/8/sys/i386/i386/trap.c ============================================================================== --- stable/8/sys/i386/i386/trap.c Mon Oct 10 13:16:39 2011 (r226206) +++ stable/8/sys/i386/i386/trap.c Mon Oct 10 13:18:55 2011 (r226207) @@ -835,6 +835,11 @@ trap_pfault(frame, usermode, eva) goto nogo; map = &vm->vm_map; + if (!usermode && (td->td_intr_nesting_level != 0 || + PCPU_GET(curpcb)->pcb_onfault == NULL)) { + trap_fatal(frame, eva); + return (-1); + } } /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:26: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 609B3106566C; Mon, 10 Oct 2011 13:26:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50B7A8FC17; Mon, 10 Oct 2011 13:26: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 p9ADQrZS062214; Mon, 10 Oct 2011 13:26:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ADQrA4062212; Mon, 10 Oct 2011 13:26:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101326.p9ADQrA4062212@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 13:26:53 +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: r226208 - head/sys/dev/iscsi/initiator 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: Mon, 10 Oct 2011 13:26:53 -0000 Author: kib Date: Mon Oct 10 13:26:53 2011 New Revision: 226208 URL: http://svn.freebsd.org/changeset/base/226208 Log: Do not ignore block offsets. PR: kern/160943 Submitted by: Craig Boston Reviewed by: Danny Braniss MFC after: 1 week Modified: head/sys/dev/iscsi/initiator/iscsi_subr.c Modified: head/sys/dev/iscsi/initiator/iscsi_subr.c ============================================================================== --- head/sys/dev/iscsi/initiator/iscsi_subr.c Mon Oct 10 13:18:55 2011 (r226207) +++ head/sys/dev/iscsi/initiator/iscsi_subr.c Mon Oct 10 13:26:53 2011 (r226208) @@ -84,6 +84,7 @@ iscsi_r2t(isc_session_t *sp, pduq_t *opq caddr_t bp = csio->data_ptr; bo = ntohl(r2t->bo); + bp += MIN(bo, edtl - ddtl); bleft = ddtl; if(sp->opt.maxXmitDataSegmentLength > 0) // danny's RFC From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:51: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 E4ACB1065673; Mon, 10 Oct 2011 13:51:21 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D38F38FC17; Mon, 10 Oct 2011 13:51: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 p9ADpLOs063192; Mon, 10 Oct 2011 13:51:21 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ADpLU6063190; Mon, 10 Oct 2011 13:51:21 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201110101351.p9ADpLU6063190@svn.freebsd.org> From: Rick Macklem Date: Mon, 10 Oct 2011 13:51:21 +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: r226209 - stable/9/sys/rpc/rpcsec_gss 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: Mon, 10 Oct 2011 13:51:22 -0000 Author: rmacklem Date: Mon Oct 10 13:51:21 2011 New Revision: 226209 URL: http://svn.freebsd.org/changeset/base/2