From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 03:42:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44DF3106566C; Sun, 17 Jan 2010 03:42:29 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) by mx1.freebsd.org (Postfix) with ESMTP id E5CE48FC18; Sun, 17 Jan 2010 03:42:28 +0000 (UTC) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTP id o0H3gPIG025784; Sun, 17 Jan 2010 12:42:27 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Sun, 17 Jan 2010 12:41:46 +0900 (JST) Message-Id: <20100117.124146.27866377.nyan@FreeBSD.org> To: attilio@freebsd.org From: TAKAHASHI Yoshihiro In-Reply-To: <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> References: <201001161224.o0GCOCOI094360@svn.freebsd.org> <20100116.220840.91363215.nyan@FreeBSD.org> <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202441 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 03:42:29 -0000 In article <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> Attilio Rao writes: > Thanks for reporting this. > This further patch should fix the problem for i386 and possibly pc98 > (linked with your patch): > http://www.freebsd.org/~attilio/atpic.diff Please apply the same change to sys/pc98/cbus/clock.c, and it's fine. Please feel free to commit my patch. Thanks. --- TAKAHASHI Yoshihiro From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 06:20:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 451E3106566C; Sun, 17 Jan 2010 06:20:31 +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 3295C8FC15; Sun, 17 Jan 2010 06:20:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H6KVr4032441; Sun, 17 Jan 2010 06:20:31 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H6KVUJ032434; Sun, 17 Jan 2010 06:20:31 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001170620.o0H6KVUJ032434@svn.freebsd.org> From: Xin LI Date: Sun, 17 Jan 2010 06:20: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: r202454 - in head: lib/libgeom sbin/geom/core sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 06:20:31 -0000 Author: delphij Date: Sun Jan 17 06:20:30 2010 New Revision: 202454 URL: http://svn.freebsd.org/changeset/base/202454 Log: Expose stripe offset and stripe size through libgeom and geom(8) userland utilities. Reviewed by: pjd, mav (earlier version) Modified: head/lib/libgeom/geom_util.c head/lib/libgeom/geom_xml2tree.c head/lib/libgeom/libgeom.3 head/lib/libgeom/libgeom.h head/sbin/geom/core/geom.c head/sys/geom/geom_dump.c Modified: head/lib/libgeom/geom_util.c ============================================================================== --- head/lib/libgeom/geom_util.c Sat Jan 16 20:51:33 2010 (r202453) +++ head/lib/libgeom/geom_util.c Sun Jan 17 06:20:30 2010 (r202454) @@ -114,6 +114,32 @@ g_sectorsize(int fd) } /* + * Return stripe size of the given provider. + */ +off_t +g_stripesize(int fd) +{ + off_t stripesize; + + if (g_ioctl_arg(fd, DIOCGSTRIPESIZE, &stripesize) == -1) + return (-1); + return (stripesize); +} + +/* + * Return stripe size of the given provider. + */ +off_t +g_stripeoffset(int fd) +{ + off_t stripeoffset; + + if (g_ioctl_arg(fd, DIOCGSTRIPEOFFSET, &stripeoffset) == -1) + return (-1); + return (stripeoffset); +} + +/* * Return the correct provider name. */ char * Modified: head/lib/libgeom/geom_xml2tree.c ============================================================================== --- head/lib/libgeom/geom_xml2tree.c Sat Jan 16 20:51:33 2010 (r202453) +++ head/lib/libgeom/geom_xml2tree.c Sun Jan 17 06:20:30 2010 (r202454) @@ -230,6 +230,16 @@ EndElement(void *userData, const char *n free(p); return; } + if (!strcmp(name, "stripesize") && mt->provider != NULL) { + mt->provider->lg_stripesize = strtoumax(p, NULL, 0); + free(p); + return; + } + if (!strcmp(name, "stripeoffset") && mt->provider != NULL) { + mt->provider->lg_stripeoffset = strtoumax(p, NULL, 0); + free(p); + return; + } if (!strcmp(name, "config")) { mt->config = NULL; Modified: head/lib/libgeom/libgeom.3 ============================================================================== --- head/lib/libgeom/libgeom.3 Sat Jan 16 20:51:33 2010 (r202453) +++ head/lib/libgeom/libgeom.3 Sun Jan 17 06:20:30 2010 (r202454) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 8, 2008 +.Dd January 16, 2010 .Dt LIBGEOM 3 .Os .Sh NAME @@ -50,6 +50,8 @@ .Nm g_close , .Nm g_mediasize , .Nm g_sectorsize , +.Nm g_stripeoffset , +.Nm g_stripesize , .Nm g_flush , .Nm g_delete , .Nm g_device_path , @@ -101,6 +103,10 @@ .Fn g_mediasize "int fd" .Ft ssize_t .Fn g_sectorsize "int fd" +.Ft ssize_t +.Fn g_stripeoffset "int fd" +.Ft ssize_t +.Fn g_stripesize "int fd" .Ft int .Fn g_flush "int fd" .Ft int @@ -297,6 +303,14 @@ The function returns sector size of the given provider. .Pp The +.Fn g_stripeoffset +function returns stripe size of the given provider. +.Pp +The +.Fn g_stripesize +function returns stripe size of the given provider. +.Pp +The .Fn g_flush function sends .Dv BIO_FLUSH Modified: head/lib/libgeom/libgeom.h ============================================================================== --- head/lib/libgeom/libgeom.h Sat Jan 16 20:51:33 2010 (r202453) +++ head/lib/libgeom/libgeom.h Sun Jan 17 06:20:30 2010 (r202454) @@ -123,6 +123,8 @@ struct gprovider { char *lg_mode; off_t lg_mediasize; u_int lg_sectorsize; + off_t lg_stripeoffset; + off_t lg_stripesize; struct gconf lg_config; }; @@ -149,6 +151,8 @@ int g_open(const char *, int); int g_close(int); off_t g_mediasize(int); ssize_t g_sectorsize(int); +off_t g_stripeoffset(int); +off_t g_stripesize(int); int g_flush(int); int g_delete(int, off_t, off_t); int g_get_ident(int, char *, size_t); Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Sat Jan 16 20:51:33 2010 (r202453) +++ head/sbin/geom/core/geom.c Sun Jan 17 06:20:30 2010 (r202454) @@ -772,6 +772,10 @@ list_one_provider(struct gprovider *pp, printf("%sMediasize: %jd (%s)\n", prefix, (intmax_t)pp->lg_mediasize, buf); printf("%sSectorsize: %u\n", prefix, pp->lg_sectorsize); + if (pp->lg_stripesize > 0) { + printf("%sStripesize: %ju\n", prefix, pp->lg_stripesize); + printf("%sStripeoffset: %ju\n", prefix, pp->lg_stripeoffset); + } printf("%sMode: %s\n", prefix, pp->lg_mode); LIST_FOREACH(conf, &pp->lg_config, lg_config) { printf("%s%s: %s\n", prefix, conf->lg_name, conf->lg_val); @@ -796,6 +800,10 @@ list_one_consumer(struct gconsumer *cp, printf("%sMediasize: %jd (%s)\n", prefix, (intmax_t)pp->lg_mediasize, buf); printf("%sSectorsize: %u\n", prefix, pp->lg_sectorsize); + if (pp->lg_stripesize > 0) { + printf("%sStripesize: %ju\n", prefix, pp->lg_stripesize); + printf("%sStripeoffset: %ju\n", prefix, pp->lg_stripeoffset); + } printf("%sMode: %s\n", prefix, cp->lg_mode); } LIST_FOREACH(conf, &cp->lg_config, lg_config) { Modified: head/sys/geom/geom_dump.c ============================================================================== --- head/sys/geom/geom_dump.c Sat Jan 16 20:51:33 2010 (r202453) +++ head/sys/geom/geom_dump.c Sun Jan 17 06:20:30 2010 (r202454) @@ -185,6 +185,10 @@ g_conf_provider(struct sbuf *sb, struct sbuf_printf(sb, "\t %jd\n", (intmax_t)pp->mediasize); sbuf_printf(sb, "\t %u\n", pp->sectorsize); + if (pp->stripesize > 0) { + sbuf_printf(sb, "\t %u\n", pp->stripesize); + sbuf_printf(sb, "\t %u\n", pp->stripeoffset); + } if (pp->geom->flags & G_GEOM_WITHER) ; else if (pp->geom->dumpconf != NULL) { From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 07:40:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C059A106566C; Sun, 17 Jan 2010 07:40:08 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:198:206::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2CC608FC16; Sun, 17 Jan 2010 07:40:07 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.3/8.14.3) with ESMTP id o0H7e1JJ040736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 17 Jan 2010 08:40:01 +0100 (CET) (envelope-from uqs@spoerlein.net) Received: (from uqs@localhost) by acme.spoerlein.net (8.14.3/8.14.3/Submit) id o0H7e1Qb040735; Sun, 17 Jan 2010 08:40:01 +0100 (CET) (envelope-from uqs@spoerlein.net) Date: Sun, 17 Jan 2010 08:40:01 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Peter Jeremy Message-ID: <20100117074001.GJ96430@acme.spoerlein.net> Mail-Followup-To: Peter Jeremy , "Robert N. M. Watson" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, freebsd-arch@freebsd.org References: <4B4E1586.7090102@FreeBSD.org> <20100114.102142.328914705071816274.imp@bsdimp.com> <20100114.105622.457034909117828677.imp@bsdimp.com> <4B4F7810.2080003@FreeBSD.org> <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> <20100115085856.GA2556@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100115085856.GA2556@server.vk2pj.dyndns.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "Robert N. M. Watson" , freebsd-arch@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 07:40:08 -0000 On Fri, 15.01.2010 at 19:58:57 +1100, Peter Jeremy wrote: > On 2010-Jan-14 20:12:24 +0000, "Robert N. M. Watson" wrote: > >- Desktop/server users who want their system to work without any > > special tuning or magic, and likely feel the comments they put in > > configuration files are important > > As far as I'm concerned, the most critical bit of my kernel config file > is the $Header...$ comment - which lets me extract the remainder of the > file from my CVS repository. I don't currently use includes (because > most of my config files have roots pre-dating the include directive). > > I find it a PITA that INCLUDE_CONFIG_FILE _doesn't_ include comments > (or at least my $Header$ line) by default. Seriously, is that the only "comment" people care about? I really have a hard time coming up with *important* stuff that people put in config's comments and then somehow lose the connection between comment and running kernel. > IMO, it would be useful to have an "include this literal string in the > kernel" config directive. This would allow config file version control > information to be embedded without needing the comments. And that would > resolve the issue of embedding fully expanded details of all included > files without the hassle of keeping the comments around. Ok, this I can understand. We could then call this directive something ... um like ident perhaps? :) Seems like all that people want to do is simply: cpu i386 ident SERVER descr "$Id: foo,v" That shouldn't be too hard? FWIW I think it is more important to have a way to recreate the current running kernel than to get a verbatim/expanded copy of all config files used to create it in the first place. Just my two cents, Uli From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 08:10:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81B98106568B; Sun, 17 Jan 2010 08:10:37 +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 715298FC16; Sun, 17 Jan 2010 08:10:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H8AbKo057737; Sun, 17 Jan 2010 08:10:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H8AbRN057735; Sun, 17 Jan 2010 08:10:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001170810.o0H8AbRN057735@svn.freebsd.org> From: Xin LI Date: Sun, 17 Jan 2010 08:10: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: r202457 - head/sbin/geom/core X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 08:10:37 -0000 Author: delphij Date: Sun Jan 17 08:10:37 2010 New Revision: 202457 URL: http://svn.freebsd.org/changeset/base/202457 Log: Stripe offset may be usable even without stripe size known, so give the output when either is non-zero. Suggested by: mav Modified: head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Sun Jan 17 06:24:24 2010 (r202456) +++ head/sbin/geom/core/geom.c Sun Jan 17 08:10:37 2010 (r202457) @@ -772,7 +772,7 @@ list_one_provider(struct gprovider *pp, printf("%sMediasize: %jd (%s)\n", prefix, (intmax_t)pp->lg_mediasize, buf); printf("%sSectorsize: %u\n", prefix, pp->lg_sectorsize); - if (pp->lg_stripesize > 0) { + if (pp->lg_stripesize > 0 || pp->lg_stripeoffset > 0) { printf("%sStripesize: %ju\n", prefix, pp->lg_stripesize); printf("%sStripeoffset: %ju\n", prefix, pp->lg_stripeoffset); } From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 08:12:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2371106566B; Sun, 17 Jan 2010 08:12:28 +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 91FAB8FC12; Sun, 17 Jan 2010 08:12:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H8CSNt058204; Sun, 17 Jan 2010 08:12:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H8CSx9058202; Sun, 17 Jan 2010 08:12:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001170812.o0H8CSx9058202@svn.freebsd.org> From: Xin LI Date: Sun, 17 Jan 2010 08:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202458 - head/lib/libgeom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 08:12:28 -0000 Author: delphij Date: Sun Jan 17 08:12:28 2010 New Revision: 202458 URL: http://svn.freebsd.org/changeset/base/202458 Log: Correct a typo (when we talk about offset, it should be offset, not size). Submitted by: pluknet at gmail com Modified: head/lib/libgeom/libgeom.3 Modified: head/lib/libgeom/libgeom.3 ============================================================================== --- head/lib/libgeom/libgeom.3 Sun Jan 17 08:10:37 2010 (r202457) +++ head/lib/libgeom/libgeom.3 Sun Jan 17 08:12:28 2010 (r202458) @@ -304,7 +304,7 @@ function returns sector size of the give .Pp The .Fn g_stripeoffset -function returns stripe size of the given provider. +function returns stripe offset of the given provider. .Pp The .Fn g_stripesize From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 08:39:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB2F4106566C; Sun, 17 Jan 2010 08:39:48 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DACDD8FC08; Sun, 17 Jan 2010 08:39:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H8dmZG064542; Sun, 17 Jan 2010 08:39:48 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H8dmYY064540; Sun, 17 Jan 2010 08:39:48 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201001170839.o0H8dmYY064540@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 17 Jan 2010 08:39:48 +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: r202459 - head/sys/netinet/ipfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 08:39:49 -0000 Author: ume Date: Sun Jan 17 08:39:48 2010 New Revision: 202459 URL: http://svn.freebsd.org/changeset/base/202459 Log: Change 'me' to match any IPv6 address configured on an interface in the system as well as any IPv4 address. Reviewed by: David Horn , luigi, qingli MFC after: 2 weeks Modified: head/sys/netinet/ipfw/ip_fw2.c Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Sun Jan 17 08:12:28 2010 (r202458) +++ head/sys/netinet/ipfw/ip_fw2.c Sun Jan 17 08:39:48 2010 (r202459) @@ -1390,7 +1390,14 @@ do { \ INADDR_TO_IFP(src_ip, tif); match = (tif != NULL); + break; } + /* FALLTHROUGH */ +#ifdef INET6 + case O_IP6_SRC_ME: + match = is_ipv6 && + search_ip6_addr_net(&args->f_id.src_ip6); +#endif break; case O_IP_DST_SET: @@ -1423,7 +1430,14 @@ do { \ INADDR_TO_IFP(dst_ip, tif); match = (tif != NULL); + break; } + /* FALLTHROUGH */ +#ifdef INET6 + case O_IP6_DST_ME: + match = is_ipv6 && + search_ip6_addr_net(&args->f_id.dst_ip6); +#endif break; case O_IP_SRCPORT: @@ -1691,14 +1705,6 @@ do { \ } break; - case O_IP6_SRC_ME: - match= is_ipv6 && search_ip6_addr_net(&args->f_id.src_ip6); - break; - - case O_IP6_DST_ME: - match= is_ipv6 && search_ip6_addr_net(&args->f_id.dst_ip6); - break; - case O_FLOW6ID: match = is_ipv6 && flow6id_match(args->f_id.flow_id6, From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 08:41:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23F06106566B; Sun, 17 Jan 2010 08:41:08 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 138178FC14; Sun, 17 Jan 2010 08:41:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H8f7hx064903; Sun, 17 Jan 2010 08:41:07 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H8f7Th064900; Sun, 17 Jan 2010 08:41:07 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201001170841.o0H8f7Th064900@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 17 Jan 2010 08:41: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: r202460 - in head/etc: . defaults X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 08:41:08 -0000 Author: ume Date: Sun Jan 17 08:41:07 2010 New Revision: 202460 URL: http://svn.freebsd.org/changeset/base/202460 Log: Remove the rules using 'me6'. Now, 'me' matches both any IPv6 address and any IPv4 address configured on an interface in the system. Reviewed by: David Horn , luigi, qingli MFC after: 2 weeks Modified: head/etc/defaults/rc.conf head/etc/rc.firewall Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sun Jan 17 08:39:48 2010 (r202459) +++ head/etc/defaults/rc.conf Sun Jan 17 08:41:07 2010 (r202460) @@ -143,9 +143,7 @@ firewall_myservices="" # List of TCP po firewall_allowservices="" # List of IPs which have access to # $firewall_myservices for "workstation" # firewall. -firewall_trusted="" # List of IPv4s which have full access to this - # host for "workstation" firewall. -firewall_trusted_ipv6="" # List of IPv6s which have full access to this +firewall_trusted="" # List of IPs which have full access to this # host for "workstation" firewall. firewall_logdeny="NO" # Set to YES to log default denied incoming # packets for "workstation" firewall. Modified: head/etc/rc.firewall ============================================================================== --- head/etc/rc.firewall Sun Jan 17 08:39:48 2010 (r202459) +++ head/etc/rc.firewall Sun Jan 17 08:41:07 2010 (r202460) @@ -212,8 +212,8 @@ case ${firewall_type} in ${fwcmd} add pass all from me to ${net} ${fwcmd} add pass all from ${net} to me if [ -n "$net6" ]; then - ${fwcmd} add pass all from me6 to ${net6} - ${fwcmd} add pass all from ${net6} to me6 + ${fwcmd} add pass all from me to ${net6} + ${fwcmd} add pass all from ${net6} to me fi if [ -n "$net6" ]; then @@ -221,7 +221,7 @@ case ${firewall_type} in ${fwcmd} add pass all from fe80::/10 to ff02::/16 ${fwcmd} add pass all from ${net6} to ff02::/16 # Allow DHCPv6 - ${fwcmd} add pass udp from fe80::/10 to me6 546 + ${fwcmd} add pass udp from fe80::/10 to me 546 fi # Allow TCP through if setup succeeded @@ -232,30 +232,18 @@ case ${firewall_type} in # Allow setup of incoming email ${fwcmd} add pass tcp from any to me 25 setup - if [ -n "$net6" ]; then - ${fwcmd} add pass tcp from any to me6 25 setup - fi # Allow setup of outgoing TCP connections only ${fwcmd} add pass tcp from me to any setup - if [ -n "$net6" ]; then - ${fwcmd} add pass tcp from me6 to any setup - fi # Disallow setup of all other TCP connections ${fwcmd} add deny tcp from any to any setup # Allow DNS queries out in the world ${fwcmd} add pass udp from me to any 53 keep-state - if [ -n "$net6" ]; then - ${fwcmd} add pass udp from me6 to any 53 keep-state - fi # Allow NTP queries out in the world ${fwcmd} add pass udp from me to any 123 keep-state - if [ -n "$net6" ]; then - ${fwcmd} add pass udp from me6 to any 123 keep-state - fi # Everything else is denied by default, unless the # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel @@ -402,25 +390,14 @@ case ${firewall_type} in # Allow setup of incoming email ${fwcmd} add pass tcp from any to me 25 setup - if [ -n "$inet6" ]; then - ${fwcmd} add pass tcp from any to me6 25 setup - fi # Allow access to our DNS ${fwcmd} add pass tcp from any to me 53 setup ${fwcmd} add pass udp from any to me 53 ${fwcmd} add pass udp from me 53 to any - if [ -n "$inet6" ]; then - ${fwcmd} add pass tcp from any to me6 53 setup - ${fwcmd} add pass udp from any to me6 53 - ${fwcmd} add pass udp from me6 53 to any - fi # Allow access to our WWW ${fwcmd} add pass tcp from any to me 80 setup - if [ -n "$inet6" ]; then - ${fwcmd} add pass tcp from any to me6 80 setup - fi # Reject&Log all setup of incoming connections from the outside ${fwcmd} add deny log ip4 from any to any in via ${oif} setup proto tcp @@ -434,15 +411,9 @@ case ${firewall_type} in # Allow DNS queries out in the world ${fwcmd} add pass udp from me to any 53 keep-state - if [ -n "$inet6" ]; then - ${fwcmd} add pass udp from me6 to any 53 keep-state - fi # Allow NTP queries out in the world ${fwcmd} add pass udp from me to any 123 keep-state - if [ -n "$inet6" ]; then - ${fwcmd} add pass udp from me6 to any 123 keep-state - fi # Everything else is denied by default, unless the # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel @@ -477,18 +448,13 @@ case ${firewall_type} in # For services permitted below. ${fwcmd} add pass tcp from me to any established - if [ $ipv6_available -eq 0 ]; then - ${fwcmd} add pass tcp from me6 to any established - fi # Allow any connection out, adding state for each. ${fwcmd} add pass tcp from me to any setup keep-state ${fwcmd} add pass udp from me to any keep-state ${fwcmd} add pass icmp from me to any keep-state if [ $ipv6_available -eq 0 ]; then - ${fwcmd} add pass tcp from me6 to any setup keep-state - ${fwcmd} add pass udp from me6 to any keep-state - ${fwcmd} add pass ipv6-icmp from me6 to any keep-state + ${fwcmd} add pass ipv6-icmp from me to any keep-state fi # Allow DHCP. @@ -496,7 +462,7 @@ case ${firewall_type} in ${fwcmd} add pass udp from any 67 to me 68 in ${fwcmd} add pass udp from any 67 to 255.255.255.255 68 in if [ $ipv6_available -eq 0 ]; then - ${fwcmd} add pass udp from fe80::/10 to me6 546 in + ${fwcmd} add pass udp from fe80::/10 to me 546 in fi # Some servers will ping the IP while trying to decide if it's # still in use. @@ -525,9 +491,6 @@ case ${firewall_type} in for i in ${firewall_allowservices} ; do for j in ${firewall_myservices} ; do ${fwcmd} add pass tcp from $i to me $j - if [ $ipv6_available -eq 0 ]; then - ${fwcmd} add pass tcp from $i to me6 $j - fi done done @@ -537,9 +500,6 @@ case ${firewall_type} in for i in ${firewall_trusted} ; do ${fwcmd} add pass ip from $i to me done - for i in ${firewall_trusted_ipv6} ; do - ${fwcmd} add pass all from $i to me6 - done ${fwcmd} add 65000 count ip from any to any From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 09:37:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39DD2106566C; Sun, 17 Jan 2010 09:37:32 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2952E8FC1E; Sun, 17 Jan 2010 09:37:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0H9bWJQ078076; Sun, 17 Jan 2010 09:37:32 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0H9bVM4078072; Sun, 17 Jan 2010 09:37:31 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201001170937.o0H9bVM4078072@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 17 Jan 2010 09:37: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: r202461 - head/bin/cp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 09:37:32 -0000 Author: gavin Date: Sun Jan 17 09:37:31 2010 New Revision: 202461 URL: http://svn.freebsd.org/changeset/base/202461 Log: Implement an "-x" option to cp(1), for compatibility with Linux and feature parity with du(1) and similar: When set, cp(1) will not traverse mount points. Initial patch by: Graham J Lee leeg teaching.physics.ox.ac.uk PR: bin/88056 Initial patch by: Graham J Lee leeg teaching.physics.ox.ac.uk Approved by: ed (mentor) MFC after: 1 month Modified: head/bin/cp/cp.1 head/bin/cp/cp.c head/bin/cp/utils.c Modified: head/bin/cp/cp.1 ============================================================================== --- head/bin/cp/cp.1 Sun Jan 17 08:41:07 2010 (r202460) +++ head/bin/cp/cp.1 Sun Jan 17 09:37:31 2010 (r202461) @@ -32,7 +32,7 @@ .\" @(#)cp.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 27, 2006 +.Dd January 17, 2010 .Dt CP 1 .Os .Sh NAME @@ -45,7 +45,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpv +.Op Fl alpvx .Ar source_file target_file .Nm .Oo @@ -53,7 +53,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpv +.Op Fl alpvx .Ar source_file ... target_directory .Sh DESCRIPTION In the first synopsis form, the @@ -183,6 +183,8 @@ permissions. Cause .Nm to be verbose, showing files as they are copied. +.It Fl x +File system mount points are not traversed. .El .Pp For each destination file that already exists, its contents are Modified: head/bin/cp/cp.c ============================================================================== --- head/bin/cp/cp.c Sun Jan 17 08:41:07 2010 (r202460) +++ head/bin/cp/cp.c Sun Jan 17 09:37:31 2010 (r202461) @@ -101,8 +101,9 @@ main(int argc, char *argv[]) int Hflag, Lflag, Pflag, ch, fts_options, r, have_trailing_slash; char *target; + fts_options = FTS_NOCHDIR | FTS_PHYSICAL; Hflag = Lflag = Pflag = 0; - while ((ch = getopt(argc, argv, "HLPRafilnprv")) != -1) + while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -150,6 +151,9 @@ main(int argc, char *argv[]) case 'v': vflag = 1; break; + case 'x': + fts_options |= FTS_XDEV; + break; default: usage(); break; @@ -160,7 +164,6 @@ main(int argc, char *argv[]) if (argc < 2) usage(); - fts_options = FTS_NOCHDIR | FTS_PHYSICAL; if (Rflag && rflag) errx(1, "the -R and -r options may not be specified together"); if (rflag) Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Sun Jan 17 08:41:07 2010 (r202460) +++ head/bin/cp/utils.c Sun Jan 17 09:37:31 2010 (r202461) @@ -518,8 +518,8 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", -"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file target_file", -" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file ... " +"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file", +" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... " "target_directory"); exit(EX_USAGE); } From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 12:57:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8078C106566B; Sun, 17 Jan 2010 12:57:11 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D8C48FC08; Sun, 17 Jan 2010 12:57:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HCvBP3027966; Sun, 17 Jan 2010 12:57:11 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HCvBHi027960; Sun, 17 Jan 2010 12:57:11 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171257.o0HCvBHi027960@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 12:57:11 +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: r202468 - in head: sys/kern sys/netinet sys/netinet6 sys/sys usr.sbin/jail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 12:57:11 -0000 Author: bz Date: Sun Jan 17 12:57:11 2010 New Revision: 202468 URL: http://svn.freebsd.org/changeset/base/202468 Log: Add ip4.saddrsel/ip4.nosaddrsel (and equivalent for ip6) to control whether to use source address selection (default) or the primary jail address for unbound outgoing connections. This is intended to be used by people upgrading from single-IP jails to multi-IP jails but not having to change firewall rules, application ACLs, ... but to force their connections (unless otherwise changed) to the primry jail IP they had been used for years, as well as for people prefering to implement similar policies. Note that for IPv6, if configured incorrectly, this might lead to scope violations, which single-IPv6 jails could as well, as by the design of jails. [1] Reviewed by: jamie, hrs (ipv6 part) Pointed out by: hrs [1] MFC After: 2 weeks Asked for by: Jase Thew (bazerka beardz.net) Modified: head/sys/kern/kern_jail.c head/sys/netinet/in_pcb.c head/sys/netinet6/in6_src.c head/sys/sys/jail.h head/usr.sbin/jail/jail.8 Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Sun Jan 17 11:21:18 2010 (r202467) +++ head/sys/kern/kern_jail.c Sun Jan 17 12:57:11 2010 (r202468) @@ -77,6 +77,21 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); +/* Keep struct prison prison0 and some code in kern_jail_set() readable. */ +#ifdef INET +#ifdef INET6 +#define _PR_IP_SADDRSEL PR_IP4_SADDRSEL|PR_IP6_SADDRSEL +#else +#define _PR_IP_SADDRSEL PR_IP4_SADDRSEL +#endif +#else /* !INET */ +#ifdef INET6 +#define _PR_IP_SADDRSEL PR_IP6_SADDRSEL +#else +#define _PR_IP_SADDRSEL 0 +#endif +#endif + /* prison0 describes what is "real" about the system. */ struct prison prison0 = { .pr_id = 0, @@ -89,9 +104,9 @@ struct prison prison0 = { .pr_hostuuid = DEFAULT_HOSTUUID, .pr_children = LIST_HEAD_INITIALIZER(prison0.pr_children), #ifdef VIMAGE - .pr_flags = PR_HOST|PR_VNET, + .pr_flags = PR_HOST|PR_VNET|_PR_IP_SADDRSEL, #else - .pr_flags = PR_HOST, + .pr_flags = PR_HOST|_PR_IP_SADDRSEL, #endif .pr_allow = PR_ALLOW_ALL, }; @@ -129,10 +144,22 @@ static int prison_restrict_ip6(struct pr */ static char *pr_flag_names[] = { [0] = "persist", +#ifdef INET + [7] = "ip4.saddrsel", +#endif +#ifdef INET6 + [8] = "ip6.saddrsel", +#endif }; static char *pr_flag_nonames[] = { [0] = "nopersist", +#ifdef INET + [7] = "ip4.nosaddrsel", +#endif +#ifdef INET6 + [8] = "ip6.nosaddrsel", +#endif }; struct jailsys_flags { @@ -1199,6 +1226,9 @@ kern_jail_set(struct thread *td, struct #endif } #endif + /* Source address selection is always on by default. */ + pr->pr_flags |= _PR_IP_SADDRSEL; + pr->pr_securelevel = ppr->pr_securelevel; pr->pr_allow = JAIL_DEFAULT_ALLOW & ppr->pr_allow; pr->pr_enforce_statfs = JAIL_DEFAULT_ENFORCE_STATFS; @@ -2659,6 +2689,41 @@ prison_get_ip4(struct ucred *cred, struc } /* + * Return 1 if we should do proper source address selection or are not jailed. + * We will return 0 if we should bypass source address selection in favour + * of the primary jail IPv4 address. Only in this case *ia will be updated and + * returned in NBO. + * Return EAFNOSUPPORT, in case this jail does not allow IPv4. + */ +int +prison_saddrsel_ip4(struct ucred *cred, struct in_addr *ia) +{ + struct prison *pr; + struct in_addr lia; + int error; + + KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); + KASSERT(ia != NULL, ("%s: ia is NULL", __func__)); + + if (!jailed(cred)) + return (1); + + pr = cred->cr_prison; + if (pr->pr_flags & PR_IP4_SADDRSEL) + return (1); + + lia.s_addr = INADDR_ANY; + error = prison_get_ip4(cred, &lia); + if (error) + return (error); + if (lia.s_addr == INADDR_ANY) + return (1); + + ia->s_addr = lia.s_addr; + return (0); +} + +/* * Return true if pr1 and pr2 have the same IPv4 address restrictions. */ int @@ -2964,6 +3029,41 @@ prison_get_ip6(struct ucred *cred, struc } /* + * Return 1 if we should do proper source address selection or are not jailed. + * We will return 0 if we should bypass source address selection in favour + * of the primary jail IPv6 address. Only in this case *ia will be updated and + * returned in NBO. + * Return EAFNOSUPPORT, in case this jail does not allow IPv6. + */ +int +prison_saddrsel_ip6(struct ucred *cred, struct in6_addr *ia6) +{ + struct prison *pr; + struct in6_addr lia6; + int error; + + KASSERT(cred != NULL, ("%s: cred is NULL", __func__)); + KASSERT(ia6 != NULL, ("%s: ia6 is NULL", __func__)); + + if (!jailed(cred)) + return (1); + + pr = cred->cr_prison; + if (pr->pr_flags & PR_IP6_SADDRSEL) + return (1); + + lia6 = in6addr_any; + error = prison_get_ip6(cred, &lia6); + if (error) + return (error); + if (IN6_IS_ADDR_UNSPECIFIED(&lia6)) + return (1); + + bcopy(&lia6, ia6, sizeof(struct in6_addr)); + return (0); +} + +/* * Return true if pr1 and pr2 have the same IPv6 address restrictions. */ int @@ -4116,12 +4216,18 @@ SYSCTL_JAIL_PARAM_SYS_NODE(ip4, CTLFLAG_ "Jail IPv4 address virtualization"); SYSCTL_JAIL_PARAM_STRUCT(_ip4, addr, CTLFLAG_RW, sizeof(struct in_addr), "S,in_addr,a", "Jail IPv4 addresses"); +SYSCTL_JAIL_PARAM(_ip4, saddrsel, CTLTYPE_INT | CTLFLAG_RW, + "B", "Do (not) use IPv4 source address selection rather than the " + "primary jail IPv4 address."); #endif #ifdef INET6 SYSCTL_JAIL_PARAM_SYS_NODE(ip6, CTLFLAG_RDTUN, "Jail IPv6 address virtualization"); SYSCTL_JAIL_PARAM_STRUCT(_ip6, addr, CTLFLAG_RW, sizeof(struct in6_addr), "S,in6_addr,a", "Jail IPv6 addresses"); +SYSCTL_JAIL_PARAM(_ip6, saddrsel, CTLTYPE_INT | CTLFLAG_RW, + "B", "Do (not) use IPv6 source address selection rather than the " + "primary jail IPv6 address."); #endif SYSCTL_JAIL_PARAM_NODE(allow, "Jail permission flags"); Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun Jan 17 11:21:18 2010 (r202467) +++ head/sys/netinet/in_pcb.c Sun Jan 17 12:57:11 2010 (r202468) @@ -552,6 +552,13 @@ in_pcbladdr(struct inpcb *inp, struct in KASSERT(laddr != NULL, ("%s: laddr NULL", __func__)); + /* + * Bypass source address selection and use the primary jail IP + * if requested. + */ + if (cred != NULL && !prison_saddrsel_ip4(cred, laddr)) + return (0); + error = 0; bzero(&sro, sizeof(sro)); Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Sun Jan 17 11:21:18 2010 (r202467) +++ head/sys/netinet6/in6_src.c Sun Jan 17 12:57:11 2010 (r202468) @@ -271,6 +271,13 @@ in6_selectsrc(struct sockaddr_in6 *dstso } /* + * Bypass source address selection and use the primary jail IP + * if requested. + */ + if (cred != NULL && !prison_saddrsel_ip6(cred, srcp)) + return (0); + + /* * If the address is not specified, choose the best one based on * the outgoing interface and the destination address. */ Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Sun Jan 17 11:21:18 2010 (r202467) +++ head/sys/sys/jail.h Sun Jan 17 12:57:11 2010 (r202468) @@ -191,6 +191,10 @@ struct prison { #define PR_VNET 0x00000010 /* Virtual network stack */ #define PR_IP4_DISABLE 0x00000020 /* Disable IPv4 */ #define PR_IP6_DISABLE 0x00000040 /* Disable IPv6 */ +#define PR_IP4_SADDRSEL 0x00000080 /* Do IPv4 src addr sel. or use the */ + /* primary jail address. */ +#define PR_IP6_SADDRSEL 0x00000100 /* Do IPv6 src addr sel. or use the */ + /* primary jail address. */ /* Internal flag bits */ #define PR_REMOVE 0x01000000 /* In process of being removed */ @@ -362,12 +366,14 @@ int prison_get_ip4(struct ucred *cred, s int prison_local_ip4(struct ucred *cred, struct in_addr *ia); int prison_remote_ip4(struct ucred *cred, struct in_addr *ia); int prison_check_ip4(struct ucred *cred, struct in_addr *ia); +int prison_saddrsel_ip4(struct ucred *, struct in_addr *); #ifdef INET6 int prison_equal_ip6(struct prison *, struct prison *); int prison_get_ip6(struct ucred *, struct in6_addr *); int prison_local_ip6(struct ucred *, struct in6_addr *, int); int prison_remote_ip6(struct ucred *, struct in6_addr *); int prison_check_ip6(struct ucred *, struct in6_addr *); +int prison_saddrsel_ip6(struct ucred *, struct in6_addr *); #endif int prison_check_af(struct ucred *cred, int af); int prison_if(struct ucred *cred, struct sockaddr *sa); Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Sun Jan 17 11:21:18 2010 (r202467) +++ head/usr.sbin/jail/jail.8 Sun Jan 17 12:57:11 2010 (r202468) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 18, 2009 +.Dd January 17, 2010 .Dt JAIL 8 .Os .Sh NAME @@ -252,6 +252,13 @@ match. It is only possible to start multiple jails with the same IP address, if none of the jails has more than this single overlapping IP address assigned to itself. +.It Va ip4.saddrsel +A boolean option to change the formerly mentioned behaviour and disable +IPv4 source address selection for the prison in favour of the primary +IPv4 address of the jail. +Source address selection is enabled by default for all jails and a +.Va ip4.nosaddrsel +setting of a parent jail is not inherited for any child jails. .It Va ip4 Control the availablity of IPv4 addresses. Possible values are @@ -267,9 +274,10 @@ Setting the .Va ip4.addr parameter implies a value of .Dq new . -.It Va ip6.addr , Va ip6 -A list of IPv6 addresses assigned to the prison, the counterpart to -.Va ip4.addr +.It Va ip6.addr , Va ip6.saddrsel , Va ip6 +A set of IPv6 options for the prison, the counterparts to +.Va ip4.addr , +.Va ip4.saddrsel and .Va ip4 above. From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 13:07:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 627A81065672; Sun, 17 Jan 2010 13:07:52 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 517078FC15; Sun, 17 Jan 2010 13:07:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HD7q4s030467; Sun, 17 Jan 2010 13:07:52 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HD7qKI030464; Sun, 17 Jan 2010 13:07:52 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001171307.o0HD7qKI030464@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jan 2010 13:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202469 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 13:07:52 -0000 Author: bz Date: Sun Jan 17 13:07:52 2010 New Revision: 202469 URL: http://svn.freebsd.org/changeset/base/202469 Log: Garbage collect references to the no longer implemented tcp_fasttimo(). Discussed with: rwatson MFC after: 5 days Modified: head/sys/netinet/tcp_var.h head/sys/netinet6/in6_proto.c Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sun Jan 17 12:57:11 2010 (r202468) +++ head/sys/netinet/tcp_var.h Sun Jan 17 13:07:52 2010 (r202469) @@ -648,7 +648,6 @@ int tcp_ctloutput(struct socket *, stru struct tcpcb * tcp_drop(struct tcpcb *, int); void tcp_drain(void); -void tcp_fasttimo(void); void tcp_init(void); #ifdef VIMAGE void tcp_destroy(void); Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Sun Jan 17 12:57:11 2010 (r202468) +++ head/sys/netinet6/in6_proto.c Sun Jan 17 13:07:52 2010 (r202469) @@ -173,7 +173,6 @@ struct ip6protosw inet6sw[] = { .pr_ctloutput = tcp_ctloutput, #ifndef INET /* don't call initialization and timeout routines twice */ .pr_init = tcp_init, - .pr_fasttimo = tcp_fasttimo, .pr_slowtimo = tcp_slowtimo, #endif .pr_drain = tcp_drain, From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 15:43:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0431B106566B; Sun, 17 Jan 2010 15:43:15 +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 E72E78FC1A; Sun, 17 Jan 2010 15:43:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HFhE3S068914; Sun, 17 Jan 2010 15:43:14 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HFhErI068912; Sun, 17 Jan 2010 15:43:14 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001171543.o0HFhErI068912@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 15:43: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: r202487 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 15:43:15 -0000 Author: ed Date: Sun Jan 17 15:43:14 2010 New Revision: 202487 URL: http://svn.freebsd.org/changeset/base/202487 Log: Simplify ttyslot(3). After comparing how other systems deal with utmp/utmpx, I noticed many systems don't even care about ttyslot(3) anymore, since utmpx doesn't use TTY slots anyway. We don't provide any tools to access old utmp files anymore, so there is no use in letting applications write to a proper offset within the utmp file. Just let ttyslot(3) always return 0, which seems to be the default behaviour on operating systems like Linux as well. Modified: head/lib/libc/gen/ttyslot.c Modified: head/lib/libc/gen/ttyslot.c ============================================================================== --- head/lib/libc/gen/ttyslot.c Sun Jan 17 15:21:24 2010 (r202486) +++ head/lib/libc/gen/ttyslot.c Sun Jan 17 15:43:14 2010 (r202487) @@ -33,35 +33,11 @@ static char sccsid[] = "@(#)ttyslot.c 8. #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include -#include - int __ttyslot(void) { - struct ttyent *ttyp; - int slot; - int cnt; - char *name; - setttyent(); - for (cnt = 0; cnt < 3; ++cnt) - if ( (name = ttyname(cnt)) ) { - if (strncmp(name, _PATH_DEV, sizeof _PATH_DEV - 1) != 0) - break; - name += sizeof _PATH_DEV - 1; - for (slot = 1; (ttyp = getttyent()); ++slot) - if (!strcmp(ttyp->ty_name, name)) { - endttyent(); - return(slot); - } - break; - } - endttyent(); - return(0); + return (0); } __sym_compat(ttyslot, __ttyslot, FBSD_1.0); From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 17:52:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF576106566C; Sun, 17 Jan 2010 17:52:35 +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 DF8998FC16; Sun, 17 Jan 2010 17:52:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HHqZpU099662; Sun, 17 Jan 2010 17:52:35 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HHqZPU099660; Sun, 17 Jan 2010 17:52:35 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001171752.o0HHqZPU099660@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 17:52:35 +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: r202500 - head/lib/libutil X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 17:52:36 -0000 Author: ed Date: Sun Jan 17 17:52:35 2010 New Revision: 202500 URL: http://svn.freebsd.org/changeset/base/202500 Log: Fix a regression that was introduced in r191882. I changed login_tty() to only work when the application is not a session leader yet. This works fine for applications in the base system, but it turns out various applications call this function after daemonizing, which means they already use their own session. If setsid() fails, just call tcsetsid() on the current session. tcsetsid() will already perform proper security checks. Reported by: Oliver Lehmann MFC after: 1 week Modified: head/lib/libutil/login_tty.c Modified: head/lib/libutil/login_tty.c ============================================================================== --- head/lib/libutil/login_tty.c Sun Jan 17 17:49:28 2010 (r202499) +++ head/lib/libutil/login_tty.c Sun Jan 17 17:52:35 2010 (r202500) @@ -50,7 +50,7 @@ login_tty(int fd) s = setsid(); if (s == -1) - return (-1); + s = getsid(0); if (tcsetsid(fd, s) == -1) return (-1); (void) dup2(fd, 0); From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 19:10:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F37F7106566B; Sun, 17 Jan 2010 19:10:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id AADE38FC18; Sun, 17 Jan 2010 19:10:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 15FCE41C757; Sun, 17 Jan 2010 20:10:07 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id Wg8jYtvqTEwK; Sun, 17 Jan 2010 20:10:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 4C2E841C759; Sun, 17 Jan 2010 20:10:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 77F2D4448EC; Sun, 17 Jan 2010 19:06:26 +0000 (UTC) Date: Sun, 17 Jan 2010 19:06:26 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: TAKAHASHI Yoshihiro In-Reply-To: <20100117.124146.27866377.nyan@FreeBSD.org> Message-ID: <20100117190512.A50938@maildrop.int.zabbadoz.net> References: <201001161224.o0GCOCOI094360@svn.freebsd.org> <20100116.220840.91363215.nyan@FreeBSD.org> <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> <20100117.124146.27866377.nyan@FreeBSD.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: attilio@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202441 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 19:10:08 -0000 On Sun, 17 Jan 2010, TAKAHASHI Yoshihiro wrote: > In article <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> > Attilio Rao writes: > >> Thanks for reporting this. >> This further patch should fix the problem for i386 and possibly pc98 >> (linked with your patch): >> http://www.freebsd.org/~attilio/atpic.diff > > Please apply the same change to sys/pc98/cbus/clock.c, and it's fine. > > Please feel free to commit my patch. Something similar is also still needed for i386 as the XBOX kernel still doesn't compile. I would have tested the following patch there, just when I found this thread: Index: sys/i386/isa/clock.c =================================================================== --- sys/i386/isa/clock.c (revision 202484) +++ sys/i386/isa/clock.c (working copy) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); */ #include "opt_apic.h" +#include "opt_atpic.h" #include "opt_clock.h" #include "opt_kdtrace.h" #include "opt_isa.h" @@ -65,7 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef DEV_APIC +#if defined(DEV_APIC) || defined(DEV_ATPIC) #include #endif #include -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 19:17:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACD9B1065670; Sun, 17 Jan 2010 19:17:16 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D3EE8FC18; Sun, 17 Jan 2010 19:17:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJHGhU020595; Sun, 17 Jan 2010 19:17:16 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJHGUp020593; Sun, 17 Jan 2010 19:17:16 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171917.o0HJHGUp020593@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202516 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 19:17:16 -0000 Author: rrs Date: Sun Jan 17 19:17:16 2010 New Revision: 202516 URL: http://svn.freebsd.org/changeset/base/202516 Log: Remove strange APPLE define that leaked through the scrubber scripts. Scripts are now fixed so this won't happen again. Modified: head/sys/netinet/sctp_constants.h Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sun Jan 17 18:37:36 2010 (r202515) +++ head/sys/netinet/sctp_constants.h Sun Jan 17 19:17:16 2010 (r202516) @@ -276,28 +276,16 @@ __FBSDID("$FreeBSD$"); #define SCTP_SCALE_FOR_ADDR 2 /* default AUTO_ASCONF mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_AUTO_ASCONF) -#define SCTP_DEFAULT_AUTO_ASCONF 0 -#else #define SCTP_DEFAULT_AUTO_ASCONF 1 -#endif /* default MULTIPLE_ASCONF mode enable(1)/disable(0) value (sysctl) */ #define SCTP_DEFAULT_MULTIPLE_ASCONFS 0 /* default MOBILITY_BASE mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_MOBILITY_BASE) -#define SCTP_DEFAULT_MOBILITY_BASE 0 -#else #define SCTP_DEFAULT_MOBILITY_BASE 0 -#endif /* default MOBILITY_FASTHANDOFF mode enable(1)/disable(0) value (sysctl) */ -#if defined (__APPLE__) && !defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) #define SCTP_DEFAULT_MOBILITY_FASTHANDOFF 0 -#else -#define SCTP_DEFAULT_MOBILITY_FASTHANDOFF 0 -#endif /* * Theshold for rwnd updates, we have to read (sb_hiwat >> From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 19:21:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E223E1065692; Sun, 17 Jan 2010 19:21:50 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2D828FC1A; Sun, 17 Jan 2010 19:21:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJLosS021679; Sun, 17 Jan 2010 19:21:50 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJLopD021677; Sun, 17 Jan 2010 19:21:50 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171921.o0HJLopD021677@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:21:50 +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: r202517 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 19:21:51 -0000 Author: rrs Date: Sun Jan 17 19:21:50 2010 New Revision: 202517 URL: http://svn.freebsd.org/changeset/base/202517 Log: Remove another set of "leaked" ifdefs that somehow found their way into FreeBSD. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Jan 17 19:17:16 2010 (r202516) +++ head/sys/netinet/sctp_output.c Sun Jan 17 19:21:50 2010 (r202517) @@ -3490,11 +3490,7 @@ sctp_lowlevel_chunk_output(struct sctp_i tos_value = inp->ip_inp.inp.inp_ip_tos; } if ((nofragment_flag) && (port == 0)) { -#if defined(WITH_CONVERT_IP_OFF) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__Userspace__) ip->ip_off = IP_DF; -#else - ip->ip_off = htons(IP_DF); -#endif } else ip->ip_off = 0; From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 19:24:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95B89106566B; Sun, 17 Jan 2010 19:24:30 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B6CB8FC14; Sun, 17 Jan 2010 19:24:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJOU0I022336; Sun, 17 Jan 2010 19:24:30 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJOU36022334; Sun, 17 Jan 2010 19:24:30 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171924.o0HJOU36022334@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:24:30 +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: r202518 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 19:24:30 -0000 Author: rrs Date: Sun Jan 17 19:24:30 2010 New Revision: 202518 URL: http://svn.freebsd.org/changeset/base/202518 Log: More leaked ifdefs for APPLE and its mobility stuff. Modified: head/sys/netinet/sctp_sysctl.c Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Sun Jan 17 19:21:50 2010 (r202517) +++ head/sys/netinet/sctp_sysctl.c Sun Jan 17 19:24:30 2010 (r202518) @@ -556,9 +556,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) if (error == 0) { RANGECHK(SCTP_BASE_SYSCTL(sctp_sendspace), SCTPCTL_MAXDGRAM_MIN, SCTPCTL_MAXDGRAM_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_recvspace), SCTPCTL_RECVSPACE_MIN, SCTPCTL_RECVSPACE_MAX); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_AUTO_ASCONF) RANGECHK(SCTP_BASE_SYSCTL(sctp_auto_asconf), SCTPCTL_AUTOASCONF_MIN, SCTPCTL_AUTOASCONF_MAX); -#endif RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_enable), SCTPCTL_ECN_ENABLE_MIN, SCTPCTL_ECN_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_nonce), SCTPCTL_ECN_NONCE_MIN, SCTPCTL_ECN_NONCE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_sacks), SCTPCTL_STRICT_SACKS_MIN, SCTPCTL_STRICT_SACKS_MAX); @@ -613,12 +611,8 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_default_frag_interleave), SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN, SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_vtag_time_wait), SCTPCTL_TIME_WAIT_MIN, SCTPCTL_TIME_WAIT_MAX); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_BASE) RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_base), SCTPCTL_MOBILITY_BASE_MIN, SCTPCTL_MOBILITY_BASE_MAX); -#endif -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), SCTPCTL_MOBILITY_FASTHANDOFF_MIN, SCTPCTL_MOBILITY_FASTHANDOFF_MAX); -#endif RANGECHK(SCTP_BASE_SYSCTL(sctp_udp_tunneling_for_client_enable), SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MIN, SCTPCTL_UDP_TUNNELING_FOR_CLIENT_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_enable_sack_immediately), SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN, SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly), SCTPCTL_NAT_FRIENDLY_INITS_MIN, SCTPCTL_NAT_FRIENDLY_INITS_MAX); @@ -660,11 +654,9 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, re &SCTP_BASE_SYSCTL(sctp_recvspace), 0, sysctl_sctp_check, "IU", SCTPCTL_RECVSPACE_DESC); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_AUTO_ASCONF) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, auto_asconf, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_auto_asconf), 0, sysctl_sctp_check, "IU", SCTPCTL_AUTOASCONF_DESC); -#endif SYSCTL_PROC(_net_inet_sctp, OID_AUTO, ecn_enable, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_ecn_enable), 0, sysctl_sctp_check, "IU", @@ -871,17 +863,13 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, de &SCTP_BASE_SYSCTL(sctp_default_frag_interleave), 0, sysctl_sctp_check, "IU", SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC); -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_BASE) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mobility_base, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_mobility_base), 0, sysctl_sctp_check, "IU", SCTPCTL_MOBILITY_BASE_DESC); -#endif -#if defined(__FreeBSD__) || defined(SCTP_APPLE_MOBILITY_FASTHANDOFF) SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mobility_fasthandoff, CTLTYPE_INT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), 0, sysctl_sctp_check, "IU", SCTPCTL_MOBILITY_FASTHANDOFF_DESC); -#endif #if defined(SCTP_LOCAL_TRACE_BUF) SYSCTL_STRUCT(_net_inet_sctp, OID_AUTO, log, CTLFLAG_RD, From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 19:33:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE95A106566C; Sun, 17 Jan 2010 19:33:32 +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 AE5E28FC0C; Sun, 17 Jan 2010 19:33:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJXWWs024454; Sun, 17 Jan 2010 19:33:32 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJXWZf024452; Sun, 17 Jan 2010 19:33:32 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001171933.o0HJXWZf024452@svn.freebsd.org> From: Christian Brueffer Date: Sun, 17 Jan 2010 19:33: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: r202519 - head/sbin/geom/class/mountver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 19:33:32 -0000 Author: brueffer Date: Sun Jan 17 19:33:32 2010 New Revision: 202519 URL: http://svn.freebsd.org/changeset/base/202519 Log: Small fixes. Modified: head/sbin/geom/class/mountver/gmountver.8 Modified: head/sbin/geom/class/mountver/gmountver.8 ============================================================================== --- head/sbin/geom/class/mountver/gmountver.8 Sun Jan 17 19:24:30 2010 (r202518) +++ head/sbin/geom/class/mountver/gmountver.8 Sun Jan 17 19:33:32 2010 (r202519) @@ -54,7 +54,7 @@ .Sh DESCRIPTION The .Nm -utility is used to control mount verification GEOM class. +utility is used to control the mount verification GEOM class. When configured, it passes all the I/O requests to the underlying provider. When the underlying provider disappears - for example because the disk device got disconnected - it queues all the I/O requests and waits for the provider @@ -111,9 +111,10 @@ This can be set to a number between 0 an If set to 0 minimal debug information is printed, and if set to 3 the maximum amount of debug information is printed. .It Va kern.geom.mountver.check.check_ident : No 1 -This can be set to 0 or 1. If set to 0, +This can be set to 0 or 1. +If set to 0, .Nm -will reattach to the device even if the device reports different disk ID. +will reattach to the device even if the device reports a different disk ID. .El .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 19:35:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E9551065692; Sun, 17 Jan 2010 19:35:38 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 642258FC12; Sun, 17 Jan 2010 19:35:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJZcSt024982; Sun, 17 Jan 2010 19:35:38 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJZcqU024979; Sun, 17 Jan 2010 19:35:38 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171935.o0HJZcqU024979@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:35:38 +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: r202520 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 19:35:38 -0000 Author: rrs Date: Sun Jan 17 19:35:38 2010 New Revision: 202520 URL: http://svn.freebsd.org/changeset/base/202520 Log: This change syncs up the socketAPI stream-reset values to match those in linux and the I-D just released to the IETF. Modified: head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Sun Jan 17 19:33:32 2010 (r202519) +++ head/sys/netinet/sctp_uio.h Sun Jan 17 19:35:38 2010 (r202520) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); typedef uint32_t sctp_assoc_t; +/* Compatibility to previous define's */ +#define sctp_stream_reset_events sctp_stream_reset_event + /* On/Off setup for subscription to events */ struct sctp_event_subscribe { uint8_t sctp_data_io_event; @@ -57,7 +60,7 @@ struct sctp_event_subscribe { uint8_t sctp_adaptation_layer_event; uint8_t sctp_authentication_event; uint8_t sctp_sender_dry_event; - uint8_t sctp_stream_reset_events; + uint8_t sctp_stream_reset_event; }; /* ancillary data types */ @@ -402,19 +405,19 @@ union sctp_notification { }; /* notification types */ -#define SCTP_ASSOC_CHANGE 0x0001 -#define SCTP_PEER_ADDR_CHANGE 0x0002 -#define SCTP_REMOTE_ERROR 0x0003 -#define SCTP_SEND_FAILED 0x0004 -#define SCTP_SHUTDOWN_EVENT 0x0005 -#define SCTP_ADAPTATION_INDICATION 0x0006 +#define SCTP_ASSOC_CHANGE 0x0001 +#define SCTP_PEER_ADDR_CHANGE 0x0002 +#define SCTP_REMOTE_ERROR 0x0003 +#define SCTP_SEND_FAILED 0x0004 +#define SCTP_SHUTDOWN_EVENT 0x0005 +#define SCTP_ADAPTATION_INDICATION 0x0006 /* same as above */ -#define SCTP_ADAPTION_INDICATION 0x0006 -#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007 -#define SCTP_AUTHENTICATION_EVENT 0x0008 -#define SCTP_STREAM_RESET_EVENT 0x0009 -#define SCTP_SENDER_DRY_EVENT 0x000a - +#define SCTP_ADAPTION_INDICATION 0x0006 +#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007 +#define SCTP_AUTHENTICATION_EVENT 0x0008 +#define SCTP_STREAM_RESET_EVENT 0x0009 +#define SCTP_SENDER_DRY_EVENT 0x000a +#define SCTP__NOTIFICATIONS_STOPPED_EVENT 0x000b /* we dont send this */ /* * socket option structs */ Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun Jan 17 19:33:32 2010 (r202519) +++ head/sys/netinet/sctp_usrreq.c Sun Jan 17 19:35:38 2010 (r202520) @@ -2008,7 +2008,7 @@ flags_out: events->sctp_sender_dry_event = 1; if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT)) - events->sctp_stream_reset_events = 1; + events->sctp_stream_reset_event = 1; SCTP_INP_RUNLOCK(inp); *optsize = sizeof(struct sctp_event_subscribe); } @@ -3650,7 +3650,7 @@ sctp_setopt(struct socket *so, int optna sctp_feature_off(inp, SCTP_PCB_FLAGS_DRYEVNT); } - if (events->sctp_stream_reset_events) { + if (events->sctp_stream_reset_event) { sctp_feature_on(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT); } else { sctp_feature_off(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT); From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 19:40:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E7F2106566B; Sun, 17 Jan 2010 19:40:21 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F23E8FC1C; Sun, 17 Jan 2010 19:40:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJeLXc026079; Sun, 17 Jan 2010 19:40:21 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJeLoM026077; Sun, 17 Jan 2010 19:40:21 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171940.o0HJeLoM026077@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202521 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 19:40:21 -0000 Author: rrs Date: Sun Jan 17 19:40:21 2010 New Revision: 202521 URL: http://svn.freebsd.org/changeset/base/202521 Log: Pulls out another leaked windows ifdef that somehow made its way through the scrubber. Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Jan 17 19:35:38 2010 (r202520) +++ head/sys/netinet/sctputil.c Sun Jan 17 19:40:21 2010 (r202521) @@ -52,15 +52,9 @@ __FBSDID("$FreeBSD$"); #define NUMBER_OF_MTU_SIZES 18 -#if defined(__Windows__) && !defined(SCTP_LOCAL_TRACE_BUF) -#include "eventrace_netinet.h" -#include "sctputil.tmh" /* this is the file that will be auto - * generated */ -#else #ifndef KTR_SCTP #define KTR_SCTP KTR_SUBSYS #endif -#endif void sctp_sblog(struct sockbuf *sb, From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 19:47:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D67171065676; Sun, 17 Jan 2010 19:47:42 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6AAB8FC0A; Sun, 17 Jan 2010 19:47:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJlgRa027825; Sun, 17 Jan 2010 19:47:42 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJlghn027823; Sun, 17 Jan 2010 19:47:42 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001171947.o0HJlghn027823@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 17 Jan 2010 19:47:42 +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: r202522 - head/lib/libpam/modules/pam_krb5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 19:47:42 -0000 Author: marcel Date: Sun Jan 17 19:47:42 2010 New Revision: 202522 URL: http://svn.freebsd.org/changeset/base/202522 Log: Unbreak builds with _FREEFALL_CONFIG=yes, by forcing a lower WARNS level in that case. Modified: head/lib/libpam/modules/pam_krb5/Makefile Modified: head/lib/libpam/modules/pam_krb5/Makefile ============================================================================== --- head/lib/libpam/modules/pam_krb5/Makefile Sun Jan 17 19:40:21 2010 (r202521) +++ head/lib/libpam/modules/pam_krb5/Makefile Sun Jan 17 19:47:42 2010 (r202522) @@ -29,6 +29,7 @@ SRCS= pam_krb5.c MAN= pam_krb5.8 .if defined(_FREEFALL_CONFIG) CFLAGS+=-D_FREEFALL_CONFIG +WARNS= 3 .endif DPADD= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO} From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 19:48:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1106B106566B; Sun, 17 Jan 2010 19:48:00 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01C2E8FC12; Sun, 17 Jan 2010 19:48:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HJlxxn027925; Sun, 17 Jan 2010 19:47:59 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HJlxTb027923; Sun, 17 Jan 2010 19:47:59 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001171947.o0HJlxTb027923@svn.freebsd.org> From: Randall Stewart Date: Sun, 17 Jan 2010 19:47: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: r202523 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 19:48:00 -0000 Author: rrs Date: Sun Jan 17 19:47:59 2010 New Revision: 202523 URL: http://svn.freebsd.org/changeset/base/202523 Log: Bug fix: If the allocation of a socket failed and we freed the inpcb, it was possible to not set the proper flags on the pcb (i.e. the socket is not there). This is HIGHLY unlikely since no one else should be able to find the socket.. but for consistency we do the proper loop thing to make sure that we mark the socket as gone on the PCB. Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun Jan 17 19:47:42 2010 (r202522) +++ head/sys/netinet/sctp_usrreq.c Sun Jan 17 19:47:59 2010 (r202523) @@ -551,6 +551,7 @@ sctp_attach(struct socket *so, int proto sctp_log_closing(inp, NULL, 17); #endif if (error != 0) { +try_again: flags = inp->sctp_flags; if (((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) && (atomic_cmpset_int(&inp->sctp_flags, flags, (flags | SCTP_PCB_FLAGS_SOCKET_GONE | SCTP_PCB_FLAGS_CLOSE_IP)))) { @@ -561,7 +562,12 @@ sctp_attach(struct socket *so, int proto sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT, SCTP_CALLED_AFTER_CMPSET_OFCLOSE); } else { - SCTP_INP_WUNLOCK(inp); + flags = inp->sctp_flags; + if ((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) { + goto try_again; + } else { + SCTP_INP_WUNLOCK(inp); + } } return error; } From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 21:00:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28E961065676; Sun, 17 Jan 2010 21:00:29 +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 1841B8FC19; Sun, 17 Jan 2010 21:00:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HL0TrQ044463; Sun, 17 Jan 2010 21:00:29 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HL0TFM044459; Sun, 17 Jan 2010 21:00:29 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001172100.o0HL0TFM044459@svn.freebsd.org> From: Michael Tuexen Date: Sun, 17 Jan 2010 21:00:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202526 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 21:00:29 -0000 Author: tuexen Date: Sun Jan 17 21:00:28 2010 New Revision: 202526 URL: http://svn.freebsd.org/changeset/base/202526 Log: Get rid of a lot of duplicated code for NR-SACK handle. Generalize the SACK to code handle also NR-SACKs. Modified: head/sys/netinet/sctp_header.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_indata.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_structs.h Modified: head/sys/netinet/sctp_header.h ============================================================================== --- head/sys/netinet/sctp_header.h Sun Jan 17 20:49:34 2010 (r202525) +++ head/sys/netinet/sctp_header.h Sun Jan 17 21:00:28 2010 (r202526) @@ -284,13 +284,6 @@ struct sctp_sack_chunk { struct sctp_sack sack; } SCTP_PACKED; - -/* EY Following 3 structs define NR Selective Ack (NR_SACK) chunk */ -struct sctp_nr_gap_ack_block { - uint16_t start; /* NR Gap Ack block start */ - uint16_t end; /* NR Gap Ack block end */ -} SCTP_PACKED; - struct sctp_nr_sack { uint32_t cum_tsn_ack; /* cumulative TSN Ack */ uint32_t a_rwnd; /* updated a_rwnd of sender */ @@ -299,7 +292,6 @@ struct sctp_nr_sack { uint16_t num_dup_tsns; /* number of duplicate TSNs */ uint16_t reserved; /* not currently used */ /* struct sctp_gap_ack_block's follow */ - /* struct sctp_nr_gap_ack_block's follow */ /* uint32_t duplicate_tsn's follow */ } SCTP_PACKED; Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sun Jan 17 20:49:34 2010 (r202525) +++ head/sys/netinet/sctp_indata.c Sun Jan 17 21:00:28 2010 (r202526) @@ -439,12 +439,11 @@ abandon: * EY!-TODO- this tsn should be tagged nr only if it is * out-of-order, the if statement should be modified */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { nr_tsn = chk->rec.data.TSN_seq; SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); - if ((nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3)) || - (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { + if ((nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { /* * EY The 1st should never happen, as in * process_a_data_chunk method this check @@ -525,11 +524,11 @@ abandon: * nr_gap and tag this tsn * NR */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - printf("Impossible NR gap calculation?\n"); /* * EY The * 1st @@ -694,7 +693,8 @@ protocol_error: * calculate the gap and such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -750,11 +750,11 @@ protocol_error: * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { - printf("Impossible nr TSN set 3?\n"); /* * EY The 1st should never * happen, as in @@ -773,7 +773,8 @@ protocol_error: SCTP_TCB_LOCK_ASSERT(stcb); SCTP_REVERSE_OUT_TSN_PRES(nr_gap, nr_tsn, asoc); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, nr_gap); - if (compare_with_wrap(nr_tsn, asoc->highest_tsn_inside_nr_map, + if (compare_with_wrap(nr_tsn, + asoc->highest_tsn_inside_nr_map, MAX_TSN)) asoc->highest_tsn_inside_nr_map = nr_tsn; } @@ -1759,7 +1760,8 @@ sctp_process_a_data_chunk(struct sctp_tc SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); /* EY set this tsn present in nr_sack's nr_mapping_array */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap); SCTP_REVERSE_OUT_TSN_PRES(gap, tsn, asoc); @@ -2015,7 +2017,8 @@ failed_express_del: * block here I should check if this delivered tsn * is out_of_order, if yes then update the nr_map */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { /* EY debugging block */ { /* @@ -2260,13 +2263,13 @@ failed_pdapi_express_del: sctp_add_to_readq(stcb->sctp_ep, stcb, control, &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); - /* * EY It is added to the read queue in prev if block * here I should check if this delivered tsn is * out_of_order, if yes then update the nr_map */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { /* * EY check if the mapping_array and * nr_mapping array are consistent @@ -2412,6 +2415,10 @@ finish_express_del: SCTP_TCB_LOCK_ASSERT(stcb); SCTP_SET_TSN_PRESENT(asoc->mapping_array, gap); + /* + * EY - set tsn present in nr-map if doing nr-sacks and the tsn is + * non-renegable + */ if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack && (SCTP_BASE_SYSCTL(sctp_do_drain) == 0)) { @@ -3416,49 +3423,37 @@ sctp_process_segment_range(struct sctp_t } -static void +static int sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct sctp_association *asoc, - struct sctp_sack_chunk *ch, uint32_t last_tsn, uint32_t * biggest_tsn_acked, + uint32_t last_tsn, uint32_t * biggest_tsn_acked, uint32_t * biggest_newly_acked_tsn, uint32_t * this_sack_lowest_newack, - int num_seg, int *ecn_seg_sums) + int num_seg, int num_nr_seg, int *ecn_seg_sums) { - /************************************************/ - /* process fragments and update sendqueue */ - /************************************************/ - struct sctp_sack *sack; struct sctp_gap_ack_block *frag, block; struct sctp_tmit_chunk *tp1; int i; int num_frs = 0; + int chunk_freed; + int non_revocable; + uint16_t frag_strt, frag_end; + uint32_t last_frag_high; - uint16_t frag_strt, frag_end, primary_flag_set; - u_long last_frag_high; - - /* - * @@@ JRI : TODO: This flag is not used anywhere .. remove? - */ - if (asoc->primary_destination->dest_state & SCTP_ADDR_SWITCH_PRIMARY) { - primary_flag_set = 1; - } else { - primary_flag_set = 0; - } - sack = &ch->sack; - - frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, - sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); - *offset += sizeof(block); - if (frag == NULL) { - return; - } tp1 = NULL; last_frag_high = 0; - for (i = 0; i < num_seg; i++) { + chunk_freed = 0; + + for (i = 0; i < (num_seg + num_nr_seg); i++) { + frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, + sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); + *offset += sizeof(block); + if (frag == NULL) { + return (chunk_freed); + } frag_strt = ntohs(frag->start); frag_end = ntohs(frag->end); /* some sanity checks on the fragment offsets */ if (frag_strt > frag_end) { /* this one is malformed, skip */ - frag++; continue; } if (compare_with_wrap((frag_end + last_tsn), *biggest_tsn_acked, @@ -3468,7 +3463,6 @@ sctp_handle_segments(struct mbuf *m, int /* mark acked dgs and find out the highestTSN being acked */ if (tp1 == NULL) { tp1 = TAILQ_FIRST(&asoc->sent_queue); - /* save the locations of the last frags */ last_frag_high = frag_end + last_tsn; } else { @@ -3496,14 +3490,15 @@ sctp_handle_segments(struct mbuf *m, int } last_frag_high = frag_end + last_tsn; } - sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, - 0, &num_frs, biggest_newly_acked_tsn, - this_sack_lowest_newack, ecn_seg_sums); - frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, - sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); - *offset += sizeof(block); - if (frag == NULL) { - break; + if (i < num_seg) { + non_revocable = 0; + } else { + non_revocable = 1; + } + if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, + non_revocable, &num_frs, biggest_newly_acked_tsn, + this_sack_lowest_newack, ecn_seg_sums)) { + chunk_freed = 1; } } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) { @@ -3512,6 +3507,7 @@ sctp_handle_segments(struct mbuf *m, int *biggest_newly_acked_tsn, last_tsn, SCTP_FR_LOG_BIGGEST_TSNS); } + return (chunk_freed); } static void @@ -4450,7 +4446,6 @@ sctp_express_handle_sack(struct sctp_tcb struct socket *so; #endif - SOCKBUF_LOCK(&stcb->sctp_socket->so_snd); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { /* sa_ignore NO_NULL_CHK */ @@ -4525,10 +4520,10 @@ sctp_express_handle_sack(struct sctp_tcb if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_resync_tsn, MAX_TSN)) { asoc->nonce_sum_check = 1; /* - * now we must calculate what the base is. + * Now we must calculate what the base is. * We do this based on two things, we know * the total's for all the segments - * gap-acked in the SACK (none), We also + * gap-acked in the SACK (none). We also * know the SACK's nonce sum, its in * nonce_sum_flag. So we can build a truth * table to back-calculate the new value of @@ -4567,6 +4562,7 @@ again: /* sa_ignore FREED_MEMORY */ TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { if (tp1->window_probe) { + /* move back to data send queue */ sctp_window_probe_recovery(stcb, asoc, net, tp1); break; } @@ -4620,9 +4616,7 @@ again: */ if (sctp_fs_audit(asoc)) { TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - if (net->flight_size) { - net->flight_size = 0; - } + net->flight_size = 0; } asoc->total_flight = 0; asoc->total_flight_count = 0; @@ -4782,20 +4776,62 @@ again: } } +/* EY- nr_sack */ +/* Identifies the non-renegable tsns that are revoked*/ +static void +sctp_check_for_nr_revoked(struct sctp_tcb *stcb, + struct sctp_association *asoc, uint32_t cumack, + u_long biggest_tsn_acked) +{ + struct sctp_tmit_chunk *tp1; + + for (tp1 = TAILQ_FIRST(&asoc->sent_queue); tp1; tp1 = TAILQ_NEXT(tp1, sctp_next)) { + if (compare_with_wrap(tp1->rec.data.TSN_seq, cumack, + MAX_TSN)) { + /* + * ok this guy is either ACK or MARKED. If it is + * ACKED it has been previously acked but not this + * time i.e. revoked. If it is MARKED it was ACK'ed + * again. + */ + if (compare_with_wrap(tp1->rec.data.TSN_seq, biggest_tsn_acked, + MAX_TSN)) + break; + + + if (tp1->sent == SCTP_DATAGRAM_NR_ACKED) { + /* + * EY! a non-renegable TSN is revoked, need + * to abort the association + */ + /* + * EY TODO: put in the code to abort the + * assoc. + */ + return; + } else if (tp1->sent == SCTP_DATAGRAM_NR_MARKED) { + /* it has been re-acked in this SACK */ + tp1->sent = SCTP_DATAGRAM_NR_ACKED; + } + } + if (tp1->sent == SCTP_DATAGRAM_UNSENT) + break; + } + return; +} + void -sctp_handle_sack(struct mbuf *m, int offset, - struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, - struct sctp_nets *net_from, int *abort_now, int sack_len, uint32_t rwnd) +sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup, + struct sctp_tcb *stcb, struct sctp_nets *net_from, + uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup, + int *abort_now, uint8_t flags, + uint32_t cum_ack, uint32_t rwnd) { struct sctp_association *asoc; - struct sctp_sack *sack; struct sctp_tmit_chunk *tp1, *tp2; - uint32_t cum_ack, last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, - this_sack_lowest_newack; + uint32_t last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack; uint32_t sav_cum_ack; - uint16_t num_seg, num_dup; uint16_t wake_him = 0; - unsigned int sack_length; uint32_t send_s = 0; long j; int accum_moved = 0; @@ -4831,15 +4867,13 @@ sctp_handle_sack(struct mbuf *m, int off * if in shutdown_recv state. */ SCTP_TCB_LOCK_ASSERT(stcb); - sack = &ch->sack; /* CMT DAC algo */ this_sack_lowest_newack = 0; j = 0; - sack_length = (unsigned int)sack_len; - /* ECN Nonce */ SCTP_STAT_INCR(sctps_slowpath_sack); - nonce_sum_flag = ch->ch.chunk_flags & SCTP_SACK_NONCE_SUM; - cum_ack = last_tsn = ntohl(sack->cum_tsn_ack); + last_tsn = cum_ack; + nonce_sum_flag = flags & SCTP_SACK_NONCE_SUM; + cmt_dac_flag = flags & SCTP_SACK_CMT_DAC; #ifdef SCTP_ASOCLOG_OF_TSNS stcb->asoc.cumack_log[stcb->asoc.cumack_log_at] = cum_ack; stcb->asoc.cumack_log_at++; @@ -4847,13 +4881,12 @@ sctp_handle_sack(struct mbuf *m, int off stcb->asoc.cumack_log_at = 0; } #endif - num_seg = ntohs(sack->num_gap_ack_blks); a_rwnd = rwnd; - /* CMT DAC algo */ - cmt_dac_flag = ch->ch.chunk_flags & SCTP_SACK_CMT_DAC; - num_dup = ntohs(sack->num_dup_tsns); - + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_SACK_ARRIVALS_ENABLE) { + sctp_misc_ints(SCTP_SACK_LOG_NORMAL, cum_ack, + rwnd, stcb->asoc.last_acked_seq, stcb->asoc.peers_rwnd); + } old_rwnd = stcb->asoc.peers_rwnd; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { sctp_misc_ints(SCTP_THRESHOLD_CLEAR, @@ -4873,27 +4906,16 @@ sctp_handle_sack(struct mbuf *m, int off SCTP_LOG_NEW_SACK); } if ((num_dup) && (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_FR_LOGGING_ENABLE | SCTP_EARLYFR_LOGGING_ENABLE))) { - int off_to_dup, iii; + uint16_t i; uint32_t *dupdata, dblock; - off_to_dup = (num_seg * sizeof(struct sctp_gap_ack_block)) + sizeof(struct sctp_sack_chunk); - if ((off_to_dup + (num_dup * sizeof(uint32_t))) <= sack_length) { - dupdata = (uint32_t *) sctp_m_getptr(m, off_to_dup, + for (i = 0; i < num_dup; i++) { + dupdata = (uint32_t *) sctp_m_getptr(m, offset_dup + i * sizeof(uint32_t), sizeof(uint32_t), (uint8_t *) & dblock); - off_to_dup += sizeof(uint32_t); - if (dupdata) { - for (iii = 0; iii < num_dup; iii++) { - sctp_log_fr(*dupdata, 0, 0, SCTP_FR_DUPED); - dupdata = (uint32_t *) sctp_m_getptr(m, off_to_dup, - sizeof(uint32_t), (uint8_t *) & dblock); - if (dupdata == NULL) - break; - off_to_dup += sizeof(uint32_t); - } + if (dupdata == NULL) { + break; } - } else { - SCTP_PRINTF("Size invalid offset to dups:%d number dups:%d sack_len:%d num gaps:%d\n", - off_to_dup, num_dup, sack_length, num_seg); + sctp_log_fr(*dupdata, 0, 0, SCTP_FR_DUPED); } } if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { @@ -4915,8 +4937,6 @@ sctp_handle_sack(struct mbuf *m, int off hopeless_peer: panic("Impossible sack 1"); #else - - /* * no way, we have not even sent this TSN out yet. * Peer is hopelessly messed up with us. @@ -4956,8 +4976,7 @@ sctp_handle_sack(struct mbuf *m, int off /* update the Rwnd of the peer */ if (TAILQ_EMPTY(&asoc->sent_queue) && TAILQ_EMPTY(&asoc->send_queue) && - (asoc->stream_queue_cnt == 0) - ) { + (asoc->stream_queue_cnt == 0)) { /* nothing left on send/sent and strmq */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_RWND_ENABLE) { sctp_log_rwnd_set(SCTP_SET_PEER_RWND_VIA_SACK, @@ -5128,14 +5147,7 @@ sctp_handle_sack(struct mbuf *m, int off /* always set this up to cum-ack */ asoc->this_sack_highest_gap = last_tsn; - /* Move offset up to point to gaps/dups */ - offset += sizeof(struct sctp_sack_chunk); - if (((num_seg * (sizeof(struct sctp_gap_ack_block))) + sizeof(struct sctp_sack_chunk)) > sack_length) { - - /* skip corrupt segments */ - goto skip_segments; - } - if (num_seg > 0) { + if ((num_seg > 0) || (num_nr_seg > 0)) { /* * CMT: SFR algo (and HTNA) - this_sack_highest_newack has @@ -5153,10 +5165,11 @@ sctp_handle_sack(struct mbuf *m, int off * handling NEWLY ACKED chunks. this_sack_lowest_newack is * used for CMT DAC algo. saw_newack will also change. */ - sctp_handle_segments(m, &offset, stcb, asoc, ch, last_tsn, - &biggest_tsn_acked, &biggest_tsn_newly_acked, &this_sack_lowest_newack, - num_seg, &ecn_seg_sums); - + if (sctp_handle_segments(m, &offset_seg, stcb, asoc, last_tsn, &biggest_tsn_acked, + &biggest_tsn_newly_acked, &this_sack_lowest_newack, + num_seg, num_nr_seg, &ecn_seg_sums)) { + wake_him++; + } if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { /* * validate the biggest_tsn_acked in the gap acks if @@ -5172,7 +5185,6 @@ sctp_handle_sack(struct mbuf *m, int off } } } -skip_segments: /*******************************************/ /* cancel ALL T3-send timer if accum moved */ /*******************************************/ @@ -5310,6 +5322,19 @@ done_with_it: if (tp1 != NULL) { /* Peer revoked all dg's marked or acked */ TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { + /* + * EY- maybe check only if it is nr_acked + * nr_marked may not be possible + */ + if ((tp1->sent == SCTP_DATAGRAM_NR_ACKED) || + (tp1->sent == SCTP_DATAGRAM_NR_MARKED)) { + /* + * EY! - TODO: Something previously + * nr_gapped is reneged, abort the + * association + */ + return; + } if ((tp1->sent > SCTP_DATAGRAM_RESEND) && (tp1->sent < SCTP_FORWARD_TSN_SKIP)) { tp1->sent = SCTP_DATAGRAM_SENT; @@ -5345,6 +5370,10 @@ done_with_it: else asoc->saw_sack_with_frags = 0; + /* EY! - not sure about if there should be an IF */ + if (num_nr_seg > 0) + sctp_check_for_nr_revoked(stcb, asoc, cum_ack, biggest_tsn_acked); + /* JRS - Use the congestion control given in the CC module */ asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, accum_moved, reneged_all, will_exit_fast_recovery); @@ -5480,7 +5509,7 @@ done_with_it: if (SCTP_BASE_SYSCTL(sctp_cmt_on_off) && SCTP_BASE_SYSCTL(sctp_cmt_use_dac) && (cmt_dac_flag == 0)) { this_sack_lowest_newack = cum_ack; } - if (num_seg > 0) { + if ((num_seg > 0) || (num_nr_seg > 0)) { sctp_strike_gap_ack_chunks(stcb, asoc, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack, accum_moved); } @@ -5603,9 +5632,12 @@ again: } if (net->flight_size) { j++; - sctp_timer_start(SCTP_TIMER_TYPE_SEND, - stcb->sctp_ep, stcb, net); + if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { + sctp_timer_start(SCTP_TIMER_TYPE_SEND, + stcb->sctp_ep, stcb, net); + } if (net->window_probe) { + net->window_probe = 0; } } else { if (net->window_probe) { @@ -5613,7 +5645,6 @@ again: * In window probes we must assure a timer * is still running there */ - if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, net); @@ -5661,7 +5692,11 @@ again: done_once = 1; goto again; } - /* Fix up the a-p-a-p for future PR-SCTP sends */ + /*********************************************/ + /* Here we perform PR-SCTP procedures */ + /* (section 4.2) */ + /*********************************************/ + /* C1. update advancedPeerAckPoint */ if (compare_with_wrap(cum_ack, asoc->advanced_peer_ack_point, MAX_TSN)) { asoc->advanced_peer_ack_point = cum_ack; } @@ -5773,8 +5808,8 @@ sctp_kick_prsctp_reorder_queue(struct sc * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { - + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -5874,7 +5909,8 @@ sctp_kick_prsctp_reorder_queue(struct sc * such then tag this TSN nr * chk->rec.data.TSN_seq */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && asoc->peer_supports_nr_sack) { + if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && + asoc->peer_supports_nr_sack) { SCTP_CALC_TSN_TO_GAP(nr_gap, nr_tsn, asoc->nr_mapping_array_base_tsn); if ((nr_gap >= (SCTP_NR_MAPPING_ARRAY << 3)) || (nr_gap >= (uint32_t) (asoc->nr_mapping_array_size << 3))) { @@ -6359,1743 +6395,3 @@ sctp_handle_forward_tsn(struct sctp_tcb sctp_deliver_reasm_check(stcb, &stcb->asoc); } } - -/* EY fully identical to sctp_express_handle_sack, duplicated for only naming convention */ -void -sctp_express_handle_nr_sack(struct sctp_tcb *stcb, uint32_t cumack, - uint32_t rwnd, int nonce_sum_flag, int *abort_now) -{ - struct sctp_nets *net; - struct sctp_association *asoc; - struct sctp_tmit_chunk *tp1, *tp2; - uint32_t old_rwnd; - int win_probe_recovery = 0; - int win_probe_recovered = 0; - int j, done_once = 0; - - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_SACK_ARRIVALS_ENABLE) { - sctp_misc_ints(SCTP_SACK_LOG_EXPRESS, cumack, - rwnd, stcb->asoc.last_acked_seq, stcb->asoc.peers_rwnd); - } - SCTP_TCB_LOCK_ASSERT(stcb); -#ifdef SCTP_ASOCLOG_OF_TSNS - stcb->asoc.cumack_log[stcb->asoc.cumack_log_at] = cumack; - stcb->asoc.cumack_log_at++; - if (stcb->asoc.cumack_log_at > SCTP_TSN_LOG_SIZE) { - stcb->asoc.cumack_log_at = 0; - } -#endif - asoc = &stcb->asoc; - old_rwnd = asoc->peers_rwnd; - if (compare_with_wrap(asoc->last_acked_seq, cumack, MAX_TSN)) { - /* old ack */ - return; - } else if (asoc->last_acked_seq == cumack) { - /* Window update sack */ - asoc->peers_rwnd = sctp_sbspace_sub(rwnd, - (uint32_t) (asoc->total_flight + (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); - if (asoc->peers_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_sender) { - /* SWS sender side engages */ - asoc->peers_rwnd = 0; - } - if (asoc->peers_rwnd > old_rwnd) { - goto again; - } - return; - } - /* First setup for CC stuff */ - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->prev_cwnd = net->cwnd; - net->net_ack = 0; - net->net_ack2 = 0; - - /* - * CMT: Reset CUC and Fast recovery algo variables before - * SACK processing - */ - net->new_pseudo_cumack = 0; - net->will_exit_fast_recovery = 0; - } - if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) { - uint32_t send_s; - - if (!TAILQ_EMPTY(&asoc->sent_queue)) { - tp1 = TAILQ_LAST(&asoc->sent_queue, - sctpchunk_listhead); - send_s = tp1->rec.data.TSN_seq + 1; - } else { - send_s = asoc->sending_seq; - } - if ((cumack == send_s) || - compare_with_wrap(cumack, send_s, MAX_TSN)) { -#ifndef INVARIANTS - struct mbuf *oper; - -#endif -#ifdef INVARIANTS - panic("Impossible sack 1"); -#else - *abort_now = 1; - /* XXX */ - oper = sctp_get_mbuf_for_msg((sizeof(struct sctp_paramhdr) + sizeof(uint32_t)), - 0, M_DONTWAIT, 1, MT_DATA); - if (oper) { - struct sctp_paramhdr *ph; - uint32_t *ippp; - - SCTP_BUF_LEN(oper) = sizeof(struct sctp_paramhdr) + - sizeof(uint32_t); - ph = mtod(oper, struct sctp_paramhdr *); - ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION); - ph->param_length = htons(SCTP_BUF_LEN(oper)); - ippp = (uint32_t *) (ph + 1); - *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_25); - } - stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; - sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_PEER_FAULTY, oper, SCTP_SO_NOT_LOCKED); - return; -#endif - } - } - asoc->this_sack_highest_gap = cumack; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_THRESHOLD_LOGGING) { - sctp_misc_ints(SCTP_THRESHOLD_CLEAR, - stcb->asoc.overall_error_count, - 0, - SCTP_FROM_SCTP_INDATA, - __LINE__); - } - stcb->asoc.overall_error_count = 0; - if (compare_with_wrap(cumack, asoc->last_acked_seq, MAX_TSN)) { - /* process the new consecutive TSN first */ - tp1 = TAILQ_FIRST(&asoc->sent_queue); - while (tp1) { - tp2 = TAILQ_NEXT(tp1, sctp_next); - if (compare_with_wrap(cumack, tp1->rec.data.TSN_seq, - MAX_TSN) || - cumack == tp1->rec.data.TSN_seq) { - if (tp1->sent == SCTP_DATAGRAM_UNSENT) { - printf("Warning, an unsent is now acked?\n"); - } - /* - * ECN Nonce: Add the nonce to the sender's - * nonce sum - */ - asoc->nonce_sum_expect_base += tp1->rec.data.ect_nonce; - if (tp1->sent < SCTP_DATAGRAM_ACKED) { - /* - * If it is less than ACKED, it is - * now no-longer in flight. Higher - * values may occur during marking - */ - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { - sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_CA, - tp1->whoTo->flight_size, - tp1->book_size, - (uintptr_t) tp1->whoTo, - tp1->rec.data.TSN_seq); - } - sctp_flight_size_decrease(tp1); - /* sa_ignore NO_NULL_CHK */ - sctp_total_flight_decrease(stcb, tp1); - } - tp1->whoTo->net_ack += tp1->send_size; - if (tp1->snd_count < 2) { - /* - * True non-retransmited - * chunk - */ - tp1->whoTo->net_ack2 += - tp1->send_size; - - /* update RTO too? */ - if (tp1->do_rtt) { - tp1->whoTo->RTO = - /* - * sa_ignore - * NO_NULL_CHK - */ - sctp_calculate_rto(stcb, - asoc, tp1->whoTo, - &tp1->sent_rcv_time, - sctp_align_safe_nocopy); - tp1->do_rtt = 0; - } - } - /* - * CMT: CUCv2 algorithm. From the - * cumack'd TSNs, for each TSN being - * acked for the first time, set the - * following variables for the - * corresp destination. - * new_pseudo_cumack will trigger a - * cwnd update. - * find_(rtx_)pseudo_cumack will - * trigger search for the next - * expected (rtx-)pseudo-cumack. - */ - tp1->whoTo->new_pseudo_cumack = 1; - tp1->whoTo->find_pseudo_cumack = 1; - tp1->whoTo->find_rtx_pseudo_cumack = 1; - - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { - /* sa_ignore NO_NULL_CHK */ - sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.TSN_seq, SCTP_CWND_LOG_FROM_SACK); - } - } - if (tp1->sent == SCTP_DATAGRAM_RESEND) { - sctp_ucount_decr(asoc->sent_queue_retran_cnt); - } - if (tp1->rec.data.chunk_was_revoked) { - /* deflate the cwnd */ - tp1->whoTo->cwnd -= tp1->book_size; - tp1->rec.data.chunk_was_revoked = 0; - } - tp1->sent = SCTP_DATAGRAM_ACKED; - TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next); - if (tp1->data) { - /* sa_ignore NO_NULL_CHK */ - sctp_free_bufspace(stcb, asoc, tp1, 1); - sctp_m_freem(tp1->data); - } - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) { - sctp_log_sack(asoc->last_acked_seq, - cumack, - tp1->rec.data.TSN_seq, - 0, - 0, - SCTP_LOG_FREE_SENT); - } - tp1->data = NULL; - asoc->sent_queue_cnt--; - sctp_free_a_chunk(stcb, tp1); - tp1 = tp2; - } else { - break; - } - } - - } - /* sa_ignore NO_NULL_CHK */ - if (stcb->sctp_socket) { -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - struct socket *so; - -#endif - - SOCKBUF_LOCK(&stcb->sctp_socket->so_snd); - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { - /* sa_ignore NO_NULL_CHK */ - sctp_wakeup_log(stcb, cumack, 1, SCTP_WAKESND_FROM_SACK); - } -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - so = SCTP_INP_SO(stcb->sctp_ep); - atomic_add_int(&stcb->asoc.refcnt, 1); - SCTP_TCB_UNLOCK(stcb); - SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK(stcb); - atomic_subtract_int(&stcb->asoc.refcnt, 1); - if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { - /* assoc was freed while we were unlocked */ - SCTP_SOCKET_UNLOCK(so, 1); - return; - } -#endif - sctp_sowwakeup_locked(stcb->sctp_ep, stcb->sctp_socket); -#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - SCTP_SOCKET_UNLOCK(so, 1); -#endif - } else { - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) { - sctp_wakeup_log(stcb, cumack, 1, SCTP_NOWAKE_FROM_SACK); - } - } - - /* JRS - Use the congestion control given in the CC module */ - if (asoc->last_acked_seq != cumack) - asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, 1, 0, 0); - - asoc->last_acked_seq = cumack; - - if (TAILQ_EMPTY(&asoc->sent_queue)) { - /* nothing left in-flight */ - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->flight_size = 0; - net->partial_bytes_acked = 0; - } - asoc->total_flight = 0; - asoc->total_flight_count = 0; - } - /* Fix up the a-p-a-p for future PR-SCTP sends */ - if (compare_with_wrap(cumack, asoc->advanced_peer_ack_point, MAX_TSN)) { - asoc->advanced_peer_ack_point = cumack; - } - /* ECN Nonce updates */ - if (asoc->ecn_nonce_allowed) { - if (asoc->nonce_sum_check) { - if (nonce_sum_flag != ((asoc->nonce_sum_expect_base) & SCTP_SACK_NONCE_SUM)) { - if (asoc->nonce_wait_for_ecne == 0) { - struct sctp_tmit_chunk *lchk; - - lchk = TAILQ_FIRST(&asoc->send_queue); - asoc->nonce_wait_for_ecne = 1; - if (lchk) { - asoc->nonce_wait_tsn = lchk->rec.data.TSN_seq; - } else { - asoc->nonce_wait_tsn = asoc->sending_seq; - } - } else { - if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_wait_tsn, MAX_TSN) || - (asoc->last_acked_seq == asoc->nonce_wait_tsn)) { - /* - * Misbehaving peer. We need - * to react to this guy - */ - asoc->ecn_allowed = 0; - asoc->ecn_nonce_allowed = 0; - } - } - } - } else { - /* See if Resynchronization Possible */ - if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_resync_tsn, MAX_TSN)) { - asoc->nonce_sum_check = 1; - /* - * now we must calculate what the base is. - * We do this based on two things, we know - * the total's for all the segments - * gap-acked in the SACK (none), We also - * know the SACK's nonce sum, its in - * nonce_sum_flag. So we can build a truth - * table to back-calculate the new value of - * asoc->nonce_sum_expect_base: - * - * SACK-flag-Value Seg-Sums Base 0 0 0 - * 1 0 1 0 1 1 1 1 0 - */ - asoc->nonce_sum_expect_base = (0 ^ nonce_sum_flag) & SCTP_SACK_NONCE_SUM; - } - } - } - /* RWND update */ - asoc->peers_rwnd = sctp_sbspace_sub(rwnd, - (uint32_t) (asoc->total_flight + (asoc->sent_queue_cnt * SCTP_BASE_SYSCTL(sctp_peer_chunk_oh)))); - if (asoc->peers_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_sender) { - /* SWS sender side engages */ - asoc->peers_rwnd = 0; - } - if (asoc->peers_rwnd > old_rwnd) { - win_probe_recovery = 1; - } - /* Now assure a timer where data is queued at */ -again: - j = 0; - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - int to_ticks; - - if (win_probe_recovery && (net->window_probe)) { - win_probe_recovered = 1; - /* - * Find first chunk that was used with window probe - * and clear the sent - */ - /* sa_ignore FREED_MEMORY */ - TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { - if (tp1->window_probe) { - /* move back to data send queue */ - sctp_window_probe_recovery(stcb, asoc, net, tp1); - break; - } - } - } - if (net->RTO == 0) { - to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto); - } else { - to_ticks = MSEC_TO_TICKS(net->RTO); - } - if (net->flight_size) { - - j++; - (void)SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks, - sctp_timeout_handler, &net->rxt_timer); - if (net->window_probe) { - net->window_probe = 0; - } - } else { - if (net->window_probe) { - /* - * In window probes we must assure a timer - * is still running there - */ - net->window_probe = 0; - (void)SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks, - sctp_timeout_handler, &net->rxt_timer); - } else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { - sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, - stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_22); - } - if (SCTP_BASE_SYSCTL(sctp_early_fr)) { - if (SCTP_OS_TIMER_PENDING(&net->fr_timer.timer)) { - SCTP_STAT_INCR(sctps_earlyfrstpidsck4); - sctp_timer_stop(SCTP_TIMER_TYPE_EARLYFR, stcb->sctp_ep, stcb, net, - SCTP_FROM_SCTP_INDATA + SCTP_LOC_23); - } - } - } - } - if ((j == 0) && - (!TAILQ_EMPTY(&asoc->sent_queue)) && - (asoc->sent_queue_retran_cnt == 0) && - (win_probe_recovered == 0) && - (done_once == 0)) { - /* - * huh, this should not happen unless all packets are - * PR-SCTP and marked to skip of course. - */ - if (sctp_fs_audit(asoc)) { - TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - net->flight_size = 0; - } - asoc->total_flight = 0; - asoc->total_flight_count = 0; - asoc->sent_queue_retran_cnt = 0; - TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) { - if (tp1->sent < SCTP_DATAGRAM_RESEND) { - sctp_flight_size_increase(tp1); - sctp_total_flight_increase(stcb, tp1); - } else if (tp1->sent == SCTP_DATAGRAM_RESEND) { - asoc->sent_queue_retran_cnt++; - } - } - } - done_once = 1; - goto again; - } - /**********************************/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 21:00:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5250D1065672; Sun, 17 Jan 2010 21:00:30 +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 431C78FC1B; Sun, 17 Jan 2010 21:00:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HL0U8i044497; Sun, 17 Jan 2010 21:00:30 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HL0UZv044495; Sun, 17 Jan 2010 21:00:30 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001172100.o0HL0UZv044495@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 21:00:30 +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: r202527 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 21:00:30 -0000 Author: ed Date: Sun Jan 17 21:00:29 2010 New Revision: 202527 URL: http://svn.freebsd.org/changeset/base/202527 Log: Add forgotten break; keyword to getutxid(). We should not fall through to the ut_id comparison. Only ut_type should be compared when using OLD_TIME, NEW_TIME, BOOT_TIME or SHUTDOWN_TIME. Modified: head/lib/libc/gen/getutxent.c Modified: head/lib/libc/gen/getutxent.c ============================================================================== --- head/lib/libc/gen/getutxent.c Sun Jan 17 21:00:28 2010 (r202526) +++ head/lib/libc/gen/getutxent.c Sun Jan 17 21:00:29 2010 (r202527) @@ -164,6 +164,7 @@ getutxid(const struct utmpx *id) case SHUTDOWN_TIME: if (fu->fu_type == id->ut_type) goto found; + break; case USER_PROCESS: case INIT_PROCESS: case LOGIN_PROCESS: @@ -177,6 +178,7 @@ getutxid(const struct utmpx *id) MIN(sizeof fu->fu_id, sizeof id->ut_id)) == 0) goto found; } + break; } } From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 21:24:27 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6BEA106566C; Sun, 17 Jan 2010 21:24:27 +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 D64028FC08; Sun, 17 Jan 2010 21:24:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HLOR9m049819; Sun, 17 Jan 2010 21:24:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HLOREj049816; Sun, 17 Jan 2010 21:24:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001172124.o0HLOREj049816@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 17 Jan 2010 21:24: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: r202528 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 21:24:28 -0000 Author: kib Date: Sun Jan 17 21:24:27 2010 New Revision: 202528 URL: http://svn.freebsd.org/changeset/base/202528 Log: Add new function vunref(9) that decrements vnode use count (and hold count) while vnode is exclusively locked. The code for vput(9), vrele(9) and vunref(9) is merged. In collaboration with: pho Reviewed by: alc MFC after: 3 weeks Modified: head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Jan 17 21:00:29 2010 (r202527) +++ head/sys/kern/vfs_subr.c Sun Jan 17 21:24:27 2010 (r202528) @@ -2149,37 +2149,44 @@ vrefcnt(struct vnode *vp) return (usecnt); } +#define VPUTX_VRELE 1 +#define VPUTX_VPUT 2 +#define VPUTX_VUNREF 3 -/* - * Vnode put/release. - * If count drops to zero, call inactive routine and return to freelist. - */ -void -vrele(struct vnode *vp) +static void +vputx(struct vnode *vp, int func) { - struct thread *td = curthread; /* XXX */ + int error; - KASSERT(vp != NULL, ("vrele: null vp")); + KASSERT(vp != NULL, ("vputx: null vp")); + if (func == VPUTX_VUNREF) + ASSERT_VOP_ELOCKED(vp, "vunref"); + else if (func == VPUTX_VPUT) + ASSERT_VOP_LOCKED(vp, "vput"); + else + KASSERT(func == VPUTX_VRELE, ("vputx: wrong func")); VFS_ASSERT_GIANT(vp->v_mount); - + CTR2(KTR_VFS, "%s: vp %p", __func__, vp); VI_LOCK(vp); /* Skip this v_writecount check if we're going to panic below. */ VNASSERT(vp->v_writecount < vp->v_usecount || vp->v_usecount < 1, vp, - ("vrele: missed vn_close")); - CTR2(KTR_VFS, "%s: vp %p", __func__, vp); + ("vputx: missed vn_close")); + error = 0; if (vp->v_usecount > 1 || ((vp->v_iflag & VI_DOINGINACT) && vp->v_usecount == 1)) { + if (func == VPUTX_VPUT) + VOP_UNLOCK(vp, 0); v_decr_usecount(vp); return; } + if (vp->v_usecount != 1) { #ifdef DIAGNOSTIC - vprint("vrele: negative ref count", vp); + vprint("vputx: negative ref count", vp); #endif - VI_UNLOCK(vp); - panic("vrele: negative ref cnt"); + panic("vputx: negative ref cnt"); } CTR2(KTR_VFS, "%s: return vnode %p to the freelist", __func__, vp); /* @@ -2193,22 +2200,36 @@ vrele(struct vnode *vp) * as VI_DOINGINACT to avoid recursion. */ vp->v_iflag |= VI_OWEINACT; - if (vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK) == 0) { + if (func == VPUTX_VRELE) { + error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK); VI_LOCK(vp); - if (vp->v_usecount > 0) - vp->v_iflag &= ~VI_OWEINACT; - if (vp->v_iflag & VI_OWEINACT) - vinactive(vp, td); - VOP_UNLOCK(vp, 0); - } else { + } else if (func == VPUTX_VPUT && VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { + error = VOP_LOCK(vp, LK_UPGRADE | LK_INTERLOCK | LK_NOWAIT); VI_LOCK(vp); - if (vp->v_usecount > 0) - vp->v_iflag &= ~VI_OWEINACT; + } + if (vp->v_usecount > 0) + vp->v_iflag &= ~VI_OWEINACT; + if (error == 0) { + if (vp->v_iflag & VI_OWEINACT) + vinactive(vp, curthread); + if (func != VPUTX_VUNREF) + VOP_UNLOCK(vp, 0); } vdropl(vp); } /* + * Vnode put/release. + * If count drops to zero, call inactive routine and return to freelist. + */ +void +vrele(struct vnode *vp) +{ + + vputx(vp, VPUTX_VRELE); +} + +/* * Release an already locked vnode. This give the same effects as * unlock+vrele(), but takes less time and avoids releasing and * re-aquiring the lock (as vrele() acquires the lock internally.) @@ -2216,56 +2237,18 @@ vrele(struct vnode *vp) void vput(struct vnode *vp) { - struct thread *td = curthread; /* XXX */ - int error; - KASSERT(vp != NULL, ("vput: null vp")); - ASSERT_VOP_LOCKED(vp, "vput"); - VFS_ASSERT_GIANT(vp->v_mount); - CTR2(KTR_VFS, "%s: vp %p", __func__, vp); - VI_LOCK(vp); - /* Skip this v_writecount check if we're going to panic below. */ - VNASSERT(vp->v_writecount < vp->v_usecount || vp->v_usecount < 1, vp, - ("vput: missed vn_close")); - error = 0; + vputx(vp, VPUTX_VPUT); +} - if (vp->v_usecount > 1 || ((vp->v_iflag & VI_DOINGINACT) && - vp->v_usecount == 1)) { - VOP_UNLOCK(vp, 0); - v_decr_usecount(vp); - return; - } +/* + * Release an exclusively locked vnode. Do not unlock the vnode lock. + */ +void +vunref(struct vnode *vp) +{ - if (vp->v_usecount != 1) { -#ifdef DIAGNOSTIC - vprint("vput: negative ref count", vp); -#endif - panic("vput: negative ref cnt"); - } - CTR2(KTR_VFS, "%s: return to freelist the vnode %p", __func__, vp); - /* - * We want to hold the vnode until the inactive finishes to - * prevent vgone() races. We drop the use count here and the - * hold count below when we're done. - */ - v_decr_useonly(vp); - vp->v_iflag |= VI_OWEINACT; - if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { - error = VOP_LOCK(vp, LK_UPGRADE|LK_INTERLOCK|LK_NOWAIT); - VI_LOCK(vp); - if (error) { - if (vp->v_usecount > 0) - vp->v_iflag &= ~VI_OWEINACT; - goto done; - } - } - if (vp->v_usecount > 0) - vp->v_iflag &= ~VI_OWEINACT; - if (vp->v_iflag & VI_OWEINACT) - vinactive(vp, td); - VOP_UNLOCK(vp, 0); -done: - vdropl(vp); + vputx(vp, VPUTX_VUNREF); } /* Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Sun Jan 17 21:00:29 2010 (r202527) +++ head/sys/sys/vnode.h Sun Jan 17 21:24:27 2010 (r202528) @@ -632,6 +632,7 @@ void vholdl(struct vnode *); int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); int vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td, off_t length, int blksize); +void vunref(struct vnode *); void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3); #define vprint(label, vp) vn_printf((vp), "%s\n", (label)) int vrecycle(struct vnode *vp, struct thread *td); From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 21:26:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C97E106568B; Sun, 17 Jan 2010 21:26:15 +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 43CC88FC18; Sun, 17 Jan 2010 21:26:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HLQFG5050255; Sun, 17 Jan 2010 21:26:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HLQFkQ050252; Sun, 17 Jan 2010 21:26:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001172126.o0HLQFkQ050252@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 17 Jan 2010 21:26: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: r202529 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 21:26:15 -0000 Author: kib Date: Sun Jan 17 21:26:14 2010 New Revision: 202529 URL: http://svn.freebsd.org/changeset/base/202529 Log: When a vnode-backed vm object is referenced, it increments the vnode reference count, and decrements it on dereference. If referenced object is deallocated, object type is reset to OBJT_DEAD. Consequently, all vnode references that are owned by object references are never released. vunref() the vnode in vm object deallocation code for OBJT_VNODE appropriate number of times to prevent leak. Add an assertion to the vm_pageout() to make sure that we never get reference on the vnode but then do not execute code to release it. In collaboration with: pho Reviewed by: alc MFC after: 3 weeks Modified: head/sys/vm/vm_pageout.c head/sys/vm/vnode_pager.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun Jan 17 21:24:27 2010 (r202528) +++ head/sys/vm/vm_pageout.c Sun Jan 17 21:26:14 2010 (r202529) @@ -951,6 +951,8 @@ rescan0: vnodes_skipped++; goto unlock_and_continue; } + KASSERT(mp != NULL, + ("vp %p with NULL v_mount", vp)); vm_page_unlock_queues(); vm_object_reference_locked(object); VM_OBJECT_UNLOCK(object); Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Sun Jan 17 21:24:27 2010 (r202528) +++ head/sys/vm/vnode_pager.c Sun Jan 17 21:26:14 2010 (r202529) @@ -250,13 +250,16 @@ static void vnode_pager_dealloc(object) vm_object_t object; { - struct vnode *vp = object->handle; + struct vnode *vp; + int refs; + vp = object->handle; if (vp == NULL) panic("vnode_pager_dealloc: pager already dealloced"); VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); vm_object_pip_wait(object, "vnpdea"); + refs = object->ref_count; object->handle = NULL; object->type = OBJT_DEAD; @@ -267,6 +270,8 @@ vnode_pager_dealloc(object) ASSERT_VOP_ELOCKED(vp, "vnode_pager_dealloc"); vp->v_object = NULL; vp->v_vflag &= ~VV_TEXT; + while (refs-- > 0) + vunref(vp); } static boolean_t From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 21:40:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5AA21065693; Sun, 17 Jan 2010 21:40:05 +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 B4E888FC14; Sun, 17 Jan 2010 21:40:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HLe5Lt053327; Sun, 17 Jan 2010 21:40:05 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HLe5RR053321; Sun, 17 Jan 2010 21:40:05 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001172140.o0HLe5RR053321@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 21:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202530 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 21:40:06 -0000 Author: ed Date: Sun Jan 17 21:40:05 2010 New Revision: 202530 URL: http://svn.freebsd.org/changeset/base/202530 Log: Perform several small cleanups to the utmpx code. - Massively reduce BSS usage. Let futx_to_utx() dynamically allocate the structure. There is only a very small amount of applications out there that needs to use the utmpx database. Wasting 1 KB on unused structures makes little sense. - Just let getutxid() search for matching ut_id's for any *PROCESS-type. This makes the code a bit more future-proof. - Fix a POSIX-mistake: when reading POSIX and the OpenSolaris implementation, getutxline() must return USER_PROCESS and LOGIN_PROCESS records whose ut_lines match. When reading POSIX, it seems LOGIN_PROCESS should not use ut_line at the first place. I have reported this issue. Modified: head/lib/libc/gen/getutxent.3 head/lib/libc/gen/getutxent.c head/lib/libc/gen/pututxline.c head/lib/libc/gen/utxdb.c head/lib/libc/gen/utxdb.h Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Sun Jan 17 21:26:14 2010 (r202529) +++ head/lib/libc/gen/getutxent.3 Sun Jan 17 21:40:05 2010 (r202530) @@ -174,7 +174,9 @@ prefix, corresponding with the device us session. If no TTY character device is used, this field is left blank. This field is only applicable to entries of type -.Dv USER_PROCESS . +.Dv USER_PROCESS +and +.Dv LOGIN_PROCESS . .It Fa ut_host The network hostname of the remote system, connecting to perform a user login. Modified: head/lib/libc/gen/getutxent.c ============================================================================== --- head/lib/libc/gen/getutxent.c Sun Jan 17 21:26:14 2010 (r202529) +++ head/lib/libc/gen/getutxent.c Sun Jan 17 21:40:05 2010 (r202530) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); static FILE *uf = NULL; static int udb; -static struct utmpx utx; int setutxdb(int db, const char *file) @@ -101,70 +100,59 @@ endutxent(void) } } -static struct futx * -getfutxent(void) +static int +getfutxent(struct futx *fu) { - static struct futx fu; if (uf == NULL) setutxent(); if (uf == NULL) - return (NULL); + return (-1); if (udb == UTXDB_LOG) { uint16_t len; if (fread(&len, sizeof len, 1, uf) != 1) - return (NULL); + return (-1); len = be16toh(len); - if (len > sizeof fu) { + if (len > sizeof *fu) { /* Forward compatibility. */ - if (fread(&fu, sizeof fu, 1, uf) != 1) - return (NULL); - fseek(uf, len - sizeof fu, SEEK_CUR); + if (fread(fu, sizeof *fu, 1, uf) != 1) + return (-1); + fseek(uf, len - sizeof *fu, SEEK_CUR); } else { /* Partial record. */ - memset(&fu, 0, sizeof fu); - if (fread(&fu, len, 1, uf) != 1) - return (NULL); + memset(fu, 0, sizeof *fu); + if (fread(fu, len, 1, uf) != 1) + return (-1); } } else { - if (fread(&fu, sizeof fu, 1, uf) != 1) - return (NULL); + if (fread(fu, sizeof *fu, 1, uf) != 1) + return (-1); } - return (&fu); + return (0); } struct utmpx * getutxent(void) { - struct futx *fu; + struct futx fu; - fu = getfutxent(); - if (fu == NULL) + if (getfutxent(&fu) != 0) return (NULL); - futx_to_utx(fu, &utx); - return (&utx); + return (futx_to_utx(&fu)); } struct utmpx * getutxid(const struct utmpx *id) { - struct futx *fu; + struct futx fu; for (;;) { - fu = getfutxent(); - if (fu == NULL) + if (getfutxent(&fu) != 0) return (NULL); - switch (fu->fu_type) { - case BOOT_TIME: - case OLD_TIME: - case NEW_TIME: - case SHUTDOWN_TIME: - if (fu->fu_type == id->ut_type) - goto found; - break; + switch (fu.fu_type) { case USER_PROCESS: case INIT_PROCESS: case LOGIN_PROCESS: @@ -174,61 +162,62 @@ getutxid(const struct utmpx *id) case INIT_PROCESS: case LOGIN_PROCESS: case DEAD_PROCESS: - if (memcmp(fu->fu_id, id->ut_id, - MIN(sizeof fu->fu_id, sizeof id->ut_id)) == 0) + if (memcmp(fu.fu_id, id->ut_id, + MIN(sizeof fu.fu_id, sizeof id->ut_id)) == 0) goto found; } break; + default: + if (fu.fu_type == id->ut_type) + goto found; + break; } } found: - futx_to_utx(fu, &utx); - return (&utx); + return (futx_to_utx(&fu)); } struct utmpx * getutxline(const struct utmpx *line) { - struct futx *fu; + struct futx fu; for (;;) { - fu = getfutxent(); - if (fu == NULL) + if (getfutxent(&fu) != 0) return (NULL); - switch (fu->fu_type) { + switch (fu.fu_type) { case USER_PROCESS: case LOGIN_PROCESS: - if (strncmp(fu->fu_line, line->ut_line, - MIN(sizeof fu->fu_line, sizeof line->ut_line)) == 0) + if (strncmp(fu.fu_line, line->ut_line, + MIN(sizeof fu.fu_line, sizeof line->ut_line)) == 0) goto found; + break; } } found: - futx_to_utx(fu, &utx); - return (&utx); + return (futx_to_utx(&fu)); } struct utmpx * getutxuser(const char *user) { - struct futx *fu; + struct futx fu; for (;;) { - fu = getfutxent(); - if (fu == NULL) + if (getfutxent(&fu) != 0) return (NULL); - switch (fu->fu_type) { + switch (fu.fu_type) { case USER_PROCESS: - if (strncmp(fu->fu_user, user, sizeof fu->fu_user) == 0) + if (strncmp(fu.fu_user, user, sizeof fu.fu_user) == 0) goto found; + break; } } found: - futx_to_utx(fu, &utx); - return (&utx); + return (futx_to_utx(&fu)); } Modified: head/lib/libc/gen/pututxline.c ============================================================================== --- head/lib/libc/gen/pututxline.c Sun Jan 17 21:26:14 2010 (r202529) +++ head/lib/libc/gen/pututxline.c Sun Jan 17 21:40:05 2010 (r202530) @@ -240,7 +240,6 @@ struct utmpx * pututxline(const struct utmpx *utmpx) { struct futx fu; - static struct utmpx ut; utx_to_futx(utmpx, &fu); @@ -272,6 +271,5 @@ pututxline(const struct utmpx *utmpx) } utx_log_add(&fu); - futx_to_utx(&fu, &ut); - return (&ut); + return (futx_to_utx(&fu)); } Modified: head/lib/libc/gen/utxdb.c ============================================================================== --- head/lib/libc/gen/utxdb.c Sun Jan 17 21:26:14 2010 (r202529) +++ head/lib/libc/gen/utxdb.c Sun Jan 17 21:40:05 2010 (r202530) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include #include #include #include "utxdb.h" @@ -82,6 +83,8 @@ utx_to_futx(const struct utmpx *ut, stru case LOGIN_PROCESS: UTOF_ID(ut, fu); UTOF_STRING(ut, fu, user); + /* XXX: bug in the specification? Needed for getutxline(). */ + UTOF_STRING(ut, fu, line); UTOF_PID(ut, fu); break; case DEAD_PROCESS: @@ -118,11 +121,18 @@ utx_to_futx(const struct utmpx *ut, stru (ut)->ut_tv.tv_usec = t % 1000000; \ } while (0) -void -futx_to_utx(const struct futx *fu, struct utmpx *ut) +struct utmpx * +futx_to_utx(const struct futx *fu) { + static struct utmpx *ut; - memset(ut, 0, sizeof *ut); + if (ut == NULL) { + ut = calloc(1, sizeof *ut); + if (ut == NULL) + return (NULL); + } else { + memset(ut, 0, sizeof *ut); + } switch (fu->fu_type) { case BOOT_TIME: @@ -146,6 +156,8 @@ futx_to_utx(const struct futx *fu, struc case LOGIN_PROCESS: FTOU_ID(fu, ut); FTOU_STRING(fu, ut, user); + /* XXX: bug in the specification? Needed for getutxline(). */ + FTOU_STRING(fu, ut, line); FTOU_PID(fu, ut); break; case DEAD_PROCESS: @@ -154,9 +166,10 @@ futx_to_utx(const struct futx *fu, struc break; default: ut->ut_type = EMPTY; - return; + return (ut); } FTOU_TYPE(fu, ut); FTOU_TV(fu, ut); + return (ut); } Modified: head/lib/libc/gen/utxdb.h ============================================================================== --- head/lib/libc/gen/utxdb.h Sun Jan 17 21:26:14 2010 (r202529) +++ head/lib/libc/gen/utxdb.h Sun Jan 17 21:40:05 2010 (r202530) @@ -56,6 +56,6 @@ struct futx { } __packed; void utx_to_futx(const struct utmpx *, struct futx *); -void futx_to_utx(const struct futx *, struct utmpx *); +struct utmpx *futx_to_utx(const struct futx *); #endif /* !_UTXDB_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 21:53:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B120106566B; Sun, 17 Jan 2010 21:53:41 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B16A8FC0C; Sun, 17 Jan 2010 21:53:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HLrflA056365; Sun, 17 Jan 2010 21:53:41 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HLrfWE056363; Sun, 17 Jan 2010 21:53:41 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001172153.o0HLrfWE056363@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 21:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202531 - head/sbin/natd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 21:53:41 -0000 Author: ed Date: Sun Jan 17 21:53:41 2010 New Revision: 202531 URL: http://svn.freebsd.org/changeset/base/202531 Log: Mute some (hidden) warnings about old-style function definitions. Submitted by: Marius Nünnerich Modified: head/sbin/natd/natd.c Modified: head/sbin/natd/natd.c ============================================================================== --- head/sbin/natd/natd.c Sun Jan 17 21:40:05 2010 (r202530) +++ head/sbin/natd/natd.c Sun Jan 17 21:53:41 2010 (r202531) @@ -444,7 +444,7 @@ int main (int argc, char** argv) return 0; } -static void DaemonMode () +static void DaemonMode(void) { FILE* pidFile; @@ -1558,7 +1558,7 @@ void ReadConfigFile (const char* fileNam fclose (file); } -static void Usage () +static void Usage(void) { int i; int max; From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 21:56:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 303F8106566B; Sun, 17 Jan 2010 21:56:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1B58FC16; Sun, 17 Jan 2010 21:56:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HLuSK1057087; Sun, 17 Jan 2010 21:56:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HLuRFD057075; Sun, 17 Jan 2010 21:56:27 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001172156.o0HLuRFD057075@svn.freebsd.org> From: Ed Schouten Date: Sun, 17 Jan 2010 21:56: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: r202532 - in head: bin/pkill sbin/adjkerntz sbin/ifconfig sbin/kldconfig sbin/kldload sbin/kldstat sbin/natd sbin/newfs sbin/swapon sbin/tunefs usr.bin/locale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 21:56:28 -0000 Author: ed Date: Sun Jan 17 21:56:27 2010 New Revision: 202532 URL: http://svn.freebsd.org/changeset/base/202532 Log: Raise WARNS for various tools where possible. Submitted by: Marius Nünnerich Modified: head/bin/pkill/Makefile head/sbin/adjkerntz/Makefile head/sbin/ifconfig/Makefile head/sbin/kldconfig/Makefile head/sbin/kldload/Makefile head/sbin/kldstat/Makefile head/sbin/natd/Makefile head/sbin/newfs/Makefile head/sbin/swapon/Makefile head/sbin/tunefs/Makefile head/usr.bin/locale/Makefile Modified: head/bin/pkill/Makefile ============================================================================== --- head/bin/pkill/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/bin/pkill/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -2,7 +2,6 @@ # $FreeBSD$ PROG= pkill -WARNS?= 5 DPADD= ${LIBKVM} LDADD= -lkvm Modified: head/sbin/adjkerntz/Makefile ============================================================================== --- head/sbin/adjkerntz/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/adjkerntz/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -2,6 +2,5 @@ PROG= adjkerntz MAN= adjkerntz.8 -WARNS?= 2 .include Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/ifconfig/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -47,6 +47,6 @@ LDADD+= -lipx MAN= ifconfig.8 CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs -WARNS?= 0 +WARNS?= 2 .include Modified: head/sbin/kldconfig/Makefile ============================================================================== --- head/sbin/kldconfig/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/kldconfig/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -28,6 +28,5 @@ PROG= kldconfig MAN= kldconfig.8 -WARNS?= 5 .include Modified: head/sbin/kldload/Makefile ============================================================================== --- head/sbin/kldload/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/kldload/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -28,6 +28,5 @@ PROG= kldload MAN= kldload.8 -WARNS?= 5 .include Modified: head/sbin/kldstat/Makefile ============================================================================== --- head/sbin/kldstat/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/kldstat/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -28,6 +28,5 @@ PROG= kldstat MAN= kldstat.8 -WARNS?= 5 .include Modified: head/sbin/natd/Makefile ============================================================================== --- head/sbin/natd/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/natd/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -2,7 +2,7 @@ PROG = natd SRCS = natd.c icmp.c -WARNS?= 0 +WARNS?= 3 LDADD = -lalias DPADD = ${LIBALIAS} MAN = natd.8 Modified: head/sbin/newfs/Makefile ============================================================================== --- head/sbin/newfs/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/newfs/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -8,7 +8,7 @@ DPADD= ${LIBUFS} LDADD= -lufs SRCS= newfs.c mkfs.c geom_bsd_enc.c -WARNS?= 2 +WARNS?= 3 MAN= newfs.8 .include Modified: head/sbin/swapon/Makefile ============================================================================== --- head/sbin/swapon/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/swapon/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -8,7 +8,7 @@ LINKS+= ${BINDIR}/swapon ${BINDIR}/swapc MLINKS= swapon.8 swapoff.8 MLINKS+=swapon.8 swapctl.8 -WARNS?= 2 +WARNS?= 3 DPADD= ${LIBUTIL} LDADD= -lutil Modified: head/sbin/tunefs/Makefile ============================================================================== --- head/sbin/tunefs/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/sbin/tunefs/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -5,6 +5,5 @@ PROG= tunefs DPADD= ${LIBUFS} LDADD= -lufs MAN= tunefs.8 -WARNS?= 2 .include Modified: head/usr.bin/locale/Makefile ============================================================================== --- head/usr.bin/locale/Makefile Sun Jan 17 21:53:41 2010 (r202531) +++ head/usr.bin/locale/Makefile Sun Jan 17 21:56:27 2010 (r202532) @@ -2,6 +2,6 @@ PROG = locale CFLAGS += -I${.CURDIR}/../../lib/libc/locale -WARNS ?= 1 +WARNS ?= 3 .include From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 23:11:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71D98106566B; Sun, 17 Jan 2010 23:11:08 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id DCEB58FC15; Sun, 17 Jan 2010 23:11:06 +0000 (UTC) Received: by fxm27 with SMTP id 27so1767886fxm.3 for ; Sun, 17 Jan 2010 15:11:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=94QPzovYeCIm6q8DWeZqsgC7GDobURLZ0nnQ9tX4Dkk=; b=dtl1Q4+bthWoYtaiOLl0u36VIafrvVsx87X0PUrX9JsMYQCjc9qQW//DT2G+cu3RhY eEoSodtpsN4NO8F9iNmFG1d7zWziFBOu5pWTdDHa12WF5ytZaRsESNtODN5MfmnkZsnc vl2Q8B4AYXl78ifwjofhlL0sUa685hYlD9t9w= DomainKey-Signature: a=rsa-sha1; c=nofws; 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; b=A2Owm7Ll1iprUv0NznDie9lHmNBi7DRVbuaJ879dwyWhgT+hp0gnAhnP4BQ/Gr1CI/ +Z8S3bp7vu89fYg6WQHe7IHtr5muX50FHN1e4/tcVV0stpfSHfE8f/pGnkZXuvuM5tcP 2Cy7o48tBOzWExyG2+/l36mSlUDtnjidwJDIs= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.77.19 with SMTP id e19mr6620966fak.39.1263769865847; Sun, 17 Jan 2010 15:11:05 -0800 (PST) In-Reply-To: <20100117190512.A50938@maildrop.int.zabbadoz.net> References: <201001161224.o0GCOCOI094360@svn.freebsd.org> <20100116.220840.91363215.nyan@FreeBSD.org> <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> <20100117.124146.27866377.nyan@FreeBSD.org> <20100117190512.A50938@maildrop.int.zabbadoz.net> Date: Mon, 18 Jan 2010 00:11:05 +0100 X-Google-Sender-Auth: 9be8f332b23b286d Message-ID: <3bbf2fe11001171511m56c2dd1dqce5cbe7a6ba82b94@mail.gmail.com> From: Attilio Rao To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, TAKAHASHI Yoshihiro Subject: Re: svn commit: r202441 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 23:11:08 -0000 2010/1/17 Bjoern A. Zeeb : > On Sun, 17 Jan 2010, TAKAHASHI Yoshihiro wrote: > >> In article <3bbf2fe11001160736h185d8916ma0ba074f6a6a6dca@mail.gmail.com> >> Attilio Rao writes: >> >>> Thanks for reporting this. >>> This further patch should fix the problem for i386 and possibly pc98 >>> (linked with your patch): >>> http://www.freebsd.org/~attilio/atpic.diff >> >> Please apply the same change to sys/pc98/cbus/clock.c, and it's fine. >> >> Please feel free to commit my patch. > > Something similar is also still needed for i386 as the XBOX kernel > still doesn't compile. Actually XBOX seems compiling with the change I outlined. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-head@FreeBSD.ORG Sun Jan 17 23:23:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0FD01065672; Sun, 17 Jan 2010 23:23:35 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5E278FC17; Sun, 17 Jan 2010 23:23:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0HNNZPj076873; Sun, 17 Jan 2010 23:23:35 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0HNNZkd076868; Sun, 17 Jan 2010 23:23:35 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001172323.o0HNNZkd076868@svn.freebsd.org> From: Attilio Rao Date: Sun, 17 Jan 2010 23:23:35 +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: r202534 - in head/sys: conf i386/isa pc98/cbus pc98/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 23:23:36 -0000 Author: attilio Date: Sun Jan 17 23:23:35 2010 New Revision: 202534 URL: http://svn.freebsd.org/changeset/base/202534 Log: - Allow clock subsystem to be compiled without the apic support [0] - ATPIC, on pc98 is never defined somewhere, differently from i386. Turn its compilation to be conditional as i386 does. [1] [0] Reported by: nyan [1] Submitted by: nyan Modified: head/sys/conf/files.pc98 head/sys/i386/isa/clock.c head/sys/pc98/cbus/clock.c head/sys/pc98/conf/DEFAULTS Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Sun Jan 17 22:40:47 2010 (r202533) +++ head/sys/conf/files.pc98 Sun Jan 17 23:23:35 2010 (r202534) @@ -194,7 +194,7 @@ i386/ibcs2/ibcs2_util.c optional ibcs2 i386/ibcs2/ibcs2_xenix.c optional ibcs2 i386/ibcs2/ibcs2_xenix_sysent.c optional ibcs2 i386/ibcs2/imgact_coff.c optional ibcs2 -i386/isa/atpic.c standard +i386/isa/atpic.c optional atpic #i386/isa/atpic_vector.s standard i386/isa/elink.c optional ep | ie i386/isa/isa.c optional isa @@ -240,7 +240,7 @@ pc98/cbus/gdc.c optional gdc pc98/cbus/nmi.c standard pc98/cbus/olpt.c optional olpt pc98/cbus/pckbd.c optional pckbd -pc98/cbus/pcrtc.c standard +pc98/cbus/pcrtc.c optional atpic pc98/cbus/pmc.c optional pmc pc98/cbus/scgdcrndr.c optional sc gdc pc98/cbus/scterm-sck.c optional sc Modified: head/sys/i386/isa/clock.c ============================================================================== --- head/sys/i386/isa/clock.c Sun Jan 17 22:40:47 2010 (r202533) +++ head/sys/i386/isa/clock.c Sun Jan 17 23:23:35 2010 (r202534) @@ -65,9 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef DEV_APIC #include -#endif #include #include #include Modified: head/sys/pc98/cbus/clock.c ============================================================================== --- head/sys/pc98/cbus/clock.c Sun Jan 17 22:40:47 2010 (r202533) +++ head/sys/pc98/cbus/clock.c Sun Jan 17 23:23:35 2010 (r202534) @@ -67,9 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef DEV_APIC #include -#endif #include #include #include Modified: head/sys/pc98/conf/DEFAULTS ============================================================================== --- head/sys/pc98/conf/DEFAULTS Sun Jan 17 22:40:47 2010 (r202533) +++ head/sys/pc98/conf/DEFAULTS Sun Jan 17 23:23:35 2010 (r202534) @@ -24,3 +24,6 @@ device uart_ns8250 # Default partitioning schemes options GEOM_PART_BSD options GEOM_PART_PC98 + +# enable support for native hardware +device atpic From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 06:48:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FD9C1065693; Mon, 18 Jan 2010 06:48:25 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F26DA8FC18; Mon, 18 Jan 2010 06:48:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0I6mO1v080288; Mon, 18 Jan 2010 06:48:24 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0I6mODW080285; Mon, 18 Jan 2010 06:48:24 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001180648.o0I6mODW080285@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 18 Jan 2010 06:48:24 +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: r202552 - head/sys/boot/ia64/efi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 06:48:25 -0000 Author: marcel Date: Mon Jan 18 06:48:24 2010 New Revision: 202552 URL: http://svn.freebsd.org/changeset/base/202552 Log: Add command-line option -dev to set the default value of the currdev variable. This is to be used by the EFI boot manager. While here, re-factor the code a little bit and bump the version to 2.1. Modified: head/sys/boot/ia64/efi/main.c head/sys/boot/ia64/efi/version Modified: head/sys/boot/ia64/efi/main.c ============================================================================== --- head/sys/boot/ia64/efi/main.c Mon Jan 18 05:24:51 2010 (r202551) +++ head/sys/boot/ia64/efi/main.c Mon Jan 18 06:48:24 2010 (r202552) @@ -50,7 +50,6 @@ extern char bootprog_rev[]; extern char bootprog_date[]; extern char bootprog_maker[]; -struct devdesc currdev; /* our current device */ struct arch_switch archsw; /* MI/MD interface boundary */ extern u_int64_t ia64_pal_entry; @@ -101,10 +100,49 @@ find_pal_proc(void) return; } +static int +usc2cmp(CHAR16 *s1, CHAR16 *s2) +{ + + while (*s1 == *s2++) { + if (*s1++ == 0) + return (0); + } + return (*s1 - *(s2 - 1)); +} + +static char * +get_dev_option(int argc, CHAR16 *argv[]) +{ + static char dev[32]; + CHAR16 *arg; + char *devp; + int i, j; + + devp = NULL; + for (i = 0; i < argc; i++) { + if (usc2cmp(argv[i], L"-dev") == 0 && i < argc - 1) { + arg = argv[i + 1]; + j = 0; + while (j < sizeof(dev) && *arg != 0) + dev[j++] = *arg++; + if (j == sizeof(dev)) + j--; + dev[j] = '\0'; + devp = dev; + break; + } + } + + return (devp); +} + EFI_STATUS main(int argc, CHAR16 *argv[]) { + struct devdesc currdev; EFI_LOADED_IMAGE *img; + char *dev; int i; /* @@ -115,6 +153,10 @@ main(int argc, CHAR16 *argv[]) */ cons_probe(); + printf("\n"); + printf("%s, Revision %s\n", bootprog_name, bootprog_rev); + printf("(%s, %s)\n", bootprog_maker, bootprog_date); + find_pal_proc(); /* @@ -124,16 +166,6 @@ main(int argc, CHAR16 *argv[]) if (devsw[i]->dv_init != NULL) (devsw[i]->dv_init)(); - /* Get our loaded image protocol interface structure. */ - BS->HandleProtocol(IH, &imgid, (VOID**)&img); - - printf("\n"); - printf("%s, Revision %s\n", bootprog_name, bootprog_rev); - printf("(%s, %s)\n", bootprog_maker, bootprog_date); - - efi_handle_lookup(img->DeviceHandle, &currdev.d_dev, &currdev.d_unit); - currdev.d_type = currdev.d_dev->dv_type; - /* * Disable the watchdog timer. By default the boot manager sets * the timer to 5 minutes before invoking a boot option. If we @@ -145,13 +177,24 @@ main(int argc, CHAR16 *argv[]) */ BS->SetWatchdogTimer(0, 0, 0, NULL); - env_setenv("currdev", EV_VOLATILE, ia64_fmtdev(&currdev), - ia64_setcurrdev, env_nounset); + /* Get our loaded image protocol interface structure. */ + BS->HandleProtocol(IH, &imgid, (VOID**)&img); + + bzero(&currdev, sizeof(currdev)); + efi_handle_lookup(img->DeviceHandle, &currdev.d_dev, &currdev.d_unit); + currdev.d_type = currdev.d_dev->dv_type; + env_setenv("loaddev", EV_VOLATILE, ia64_fmtdev(&currdev), env_noset, env_nounset); + dev = get_dev_option(argc, argv); + if (dev == NULL) + dev = ia64_fmtdev(&currdev); + + env_setenv("currdev", EV_VOLATILE, dev, ia64_setcurrdev, env_nounset); + setenv("LINES", "24", 1); /* optional */ - + archsw.arch_autoload = ia64_autoload; archsw.arch_getdev = ia64_getdev; archsw.arch_copyin = ia64_copyin; Modified: head/sys/boot/ia64/efi/version ============================================================================== --- head/sys/boot/ia64/efi/version Mon Jan 18 05:24:51 2010 (r202551) +++ head/sys/boot/ia64/efi/version Mon Jan 18 06:48:24 2010 (r202552) @@ -3,6 +3,7 @@ $FreeBSD$ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important. Make sure the current version number is on line 6. +2.1: Add support for "-dev " argument parsing. 2.0: Provide devices based on the block I/O protocol, rather than the simple file services protocol. Use the FreeBSD file system code on top of those devices to access files. From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 10:17:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE76F106566B; Mon, 18 Jan 2010 10:17:51 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B57038FC08; Mon, 18 Jan 2010 10:17:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAHpDA028524; Mon, 18 Jan 2010 10:17:51 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAHpbs028521; Mon, 18 Jan 2010 10:17:51 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001181017.o0IAHpbs028521@svn.freebsd.org> From: "Andrey A. Chernov" Date: Mon, 18 Jan 2010 10:17: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: r202556 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 10:17:52 -0000 Author: ache Date: Mon Jan 18 10:17:51 2010 New Revision: 202556 URL: http://svn.freebsd.org/changeset/base/202556 Log: a) Use strcoll() in opendir() and alphasort() as POSIX 2008 requires. It also matches now how our 'ls' works for years. b) Remove comment expressed 2 fears: 1) One just simple describe how strcoll() works in _any_ context, not for directories only. Are we plan to remove strcoll() from everything just because it is little more complex than strcmp()? I doubt, and directories give nothing different here. Moreover, strcoll() used in 'ls' for years and nobody complaints yet. 2) Plain wrong statement about undefined strcoll() behaviour. strcoll() always gives predictable results, falling back to strcmp() on any trouble, see strcoll(3). No objections from -current list discussion. Modified: head/lib/libc/gen/opendir.c head/lib/libc/gen/scandir.c Modified: head/lib/libc/gen/opendir.c ============================================================================== --- head/lib/libc/gen/opendir.c Mon Jan 18 09:41:54 2010 (r202555) +++ head/lib/libc/gen/opendir.c Mon Jan 18 10:17:51 2010 (r202556) @@ -94,13 +94,13 @@ __opendir2(const char *name, int flags) /* * POSIX 2008 and XSI 7 require alphasort() to call strcoll() for - * directory entries ordering. Use local copy that uses strcmp(). + * directory entries ordering. */ static int opendir_alphasort(const void *p1, const void *p2) { - return (strcmp((*(const struct dirent **)p1)->d_name, + return (strcoll((*(const struct dirent **)p1)->d_name, (*(const struct dirent **)p2)->d_name)); } Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Mon Jan 18 09:41:54 2010 (r202555) +++ head/lib/libc/gen/scandir.c Mon Jan 18 10:17:51 2010 (r202556) @@ -127,17 +127,13 @@ fail: /* * Alphabetic order comparison routine for those who want it. * - * XXXKIB POSIX 2008 requires the alphasort() to use strcoll(). Keep - * strcmp() for now, since environment locale settings could have no - * relevance for the byte sequence of the file name. Moreover, it - * might be even invalid sequence in current locale, and then - * behaviour of alphasort would be undefined. + * POSIX 2008 requires the alphasort() to use strcoll(). */ int alphasort(const struct dirent **d1, const struct dirent **d2) { - return (strcmp((*d1)->d_name, (*d2)->d_name)); + return (strcoll((*d1)->d_name, (*d2)->d_name)); } static int From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 10:29:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23C141065670; Mon, 18 Jan 2010 10:29:05 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 138DD8FC16; Mon, 18 Jan 2010 10:29:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAT4MD031130; Mon, 18 Jan 2010 10:29:04 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAT4Dk031128; Mon, 18 Jan 2010 10:29:04 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201001181029.o0IAT4Dk031128@svn.freebsd.org> From: David Xu Date: Mon, 18 Jan 2010 10:29: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: r202557 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 10:29:05 -0000 Author: davidxu Date: Mon Jan 18 10:29:04 2010 New Revision: 202557 URL: http://svn.freebsd.org/changeset/base/202557 Log: preserve errno when processing error cases. Modified: head/lib/libc/gen/sem_new.c Modified: head/lib/libc/gen/sem_new.c ============================================================================== --- head/lib/libc/gen/sem_new.c Mon Jan 18 10:17:51 2010 (r202556) +++ head/lib/libc/gen/sem_new.c Mon Jan 18 10:29:04 2010 (r202557) @@ -142,7 +142,7 @@ _sem_open(const char *name, int flags, . va_list ap; struct sem_nameinfo *ni = NULL; sem_t *sem = NULL; - int fd = -1, mode, len; + int fd = -1, mode, len, errsave; int value = 0; if (name[0] != '/') { @@ -233,12 +233,14 @@ _sem_open(const char *name, int flags, . return (sem); error: + errsave = errno; _pthread_mutex_unlock(&sem_llock); if (fd != -1) _close(fd); if (sem != NULL) munmap(sem, sizeof(sem_t)); free(ni); + errno = errsave; return (SEM_FAILED); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 10:30:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA7A1106566C; Mon, 18 Jan 2010 10:30:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA8678FC15; Mon, 18 Jan 2010 10:30:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAUBvL031407; Mon, 18 Jan 2010 10:30:11 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAUB3Y031405; Mon, 18 Jan 2010 10:30:11 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001181030.o0IAUB3Y031405@svn.freebsd.org> From: Andriy Gapon Date: Mon, 18 Jan 2010 10:30:11 +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: r202558 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 10:30:11 -0000 Author: avg Date: Mon Jan 18 10:30:11 2010 New Revision: 202558 URL: http://svn.freebsd.org/changeset/base/202558 Log: acpi_ec: clean up 'private' ivar when freeing memory to which it points This is not only a prudent thing to do, but also makes sure that probe method is not confused by non-NULL 'private', if the previous attach attempt fails for any reason. PR: kern/142561 Tested by: Alex Goncharov MFC after: 4 days Modified: head/sys/dev/acpica/acpi_ec.c Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Mon Jan 18 10:29:04 2010 (r202557) +++ head/sys/dev/acpica/acpi_ec.c Mon Jan 18 10:30:11 2010 (r202558) @@ -469,6 +469,7 @@ acpi_ec_attach(device_t dev) sc->ec_gpehandle = params->gpe_handle; sc->ec_uid = params->uid; sc->ec_suspending = FALSE; + acpi_set_private(dev, NULL); free(params, M_TEMP); /* Attach bus resources for data and command/status ports. */ From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 10:39:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF9031065670; Mon, 18 Jan 2010 10:39:07 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 64C148FC19; Mon, 18 Jan 2010 10:39:07 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 67A1E1FFC22; Mon, 18 Jan 2010 10:39:06 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 246568448A; Mon, 18 Jan 2010 11:39:06 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "M. Warner Losh" References: <20100114.105622.457034909117828677.imp@bsdimp.com> <4B4F7810.2080003@FreeBSD.org> <86625798-F339-4863-8F97-63B5232A6CF7@freebsd.org> <20100114.135930.80200584442733547.imp@bsdimp.com> Date: Mon, 18 Jan 2010 11:39:06 +0100 In-Reply-To: <20100114.135930.80200584442733547.imp@bsdimp.com> (M. Warner Losh's message of "Thu, 14 Jan 2010 13:59:30 -0700 (MST)") Message-ID: <86k4vf66k5.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: dougb@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org, freebsd-arch@freebsd.org, svn-src-head@freebsd.org Subject: Re: INCLUDE_CONFIG_FILE in GENERIC X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 10:39:07 -0000 "M. Warner Losh" writes: > [...] I think this > is the model that best fits most user's needs, since they EITHER take > GENERIC and hack on it (in which case we preserve all that), OR they > include GENERIC and opt in/out of things based on that default. The latter is a far better option - I use the former and have been bitten several times by new mandatory devices and options such as device io, scheduler selection, etc. However, the latter option is not very practical. Picking one of my machines at random, its kernel config has 65 device / option lines, while GENERIC has 219, and they only have 51 lines in common. Instead of 65 device / option lines, I would need 168 nodevice / nooption lines plus 14 device / option lines, for a total of 182 lines. > Heck, we could save the whole src/sys tree as a tarball in a separate > non-loadable ELF section if people that that was useful. Ouch. OTOH, the sys tree is actually smaller than a full GENERIC build... Is there any way we could limit this to those parts of the tree that were actually used to build the kernel? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 10:50:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB8B3106566B; Mon, 18 Jan 2010 10:50:25 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8EC8FC08; Mon, 18 Jan 2010 10:50:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IAoPZ5036157; Mon, 18 Jan 2010 10:50:25 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IAoPiP036155; Mon, 18 Jan 2010 10:50:25 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001181050.o0IAoPiP036155@svn.freebsd.org> From: Ed Schouten Date: Mon, 18 Jan 2010 10:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202559 - head/usr.bin/getent X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 10:50:25 -0000 Author: ed Date: Mon Jan 18 10:50:25 2010 New Revision: 202559 URL: http://svn.freebsd.org/changeset/base/202559 Log: Also let getent(1) print values of ut_pid. Modified: head/usr.bin/getent/getent.c Modified: head/usr.bin/getent/getent.c ============================================================================== --- head/usr.bin/getent/getent.c Mon Jan 18 10:30:11 2010 (r202558) +++ head/usr.bin/getent/getent.c Mon Jan 18 10:50:25 2010 (r202559) @@ -601,13 +601,13 @@ utmpxprint(const struct utmpx *ut) case USER_PROCESS: printf("user process: id=\""); UTMPXPRINTID; - printf("\" user=\"%s\" line=\"%s\" host=\"%s\"\n", - ut->ut_user, ut->ut_line, ut->ut_host); + printf("\" pid=\"%d\" user=\"%s\" line=\"%s\" host=\"%s\"\n", + ut->ut_pid, ut->ut_user, ut->ut_line, ut->ut_host); break; case DEAD_PROCESS: printf("dead process: id=\""); UTMPXPRINTID; - printf("\"\n"); + printf("\" pid=\"%d\"\n", ut->ut_pid); break; default: printf("unknown record type\n"); From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 11:29:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23241106566C; Mon, 18 Jan 2010 11:29:52 +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 129138FC16; Mon, 18 Jan 2010 11:29:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IBTpJO048146; Mon, 18 Jan 2010 11:29:51 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IBTpQl048143; Mon, 18 Jan 2010 11:29:51 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001181129.o0IBTpQl048143@svn.freebsd.org> From: Ed Schouten Date: Mon, 18 Jan 2010 11:29: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: r202566 - head/lib/libpam/modules/pam_lastlog X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 11:29:52 -0000 Author: ed Date: Mon Jan 18 11:29:51 2010 New Revision: 202566 URL: http://svn.freebsd.org/changeset/base/202566 Log: Let pam_lastlog use random ut_id's. By using random values for ut_id, not based on the TTY name, it is possible to run for example login(1) multiple times on the same TTY, without overwriting any previous records. The output of w(1) will then be as follows: | 12:26PM up 2 days, 2:31, 5 users, load averages: 0.01, 0.03, 0.03 | USER TTY FROM LOGIN@ IDLE WHAT | ed pts/2 mekker.80386.nl 12:26PM - w | root pts/2 - 12:26PM - w | root pts/2 - 12:26PM - w | root pts/2 - 12:26PM - w Approved by: des Modified: head/lib/libpam/modules/pam_lastlog/Makefile head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Modified: head/lib/libpam/modules/pam_lastlog/Makefile ============================================================================== --- head/lib/libpam/modules/pam_lastlog/Makefile Mon Jan 18 11:08:47 2010 (r202565) +++ head/lib/libpam/modules/pam_lastlog/Makefile Mon Jan 18 11:29:51 2010 (r202566) @@ -28,7 +28,4 @@ LIB= pam_lastlog SRCS= pam_lastlog.c MAN= pam_lastlog.8 -DPADD= ${LIBULOG} -LDADD= -lulog - .include Modified: head/lib/libpam/modules/pam_lastlog/pam_lastlog.c ============================================================================== --- head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Mon Jan 18 11:08:47 2010 (r202565) +++ head/lib/libpam/modules/pam_lastlog/pam_lastlog.c Mon Jan 18 11:29:51 2010 (r202566) @@ -46,9 +46,12 @@ __FBSDID("$FreeBSD$"); #define _BSD_SOURCE +#include #include +#include +#include #include -#include +#include #include #define PAM_SM_SESSION @@ -57,15 +60,18 @@ __FBSDID("$FreeBSD$"); #include #include +#define PAM_UTMPX_ID "utmpx_id" + PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc __unused, const char *argv[] __unused) { struct passwd *pwd; - struct utmpx *utx; + struct utmpx *utx, utl; time_t t; const char *user; const void *rhost, *tty; + char *id; int pam_err; pam_err = pam_get_user(pamh, &user, NULL); @@ -109,7 +115,29 @@ pam_sm_open_session(pam_handle_t *pamh, } } - ulog_login(tty, user, rhost); + id = malloc(sizeof utl.ut_id); + if (id == NULL) { + pam_err = PAM_SERVICE_ERR; + goto err; + } + arc4random_buf(id, sizeof utl.ut_id); + + pam_err = pam_set_data(pamh, PAM_UTMPX_ID, id, openpam_free_data); + if (pam_err != PAM_SUCCESS) { + free(id); + goto err; + } + + memset(&utl, 0, sizeof utl); + utl.ut_type = USER_PROCESS; + memcpy(utl.ut_id, id, sizeof utl.ut_id); + strncpy(utl.ut_user, user, sizeof utl.ut_user); + strncpy(utl.ut_line, tty, sizeof utl.ut_line); + if (rhost != NULL) + strncpy(utl.ut_host, rhost, sizeof utl.ut_host); + utl.ut_pid = getpid(); + gettimeofday(&utl.ut_tv, NULL); + pututxline(&utl); return (PAM_SUCCESS); @@ -123,18 +151,21 @@ PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags __unused, int argc __unused, const char *argv[] __unused) { - const void *tty; + struct utmpx utl; + const void *id; int pam_err; - pam_err = pam_get_item(pamh, PAM_TTY, (const void **)&tty); + pam_err = pam_get_data(pamh, PAM_UTMPX_ID, (const void **)&id); if (pam_err != PAM_SUCCESS) goto err; - if (tty == NULL) { - PAM_LOG("No PAM_TTY"); - pam_err = PAM_SERVICE_ERR; - goto err; - } - ulog_logout(tty); + + memset(&utl, 0, sizeof utl); + utl.ut_type = DEAD_PROCESS; + memcpy(utl.ut_id, id, sizeof utl.ut_id); + utl.ut_pid = getpid(); + gettimeofday(&utl.ut_tv, NULL); + pututxline(&utl); + return (PAM_SUCCESS); err: From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 11:33:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF1C3106566B; Mon, 18 Jan 2010 11:33:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF29E8FC08; Mon, 18 Jan 2010 11:33:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IBXwJw049119; Mon, 18 Jan 2010 11:33:58 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IBXwqR049117; Mon, 18 Jan 2010 11:33:58 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001181133.o0IBXwqR049117@svn.freebsd.org> From: Andriy Gapon Date: Mon, 18 Jan 2010 11:33: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: r202567 - head/sys/dev/acpica X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 11:33:59 -0000 Author: avg Date: Mon Jan 18 11:33:58 2010 New Revision: 202567 URL: http://svn.freebsd.org/changeset/base/202567 Log: acpi_ec: remove redundant acpi_disabled check in probe method MFC after: 4 days Modified: head/sys/dev/acpica/acpi_ec.c Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Mon Jan 18 11:29:51 2010 (r202566) +++ head/sys/dev/acpica/acpi_ec.c Mon Jan 18 11:33:58 2010 (r202567) @@ -366,8 +366,7 @@ acpi_ec_probe(device_t dev) if (params != NULL) { ecdt = 1; ret = 0; - } else if (!acpi_disabled("ec") && - ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids)) { + } else if (ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids)) { params = malloc(sizeof(struct acpi_ec_params), M_TEMP, M_WAITOK | M_ZERO); h = acpi_get_handle(dev); From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 13:44:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1FB5106566C; Mon, 18 Jan 2010 13:44:44 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A16158FC15; Mon, 18 Jan 2010 13:44:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IDiiaZ079039; Mon, 18 Jan 2010 13:44:44 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IDiiEL079037; Mon, 18 Jan 2010 13:44:44 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001181344.o0IDiiEL079037@svn.freebsd.org> From: "Andrey A. Chernov" Date: Mon, 18 Jan 2010 13:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202572 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 13:44:44 -0000 Author: ache Date: Mon Jan 18 13:44:44 2010 New Revision: 202572 URL: http://svn.freebsd.org/changeset/base/202572 Log: Double checking my commit I found that comment saying that POSIX 2008 and XSI 7require strcoll() for opendir() is not true. I can't find such requirement in POSIX 2008 and XSI 7. So, back out that part of my commit, returning old strcmp(), and remove this misleading comment. Modified: head/lib/libc/gen/opendir.c Modified: head/lib/libc/gen/opendir.c ============================================================================== --- head/lib/libc/gen/opendir.c Mon Jan 18 13:38:45 2010 (r202571) +++ head/lib/libc/gen/opendir.c Mon Jan 18 13:44:44 2010 (r202572) @@ -92,15 +92,11 @@ __opendir2(const char *name, int flags) return __opendir_common(fd, name, flags); } -/* - * POSIX 2008 and XSI 7 require alphasort() to call strcoll() for - * directory entries ordering. - */ static int -opendir_alphasort(const void *p1, const void *p2) +opendir_sort(const void *p1, const void *p2) { - return (strcoll((*(const struct dirent **)p1)->d_name, + return (strcmp((*(const struct dirent **)p1)->d_name, (*(const struct dirent **)p2)->d_name)); } @@ -253,7 +249,7 @@ __opendir_common(int fd, const char *nam * This sort must be stable. */ mergesort(dpv, n, sizeof(*dpv), - opendir_alphasort); + opendir_sort); dpv[n] = NULL; xp = NULL; From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 14:07:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8418106566B; Mon, 18 Jan 2010 14:07:41 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7C708FC0A; Mon, 18 Jan 2010 14:07:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IE7fqp084276; Mon, 18 Jan 2010 14:07:41 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IE7f5n084274; Mon, 18 Jan 2010 14:07:41 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001181407.o0IE7f5n084274@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 18 Jan 2010 14:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202573 - head/sbin/mdconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 14:07:41 -0000 Author: jh Date: Mon Jan 18 14:07:41 2010 New Revision: 202573 URL: http://svn.freebsd.org/changeset/base/202573 Log: Print sizes up to INT64_MAX in md_prthumanval(). PR: bin/125365 Approved by: trasz (mentor) MFC after: 2 weeks Modified: head/sbin/mdconfig/mdconfig.c Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Mon Jan 18 13:44:44 2010 (r202572) +++ head/sbin/mdconfig/mdconfig.c Mon Jan 18 14:07:41 2010 (r202573) @@ -454,14 +454,15 @@ static void md_prthumanval(char *length) { char buf[6]; - uint64_t bytes; + uintmax_t bytes; char *endptr; - bytes = strtoul(length, &endptr, 10); - if (bytes == (unsigned)ULONG_MAX || *endptr != '\0') + errno = 0; + bytes = strtoumax(length, &endptr, 10); + if (errno != 0 || *endptr != '\0' || bytes > INT64_MAX) return; - humanize_number(buf, sizeof(buf) - (bytes < 0 ? 0 : 1), - bytes, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); + humanize_number(buf, sizeof(buf), (int64_t)bytes, "", + HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); (void)printf("%6s", buf); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 15:41:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54CC2106566B; Mon, 18 Jan 2010 15:41:55 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 440FA8FC13; Mon, 18 Jan 2010 15:41:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IFftFB005617; Mon, 18 Jan 2010 15:41:55 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IFftNe005615; Mon, 18 Jan 2010 15:41:55 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001181541.o0IFftNe005615@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 18 Jan 2010 15:41:55 +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: r202578 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 15:41:55 -0000 Author: ru Date: Mon Jan 18 15:41:55 2010 New Revision: 202578 URL: http://svn.freebsd.org/changeset/base/202578 Log: If CTAGS is not set or set to something other than "ctags" or "gtags", "cleandepend" was not removing the .depend file; fixed. PR: 126747 MFC after: 3 days Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Mon Jan 18 14:51:00 2010 (r202577) +++ head/share/mk/bsd.dep.mk Mon Jan 18 15:41:55 2010 (r202578) @@ -182,6 +182,8 @@ cleandepend: .if defined(HTML) rm -rf HTML .endif +.else + rm -f ${DEPENDFILE} .endif .endif .endif From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 15:58:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFFB7106568F; Mon, 18 Jan 2010 15:58:02 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF1A88FC0A; Mon, 18 Jan 2010 15:58:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IFw2SB009279; Mon, 18 Jan 2010 15:58:02 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IFw22D009277; Mon, 18 Jan 2010 15:58:02 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001181558.o0IFw22D009277@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 18 Jan 2010 15:58: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: r202579 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 15:58:03 -0000 Author: ru Date: Mon Jan 18 15:58:02 2010 New Revision: 202579 URL: http://svn.freebsd.org/changeset/base/202579 Log: Allow the CTAGS to be set to something other than "gtags" or "ctags", but assume it supports a ctags(1)-compatible syntax. PR: 46676 Submitted by: Lyndon Nerenberg MFC after: 3 days Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Mon Jan 18 15:41:55 2010 (r202578) +++ head/share/mk/bsd.dep.mk Mon Jan 18 15:58:02 2010 (r202579) @@ -58,14 +58,14 @@ DEPENDFILE?= .depend # Keep `tags' here, before SRCS are mangled below for `depend'. .if !target(tags) && defined(SRCS) && !defined(NO_TAGS) tags: ${SRCS} -.if ${CTAGS:T} == "ctags" - @${CTAGS} ${CTAGSFLAGS} -f /dev/stdout \ - ${.ALLSRC:N*.h} | sed "s;${.CURDIR}/;;" > ${.TARGET} -.elif ${CTAGS:T} == "gtags" +.if ${CTAGS:T} == "gtags" @cd ${.CURDIR} && ${CTAGS} ${GTAGSFLAGS} ${.OBJDIR} .if defined(HTML) @cd ${.CURDIR} && htags ${HTAGSFLAGS} -d ${.OBJDIR} ${.OBJDIR} .endif +.else + @${CTAGS} ${CTAGSFLAGS} -f /dev/stdout \ + ${.ALLSRC:N*.h} | sed "s;${.CURDIR}/;;" > ${.TARGET} .endif .endif @@ -175,15 +175,13 @@ afterdepend: .if !target(cleandepend) cleandepend: .if defined(SRCS) -.if ${CTAGS:T} == "ctags" - rm -f ${DEPENDFILE} tags -.elif ${CTAGS:T} == "gtags" +.if ${CTAGS:T} == "gtags" rm -f ${DEPENDFILE} GPATH GRTAGS GSYMS GTAGS .if defined(HTML) rm -rf HTML .endif .else - rm -f ${DEPENDFILE} + rm -f ${DEPENDFILE} tags .endif .endif .endif From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 17:52:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 924A0106566C; Mon, 18 Jan 2010 17:52:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6852B8FC14; Mon, 18 Jan 2010 17:52:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IHqvkr034903; Mon, 18 Jan 2010 17:52:57 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IHqvER034901; Mon, 18 Jan 2010 17:52:57 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001181752.o0IHqvER034901@svn.freebsd.org> From: Warner Losh Date: Mon, 18 Jan 2010 17:52:57 +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: r202580 - head/sys/dev/cs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 17:52:57 -0000 Author: imp Date: Mon Jan 18 17:52:57 2010 New Revision: 202580 URL: http://svn.freebsd.org/changeset/base/202580 Log: Fix indentation nit. Modified: head/sys/dev/cs/if_cs.c Modified: head/sys/dev/cs/if_cs.c ============================================================================== --- head/sys/dev/cs/if_cs.c Mon Jan 18 15:58:02 2010 (r202579) +++ head/sys/dev/cs/if_cs.c Mon Jan 18 17:52:57 2010 (r202580) @@ -852,7 +852,7 @@ cs_write_mbufs( struct cs_softc *sc, str * Ignore empty parts */ if (!len) - continue; + continue; /* * Find actual data address From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 17:53:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA0CC106568B; Mon, 18 Jan 2010 17:53:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A99218FC0C; Mon, 18 Jan 2010 17:53:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IHriIW035104; Mon, 18 Jan 2010 17:53:44 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IHrioQ035102; Mon, 18 Jan 2010 17:53:44 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001181753.o0IHrioQ035102@svn.freebsd.org> From: Warner Losh Date: Mon, 18 Jan 2010 17:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202581 - head/sys/dev/cs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 17:53:44 -0000 Author: imp Date: Mon Jan 18 17:53:44 2010 New Revision: 202581 URL: http://svn.freebsd.org/changeset/base/202581 Log: Add a warning if we're inw'ing from an odd address. This could happen due to a bug and might be the real basis for the cardbus workaround hack. Modified: head/sys/dev/cs/if_csreg.h Modified: head/sys/dev/cs/if_csreg.h ============================================================================== --- head/sys/dev/cs/if_csreg.h Mon Jan 18 17:52:57 2010 (r202580) +++ head/sys/dev/cs/if_csreg.h Mon Jan 18 17:53:44 2010 (r202581) @@ -539,6 +539,8 @@ static __inline uint16_t cs_inw(struct cs_softc *sc, int off) { + if (off & 1) + device_printf(sc->dev, "BUG: inw to an odd address.\n"); return ((inb(sc->nic_addr + off) & 0xff) | (inb(sc->nic_addr + off + 1) << 8)); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 18:37:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD8461065692; Mon, 18 Jan 2010 18:37:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A38128FC19; Mon, 18 Jan 2010 18:37:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IIblU8044780; Mon, 18 Jan 2010 18:37:47 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IIblg7044778; Mon, 18 Jan 2010 18:37:47 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001181837.o0IIblg7044778@svn.freebsd.org> From: Doug Barton Date: Mon, 18 Jan 2010 18:37: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: r202582 - head/etc/namedb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 18:37:47 -0000 Author: dougb Date: Mon Jan 18 18:37:47 2010 New Revision: 202582 URL: http://svn.freebsd.org/changeset/base/202582 Log: Update the example named.conf file to answer locally for the newly released IPv4 documentation ranges (http://tools.ietf.org/html/rfc5737) and catch up to the IPv6 documentation range and domain names that 5737 also references. Modified: head/etc/namedb/named.conf Modified: head/etc/namedb/named.conf ============================================================================== --- head/etc/namedb/named.conf Mon Jan 18 17:53:44 2010 (r202581) +++ head/etc/namedb/named.conf Mon Jan 18 18:37:47 2010 (r202582) @@ -125,7 +125,7 @@ zone "in-addr.arpa" { 1. Faster local resolution for your users 2. No spurious traffic will be sent from your network to the roots */ -// RFC 1912 +// RFC 1912 (and BCP 32 for localhost) zone "localhost" { type master; file "/etc/namedb/master/localhost-forward.db"; }; zone "127.in-addr.arpa" { type master; file "/etc/namedb/master/localhost-reverse.db"; }; zone "255.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; @@ -159,8 +159,21 @@ zone "168.192.in-addr.arpa" { type maste // Link-local/APIPA (RFCs 3330 and 3927) zone "254.169.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; -// TEST-NET for Documentation (RFC 3330) +// TEST-NET-[1-3] for Documentation (RFC 5737) zone "2.0.192.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "100.51.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "113.0.203.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// IPv6 Range for Documentation (RFC 3849) +zone "0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + +// Domain Names for Documentation and Testing (BCP 32) +zone "test" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example" { type master; file "/etc/namedb/master/empty.db"; }; +zone "invalid" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.com" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.net" { type master; file "/etc/namedb/master/empty.db"; }; +zone "example.org" { type master; file "/etc/namedb/master/empty.db"; }; // Router Benchmark Testing (RFC 3330) zone "18.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 18:58:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6C291065670; Mon, 18 Jan 2010 18:58:03 +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 96B3A8FC18; Mon, 18 Jan 2010 18:58:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IIw3pJ049360; Mon, 18 Jan 2010 18:58:03 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IIw3F3049358; Mon, 18 Jan 2010 18:58:03 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001181858.o0IIw3F3049358@svn.freebsd.org> From: Ed Schouten Date: Mon, 18 Jan 2010 18:58:03 +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: r202583 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 18:58:03 -0000 Author: ed Date: Mon Jan 18 18:58:03 2010 New Revision: 202583 URL: http://svn.freebsd.org/changeset/base/202583 Log: Remove a dead initialization. Spotted by: scan-build (uqs) Modified: head/sys/kern/tty_inq.c Modified: head/sys/kern/tty_inq.c ============================================================================== --- head/sys/kern/tty_inq.c Mon Jan 18 18:37:47 2010 (r202582) +++ head/sys/kern/tty_inq.c Mon Jan 18 18:58:03 2010 (r202583) @@ -379,7 +379,7 @@ ttyinq_findchar(struct ttyinq *ti, const void ttyinq_flush(struct ttyinq *ti) { - struct ttyinq_block *tib = ti->ti_lastblock; + struct ttyinq_block *tib; ti->ti_begin = 0; ti->ti_linestart = 0; From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 19:09:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6ECE1065670; Mon, 18 Jan 2010 19:09:16 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96D788FC19; Mon, 18 Jan 2010 19:09:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IJ9GUv051861; Mon, 18 Jan 2010 19:09:16 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IJ9GEG051859; Mon, 18 Jan 2010 19:09:16 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <201001181909.o0IJ9GEG051859@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 18 Jan 2010 19:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202584 - head/sys/fs/ext2fs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 19:09:16 -0000 Author: lulf Date: Mon Jan 18 19:09:16 2010 New Revision: 202584 URL: http://svn.freebsd.org/changeset/base/202584 Log: Revert parts of r202283: - Return EOPNOTSUPP before EROFS to be consistent with other filesystems. - Fix setting of the nodump flag for users without PRIV_VFS_SYSFLAGS privilege. Submitted by: jh@ Modified: head/sys/fs/ext2fs/ext2_vnops.c Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Mon Jan 18 18:58:03 2010 (r202583) +++ head/sys/fs/ext2fs/ext2_vnops.c Mon Jan 18 19:09:16 2010 (r202584) @@ -402,11 +402,12 @@ ext2_setattr(ap) return (EINVAL); } if (vap->va_flags != VNOVAL) { - if (vp->v_mount->mnt_flag & MNT_RDONLY) - return (EROFS); /* Disallow flags not supported by ext2fs. */ if(vap->va_flags & ~(SF_APPEND | SF_IMMUTABLE | UF_NODUMP)) - return(EOPNOTSUPP); + return (EOPNOTSUPP); + + if (vp->v_mount->mnt_flag & MNT_RDONLY) + return (EROFS); /* * Callers may only modify the file flags on objects they * have VADMIN rights for. @@ -430,9 +431,11 @@ ext2_setattr(ap) ip->i_flags = vap->va_flags; } else { if (ip->i_flags - & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND)) + & (SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND) || + (vap->va_flags & UF_SETTABLE) != vap->va_flags) return (EPERM); ip->i_flags &= SF_SETTABLE; + ip->i_flags |= (vap->va_flags & UF_SETTABLE); } ip->i_flag |= IN_CHANGE; if (vap->va_flags & (IMMUTABLE | APPEND)) From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 19:10:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B2C4106568F; Mon, 18 Jan 2010 19:10:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B1588FC0A; Mon, 18 Jan 2010 19:10:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IJAFvG052131; Mon, 18 Jan 2010 19:10:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IJAF1I052129; Mon, 18 Jan 2010 19:10:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201001181910.o0IJAF1I052129@svn.freebsd.org> From: Andriy Gapon Date: Mon, 18 Jan 2010 19:10: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: r202585 - head/lib/libstand X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 19:10:15 -0000 Author: avg Date: Mon Jan 18 19:10:14 2010 New Revision: 202585 URL: http://svn.freebsd.org/changeset/base/202585 Log: fix a comment typo MFC after: 3 days Modified: head/lib/libstand/bzipfs.c Modified: head/lib/libstand/bzipfs.c ============================================================================== --- head/lib/libstand/bzipfs.c Mon Jan 18 19:09:16 2010 (r202584) +++ head/lib/libstand/bzipfs.c Mon Jan 18 19:10:14 2010 (r202585) @@ -279,7 +279,7 @@ bzf_rewind(struct open_file *f) /* * Since bzip2 does not have an equivalent inflateReset function a crude * one needs to be provided. The functions all called in such a way that - * at any time an error occurs a role back can be done (effectively making + * at any time an error occurs a roll back can be done (effectively making * this rewind 'atomic', either the reset occurs successfully or not at all, * with no 'undefined' state happening). */ From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 19:39:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69EA41065676; Mon, 18 Jan 2010 19:39:55 +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 59DC48FC20; Mon, 18 Jan 2010 19:39:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IJdt4U058650; Mon, 18 Jan 2010 19:39:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IJdtDE058648; Mon, 18 Jan 2010 19:39:55 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001181939.o0IJdtDE058648@svn.freebsd.org> From: Xin LI Date: Mon, 18 Jan 2010 19:39:55 +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: r202586 - head/sbin/geom/core X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 19:39:55 -0000 Author: delphij Date: Mon Jan 18 19:39:55 2010 New Revision: 202586 URL: http://svn.freebsd.org/changeset/base/202586 Log: Also output stripeoffset for consumer even if stripesize is zero, while stripeoffset is non-zero. Pointed out by: mav Modified: head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.c ============================================================================== --- head/sbin/geom/core/geom.c Mon Jan 18 19:10:14 2010 (r202585) +++ head/sbin/geom/core/geom.c Mon Jan 18 19:39:55 2010 (r202586) @@ -800,7 +800,7 @@ list_one_consumer(struct gconsumer *cp, printf("%sMediasize: %jd (%s)\n", prefix, (intmax_t)pp->lg_mediasize, buf); printf("%sSectorsize: %u\n", prefix, pp->lg_sectorsize); - if (pp->lg_stripesize > 0) { + if (pp->lg_stripesize > 0 || pp->lg_stripeoffset > 0) { printf("%sStripesize: %ju\n", prefix, pp->lg_stripesize); printf("%sStripeoffset: %ju\n", prefix, pp->lg_stripeoffset); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 20:25:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CC9A1065670; Mon, 18 Jan 2010 20:25:30 +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 1C9338FC0A; Mon, 18 Jan 2010 20:25:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IKPUd3068641; Mon, 18 Jan 2010 20:25:30 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IKPTh9068639; Mon, 18 Jan 2010 20:25:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001182025.o0IKPTh9068639@svn.freebsd.org> From: Marius Strobl Date: Mon, 18 Jan 2010 20:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202587 - head/sys/sparc64/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 20:25:30 -0000 Author: marius Date: Mon Jan 18 20:25:29 2010 New Revision: 202587 URL: http://svn.freebsd.org/changeset/base/202587 Log: Add epic(4) also here. MFC after: 3 days Modified: head/sys/sparc64/conf/NOTES Modified: head/sys/sparc64/conf/NOTES ============================================================================== --- head/sys/sparc64/conf/NOTES Mon Jan 18 19:39:55 2010 (r202586) +++ head/sys/sparc64/conf/NOTES Mon Jan 18 20:25:29 2010 (r202587) @@ -43,6 +43,7 @@ device mc146818 # Motorola MC146818 and # device auxio # auxiliary I/O device +device epic # Sun Fire V215/V245 LEDs device creator # Creator, Creator3D and Elite3D framebuffers device machfb # ATI Mach64 framebuffers From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 20:34:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 546121065694; Mon, 18 Jan 2010 20:34:01 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 438C08FC20; Mon, 18 Jan 2010 20:34:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IKY1eT070560; Mon, 18 Jan 2010 20:34:01 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IKY1p4070521; Mon, 18 Jan 2010 20:34:01 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001182034.o0IKY1p4070521@svn.freebsd.org> From: Andrew Thompson Date: Mon, 18 Jan 2010 20:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202588 - in head/sys: net netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 20:34:01 -0000 Author: thompsa Date: Mon Jan 18 20:34:00 2010 New Revision: 202588 URL: http://svn.freebsd.org/changeset/base/202588 Log: Declare a new EVENTHANDLER called iflladdr_event which signals that the L2 address on an interface has changed. This lets stacked interfaces such as vlan(4) detect that their lower interface has changed and adjust things in order to keep working. Previously this situation broke at least vlan(4) and lagg(4) configurations. The EVENTHANDLER_INVOKE call was not placed within if_setlladdr() due to the risk of a loop. PR: kern/142927 Submitted by: Nikolay Denev Modified: head/sys/net/if.c head/sys/net/if_bridge.c head/sys/net/if_lagg.c head/sys/net/if_var.h head/sys/net/if_vlan.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_ether.c head/sys/netgraph/ng_fec.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/net/if.c Mon Jan 18 20:34:00 2010 (r202588) @@ -2268,6 +2268,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, return (error); error = if_setlladdr(ifp, ifr->ifr_addr.sa_data, ifr->ifr_addr.sa_len); + EVENTHANDLER_INVOKE(iflladdr_event, ifp); break; case SIOCAIFGROUP: Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/net/if_bridge.c Mon Jan 18 20:34:00 2010 (r202588) @@ -917,6 +917,7 @@ bridge_delete_member(struct bridge_softc IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); sc->sc_ifaddr = fif; } + EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp); } bridge_mutecaps(sc); /* recalcuate now this interface is removed */ @@ -1033,6 +1034,7 @@ bridge_ioctl_add(struct bridge_softc *sc !memcmp(IF_LLADDR(sc->sc_ifp), sc->sc_defaddr, ETHER_ADDR_LEN)) { bcopy(IF_LLADDR(ifs), IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); sc->sc_ifaddr = ifs; + EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp); } ifs->if_bridge = sc; Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/net/if_lagg.c Mon Jan 18 20:34:00 2010 (r202588) @@ -305,6 +305,7 @@ lagg_lladdr(struct lagg_softc *sc, uint8 /* Let the protocol know the MAC has changed */ if (sc->sc_lladdr != NULL) (*sc->sc_lladdr)(sc); + EVENTHANDLER_INVOKE(iflladdr_event, ifp); } static void Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/net/if_var.h Mon Jan 18 20:34:00 2010 (r202588) @@ -339,6 +339,9 @@ void if_maddr_runlock(struct ifnet *ifp) } while(0) #ifdef _KERNEL +/* interface link layer address change event */ +typedef void (*iflladdr_event_handler_t)(void *, struct ifnet *); +EVENTHANDLER_DECLARE(iflladdr_event, iflladdr_event_handler_t); /* interface address change event */ typedef void (*ifaddr_event_handler_t)(void *, struct ifnet *); EVENTHANDLER_DECLARE(ifaddr_event, ifaddr_event_handler_t); Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/net/if_vlan.c Mon Jan 18 20:34:00 2010 (r202588) @@ -138,6 +138,7 @@ SYSCTL_INT(_net_link_vlan, OID_AUTO, sof static MALLOC_DEFINE(M_VLAN, VLANNAME, "802.1Q Virtual LAN Interface"); static eventhandler_tag ifdetach_tag; +static eventhandler_tag iflladdr_tag; /* * We have a global mutex, that is used to serialize configuration @@ -199,6 +200,7 @@ static int vlan_clone_create(struct if_c static int vlan_clone_destroy(struct if_clone *, struct ifnet *); static void vlan_ifdetach(void *arg, struct ifnet *ifp); +static void vlan_iflladdr(void *arg, struct ifnet *ifp); static struct if_clone vlan_cloner = IFC_CLONE_INITIALIZER(VLANNAME, NULL, IF_MAXUNIT, NULL, vlan_clone_match, vlan_clone_create, vlan_clone_destroy); @@ -463,6 +465,41 @@ vlan_setmulti(struct ifnet *ifp) } /* + * A handler for parent interface link layer address changes. + * If the parent interface link layer address is changed we + * should also change it on all children vlans. + */ +static void +vlan_iflladdr(void *arg __unused, struct ifnet *ifp) +{ + struct ifvlan *ifv; + int i; + + /* + * Check if it's a trunk interface first of all + * to avoid needless locking. + */ + if (ifp->if_vlantrunk == NULL) + return; + + VLAN_LOCK(); + /* + * OK, it's a trunk. Loop over and change all vlan's lladdrs on it. + */ +#ifdef VLAN_ARRAY + for (i = 0; i < VLAN_ARRAY_SIZE; i++) + if ((ifv = ifp->if_vlantrunk->vlans[i])) + if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); +#else /* VLAN_ARRAY */ + for (i = 0; i < (1 << ifp->if_vlantrunk->hwidth); i++) + LIST_FOREACH(ifv, &ifp->if_vlantrunk->hash[i], ifv_list) + if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); +#endif /* VLAN_ARRAY */ + VLAN_UNLOCK(); + +} + +/* * A handler for network interface departure events. * Track departure of trunks here so that we don't access invalid * pointers or whatever if a trunk is ripped from under us, e.g., @@ -537,6 +574,10 @@ vlan_modevent(module_t mod, int type, vo vlan_ifdetach, NULL, EVENTHANDLER_PRI_ANY); if (ifdetach_tag == NULL) return (ENOMEM); + iflladdr_tag = EVENTHANDLER_REGISTER(iflladdr_event, + vlan_iflladdr, NULL, EVENTHANDLER_PRI_ANY); + if (iflladdr_tag == NULL) + return (ENOMEM); VLAN_LOCK_INIT(); vlan_input_p = vlan_input; vlan_link_state_p = vlan_link_state; @@ -555,6 +596,7 @@ vlan_modevent(module_t mod, int type, vo case MOD_UNLOAD: if_clone_detach(&vlan_cloner); EVENTHANDLER_DEREGISTER(ifnet_departure_event, ifdetach_tag); + EVENTHANDLER_DEREGISTER(iflladdr_event, iflladdr_tag); vlan_input_p = NULL; vlan_link_state_p = NULL; vlan_trunk_cap_p = NULL; Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/netgraph/ng_eiface.c Mon Jan 18 20:34:00 2010 (r202588) @@ -431,6 +431,7 @@ ng_eiface_rcvmsg(node_p node, item_p ite } error = if_setlladdr(priv->ifp, (u_char *)msg->data, ETHER_ADDR_LEN); + EVENTHANDLER_INVOKE(iflladdr_event, priv->ifp); break; } Modified: head/sys/netgraph/ng_ether.c ============================================================================== --- head/sys/netgraph/ng_ether.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/netgraph/ng_ether.c Mon Jan 18 20:34:00 2010 (r202588) @@ -481,6 +481,7 @@ ng_ether_rcvmsg(node_p node, item_p item } error = if_setlladdr(priv->ifp, (u_char *)msg->data, ETHER_ADDR_LEN); + EVENTHANDLER_INVOKE(iflladdr_event, priv->ifp); break; } case NGM_ETHER_GET_PROMISC: Modified: head/sys/netgraph/ng_fec.c ============================================================================== --- head/sys/netgraph/ng_fec.c Mon Jan 18 20:25:29 2010 (r202587) +++ head/sys/netgraph/ng_fec.c Mon Jan 18 20:34:00 2010 (r202588) @@ -433,6 +433,7 @@ ng_fec_addport(struct ng_fec_private *pr /* Set up phony MAC address. */ if_setlladdr(bifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); + EVENTHANDLER_INVOKE(iflladdr_event, bifp); /* Save original input vector */ new->fec_if_input = bifp->if_input; From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 21:56:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21E771065670; Mon, 18 Jan 2010 21:56:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11D168FC15; Mon, 18 Jan 2010 21:56:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ILu8hc089192; Mon, 18 Jan 2010 21:56:08 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ILu8iF089189; Mon, 18 Jan 2010 21:56:08 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201001182156.o0ILu8iF089189@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 18 Jan 2010 21:56:08 +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: r202596 - in head: share/mk sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 21:56:09 -0000 Author: trasz Date: Mon Jan 18 21:56:08 2010 New Revision: 202596 URL: http://svn.freebsd.org/changeset/base/202596 Log: Undo r169961, removing WITH_GCC3, added as a temporary workaround three years ago. Modified: head/share/mk/bsd.sys.mk head/sys/conf/kern.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Mon Jan 18 21:55:12 2010 (r202595) +++ head/share/mk/bsd.sys.mk Mon Jan 18 21:56:08 2010 (r202596) @@ -55,9 +55,7 @@ CWARNFLAGS += -Wchar-subscripts -Winline # XXX always get it right. CWARNFLAGS += -Wno-uninitialized . endif -. if !defined(WITH_GCC3) CWARNFLAGS += -Wno-pointer-sign -. endif . endif . if defined(FORMAT_AUDIT) Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Mon Jan 18 21:55:12 2010 (r202595) +++ head/sys/conf/kern.mk Mon Jan 18 21:56:08 2010 (r202596) @@ -12,10 +12,7 @@ CWARNFLAGS= .else CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - ${_wundef} ${_Wno_pointer_sign} -fformat-extensions -.if !defined(WITH_GCC3) -_Wno_pointer_sign=-Wno-pointer-sign -.endif + ${_wundef} -Wno-pointer-sign -fformat-extensions .if !defined(NO_UNDEF) _wundef= -Wundef .endif From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 22:46:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21738106566B; Mon, 18 Jan 2010 22:46:07 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 070008FC1B; Mon, 18 Jan 2010 22:46:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IMk6QR000349; Mon, 18 Jan 2010 22:46:06 GMT (envelope-from wkoszek@svn.freebsd.org) Received: (from wkoszek@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IMk6dw000346; Mon, 18 Jan 2010 22:46:06 GMT (envelope-from wkoszek@svn.freebsd.org) Message-Id: <201001182246.o0IMk6dw000346@svn.freebsd.org> From: "Wojciech A. Koszek" Date: Mon, 18 Jan 2010 22:46:06 +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: r202598 - head/sys/compat/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 22:46:07 -0000 Author: wkoszek Date: Mon Jan 18 22:46:06 2010 New Revision: 202598 URL: http://svn.freebsd.org/changeset/base/202598 Log: Let us to use our libusb(3) in Linuxolator. With this change, Linux binaries can work with our libusb(3) when it's compiled against our header files on GNU/Linux system -- this solves the problem with differences between /dev layouts. With ported libusb(3), I am able to use my USB JTAG cable with Linux binaries that support it. Reviewed by: thompsa Modified: head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_ioctl.h Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Mon Jan 18 22:39:33 2010 (r202597) +++ head/sys/compat/linux/linux_ioctl.c Mon Jan 18 22:46:06 2010 (r202598) @@ -96,6 +96,7 @@ static linux_ioctl_function_t linux_ioct static linux_ioctl_function_t linux_ioctl_sg; static linux_ioctl_function_t linux_ioctl_v4l; static linux_ioctl_function_t linux_ioctl_special; +static linux_ioctl_function_t linux_ioctl_fbsd_usb; static struct linux_ioctl_handler cdrom_handler = { linux_ioctl_cdrom, LINUX_IOCTL_CDROM_MIN, LINUX_IOCTL_CDROM_MAX }; @@ -121,6 +122,8 @@ static struct linux_ioctl_handler sg_han { linux_ioctl_sg, LINUX_IOCTL_SG_MIN, LINUX_IOCTL_SG_MAX }; static struct linux_ioctl_handler video_handler = { linux_ioctl_v4l, LINUX_IOCTL_VIDEO_MIN, LINUX_IOCTL_VIDEO_MAX }; +static struct linux_ioctl_handler fbsd_usb = +{ linux_ioctl_fbsd_usb, LINUX_FBSD_USB_MIN, LINUX_FBSD_USB_MAX }; DATA_SET(linux_ioctl_handler_set, cdrom_handler); DATA_SET(linux_ioctl_handler_set, vfat_handler); @@ -134,6 +137,7 @@ DATA_SET(linux_ioctl_handler_set, privat DATA_SET(linux_ioctl_handler_set, drm_handler); DATA_SET(linux_ioctl_handler_set, sg_handler); DATA_SET(linux_ioctl_handler_set, video_handler); +DATA_SET(linux_ioctl_handler_set, fbsd_usb); struct handler_element { @@ -2960,6 +2964,24 @@ linux_ioctl_special(struct thread *td, s } /* + * Support for mounting our devfs under /compat/linux/dev and using + * our libusb(3) compiled on Linux to access it from within Linuxolator + * environment. + */ +static int +linux_ioctl_fbsd_usb(struct thread *td, struct linux_ioctl_args *args) +{ + + /* + * Because on GNU/Linux we build our libusb(3) with our header + * files and ioccom.h macros, ioctl() will contain our native + * command value. This means that we can basically redirect this + * call further. + */ + return (ioctl(td, (struct ioctl_args *)args)); +} + +/* * main ioctl syscall function */ Modified: head/sys/compat/linux/linux_ioctl.h ============================================================================== --- head/sys/compat/linux/linux_ioctl.h Mon Jan 18 22:39:33 2010 (r202597) +++ head/sys/compat/linux/linux_ioctl.h Mon Jan 18 22:46:06 2010 (r202598) @@ -611,4 +611,10 @@ int linux_ifname(struct ifnet *, char #define LINUX_IOCTL_VIDEO_MIN LINUX_VIDIOCGCAP #define LINUX_IOCTL_VIDEO_MAX LINUX_VIDIOCSVBIFMT +/* + * Keep in sync with our include/dev/usb/usb_ioctl.h. + */ +#define LINUX_FBSD_USB_MIN 0x5100 +#define LINUX_FBSD_USB_MAX 0x55c7 + #endif /* !_LINUX_IOCTL_H_ */ From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 22:59:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B653106566C; Mon, 18 Jan 2010 22:59:53 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4AEE58FC15; Mon, 18 Jan 2010 22:59:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IMxrPW003464; Mon, 18 Jan 2010 22:59:53 GMT (envelope-from wkoszek@svn.freebsd.org) Received: (from wkoszek@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IMxrfW003462; Mon, 18 Jan 2010 22:59:53 GMT (envelope-from wkoszek@svn.freebsd.org) Message-Id: <201001182259.o0IMxrfW003462@svn.freebsd.org> From: "Wojciech A. Koszek" Date: Mon, 18 Jan 2010 22:59: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: r202600 - head/share/examples/kld/firmware/fwconsumer X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 22:59:53 -0000 Author: wkoszek Date: Mon Jan 18 22:59:53 2010 New Revision: 202600 URL: http://svn.freebsd.org/changeset/base/202600 Log: Small fix for making this KLD to compile. Modified: head/share/examples/kld/firmware/fwconsumer/fw_consumer.c Modified: head/share/examples/kld/firmware/fwconsumer/fw_consumer.c ============================================================================== --- head/share/examples/kld/firmware/fwconsumer/fw_consumer.c Mon Jan 18 22:48:41 2010 (r202599) +++ head/share/examples/kld/firmware/fwconsumer/fw_consumer.c Mon Jan 18 22:59:53 2010 (r202600) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -static struct firmware *fp; +static const struct firmware *fp; static int fw_consumer_modevent(module_t mod, int type, void *unused) From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 23:04:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C06891065670; Mon, 18 Jan 2010 23:04:38 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B05BF8FC18; Mon, 18 Jan 2010 23:04:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IN4cCI004537; Mon, 18 Jan 2010 23:04:38 GMT (envelope-from wkoszek@svn.freebsd.org) Received: (from wkoszek@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IN4cNV004535; Mon, 18 Jan 2010 23:04:38 GMT (envelope-from wkoszek@svn.freebsd.org) Message-Id: <201001182304.o0IN4cNV004535@svn.freebsd.org> From: "Wojciech A. Koszek" Date: Mon, 18 Jan 2010 23:04:38 +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: r202601 - head/share/examples/kld/syscall/test X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 23:04:38 -0000 Author: wkoszek Date: Mon Jan 18 23:04:38 2010 New Revision: 202601 URL: http://svn.freebsd.org/changeset/base/202601 Log: Include stdlib.h for exit(3) and unistd.h for syscall(2). This makes this program to compile cleanly. Modified: head/share/examples/kld/syscall/test/call.c Modified: head/share/examples/kld/syscall/test/call.c ============================================================================== --- head/share/examples/kld/syscall/test/call.c Mon Jan 18 22:59:53 2010 (r202600) +++ head/share/examples/kld/syscall/test/call.c Mon Jan 18 23:04:38 2010 (r202601) @@ -27,6 +27,8 @@ */ #include +#include +#include #include #include #include From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 23:09:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16DF41065670; Mon, 18 Jan 2010 23:09:08 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 068208FC14; Mon, 18 Jan 2010 23:09:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IN976Y005599; Mon, 18 Jan 2010 23:09:07 GMT (envelope-from wkoszek@svn.freebsd.org) Received: (from wkoszek@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IN97c9005596; Mon, 18 Jan 2010 23:09:07 GMT (envelope-from wkoszek@svn.freebsd.org) Message-Id: <201001182309.o0IN97c9005596@svn.freebsd.org> From: "Wojciech A. Koszek" Date: Mon, 18 Jan 2010 23:09: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: r202602 - head/share/examples/kld/syscall/test X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 23:09:08 -0000 Author: wkoszek Date: Mon Jan 18 23:09:07 2010 New Revision: 202602 URL: http://svn.freebsd.org/changeset/base/202602 Log: Small cleanup while being here: - sort includes - remove usage(), since it seems to come from older version of the KLD - remove unnecessary variable - mark argc/argv as unused Bring WARNS = 5 to the Makefile. Modified: head/share/examples/kld/syscall/test/Makefile head/share/examples/kld/syscall/test/call.c Modified: head/share/examples/kld/syscall/test/Makefile ============================================================================== --- head/share/examples/kld/syscall/test/Makefile Mon Jan 18 23:04:38 2010 (r202601) +++ head/share/examples/kld/syscall/test/Makefile Mon Jan 18 23:09:07 2010 (r202602) @@ -3,5 +3,6 @@ PROG= call NO_MAN= +WARNS+= 5 .include Modified: head/share/examples/kld/syscall/test/call.c ============================================================================== --- head/share/examples/kld/syscall/test/call.c Mon Jan 18 23:04:38 2010 (r202601) +++ head/share/examples/kld/syscall/test/call.c Mon Jan 18 23:09:07 2010 (r202602) @@ -26,26 +26,17 @@ * $FreeBSD$ */ -#include -#include -#include -#include #include #include +#include -static void usage (void); - -static void -usage (void) -{ - fprintf (stderr, "call syscall-number\n"); - exit (1); -} +#include +#include +#include int -main(int argc, char **argv) +main(int argc __unused, char **argv __unused) { - char *endptr; int syscall_num; struct module_stat stat; From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 23:13:23 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21FB11065676; Mon, 18 Jan 2010 23:13:23 +0000 (UTC) (envelope-from wkoszek@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 117EC8FC14; Mon, 18 Jan 2010 23:13:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0INDMlx006578; Mon, 18 Jan 2010 23:13:22 GMT (envelope-from wkoszek@svn.freebsd.org) Received: (from wkoszek@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0INDMNE006575; Mon, 18 Jan 2010 23:13:22 GMT (envelope-from wkoszek@svn.freebsd.org) Message-Id: <201001182313.o0INDMNE006575@svn.freebsd.org> From: "Wojciech A. Koszek" Date: Mon, 18 Jan 2010 23:13: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: r202603 - head/share/examples/kld/cdev/test X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 23:13:23 -0000 Author: wkoszek Date: Mon Jan 18 23:13:22 2010 New Revision: 202603 URL: http://svn.freebsd.org/changeset/base/202603 Log: Include unistd.h for read(), write() and stdlib.h for exit(). Bump WARNS to 5 while being here. Modified: head/share/examples/kld/cdev/test/Makefile head/share/examples/kld/cdev/test/testcdev.c Modified: head/share/examples/kld/cdev/test/Makefile ============================================================================== --- head/share/examples/kld/cdev/test/Makefile Mon Jan 18 23:09:07 2010 (r202602) +++ head/share/examples/kld/cdev/test/Makefile Mon Jan 18 23:13:22 2010 (r202603) @@ -68,6 +68,7 @@ # PROG= testcdev NO_MAN= +WARNS= 5 MODSTAT= /sbin/kldstat Modified: head/share/examples/kld/cdev/test/testcdev.c ============================================================================== --- head/share/examples/kld/cdev/test/testcdev.c Mon Jan 18 23:09:07 2010 (r202602) +++ head/share/examples/kld/cdev/test/testcdev.c Mon Jan 18 23:13:22 2010 (r202603) @@ -70,13 +70,15 @@ * * $FreeBSD$ */ +#include +#include #include +#include #include #include #include -#include -#include +#include #define CDEV_IOCTL1 _IOR('C', 1, u_int) #define CDEV_DEVICE "cdev" @@ -85,7 +87,7 @@ static char writestr[] = "Hello kernel!" static char buf[512+1]; int -main(int argc, char *argv[]) +main(int argc __unused, char *argv[] __unused) { int kernel_fd; int one; From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 23:28:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D43DC1065672; Mon, 18 Jan 2010 23:28:25 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C44828FC18; Mon, 18 Jan 2010 23:28:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0INSPp1009925; Mon, 18 Jan 2010 23:28:25 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0INSPQs009922; Mon, 18 Jan 2010 23:28:25 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001182328.o0INSPQs009922@svn.freebsd.org> From: Ed Schouten Date: Mon, 18 Jan 2010 23:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202604 - head/libexec/ftpd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 23:28:25 -0000 Author: ed Date: Mon Jan 18 23:28:25 2010 New Revision: 202604 URL: http://svn.freebsd.org/changeset/base/202604 Log: Really disable wtmp logging when chrooting. Also perform a small cleanup to ftpd_logwtmp(). Just use a NULL parameter for the username to indicate a logout, instead of an empty string. Reported by: Alexey Shuvaev Modified: head/libexec/ftpd/ftpd.c head/libexec/ftpd/logwtmp.c Modified: head/libexec/ftpd/ftpd.c ============================================================================== --- head/libexec/ftpd/ftpd.c Mon Jan 18 23:13:22 2010 (r202603) +++ head/libexec/ftpd/ftpd.c Mon Jan 18 23:28:25 2010 (r202604) @@ -1178,8 +1178,8 @@ end_login(void) #endif (void) seteuid(0); - if (logged_in && dowtmp && !dochroot) - ftpd_logwtmp(wtmpid, "", NULL); + if (logged_in && dowtmp) + ftpd_logwtmp(wtmpid, NULL, NULL); pw = NULL; #ifdef LOGIN_CAP setusercontext(NULL, getpwuid(0), 0, @@ -1482,7 +1482,10 @@ skip: ; chrootdir = NULL; - if (dowtmp && !dochroot) + /* Disable wtmp logging when chrooting. */ + if (dochroot || guest) + dowtmp = 0; + if (dowtmp) ftpd_logwtmp(wtmpid, pw->pw_name, (struct sockaddr *)&his_addr); logged_in = 1; @@ -2730,9 +2733,9 @@ void dologout(int status) { - if (logged_in && dowtmp && !dochroot) { + if (logged_in && dowtmp) { (void) seteuid(0); - ftpd_logwtmp(wtmpid, "", NULL); + ftpd_logwtmp(wtmpid, NULL, NULL); } /* beware of flushing buffers after a SIGPIPE */ _exit(status); Modified: head/libexec/ftpd/logwtmp.c ============================================================================== --- head/libexec/ftpd/logwtmp.c Mon Jan 18 23:13:22 2010 (r202603) +++ head/libexec/ftpd/logwtmp.c Mon Jan 18 23:28:25 2010 (r202604) @@ -60,7 +60,7 @@ ftpd_logwtmp(char *id, char *user, struc memset(&ut, 0, sizeof(ut)); - if (*user != '\0') { + if (user != NULL) { /* Log in. */ ut.ut_type = USER_PROCESS; (void)strncpy(ut.ut_user, user, sizeof(ut.ut_user)); From owner-svn-src-head@FreeBSD.ORG Mon Jan 18 23:34:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E1781065672; Mon, 18 Jan 2010 23:34:24 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E34E8FC08; Mon, 18 Jan 2010 23:34:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0INYORP011345; Mon, 18 Jan 2010 23:34:24 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0INYNSb011343; Mon, 18 Jan 2010 23:34:23 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001182334.o0INYNSb011343@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 18 Jan 2010 23:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202606 - head/share/zoneinfo X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 23:34:24 -0000 Author: edwin Date: Mon Jan 18 23:34:23 2010 New Revision: 202606 URL: http://svn.freebsd.org/changeset/base/202606 Log: MFV of tzdata2010a: Administrative only: Fix AT fields for Asia/Dhaka Modified: head/share/zoneinfo/asia Directory Properties: head/share/zoneinfo/ (props changed) Modified: head/share/zoneinfo/asia ============================================================================== --- head/share/zoneinfo/asia Mon Jan 18 23:32:53 2010 (r202605) +++ head/share/zoneinfo/asia Mon Jan 18 23:34:23 2010 (r202606) @@ -1,4 +1,4 @@ -# @(#)asia 8.50 +# @(#)asia 8.51 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -226,10 +226,10 @@ Zone Asia/Bahrain 3:22:20 - LMT 1920 # # establishment of a rule. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Dhaka 2009 only - Jun 29 23:00 1 S -Rule Dhaka 2010 only - Jan 1 0:00 - - -Rule Dhaka 2010 max - Mar 31 23:00 1 S -Rule Dhaka 2010 max - Nov 1 0:00 - - +Rule Dhaka 2009 only - Jun 19 23:00 1:00 S +Rule Dhaka 2010 only - Jan 1 0:00 0 - +Rule Dhaka 2010 max - Mar 31 23:00 1:00 S +Rule Dhaka 2010 max - Nov 1 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 01:04:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 271761065676; Tue, 19 Jan 2010 01:04:45 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 151758FC0C; Tue, 19 Jan 2010 01:04:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J14j2u031211; Tue, 19 Jan 2010 01:04:45 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J14jf2031209; Tue, 19 Jan 2010 01:04:45 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201001190104.o0J14jf2031209@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 19 Jan 2010 01:04:45 +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: r202607 - head/sys/contrib/dev/uath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 01:04:45 -0000 Author: weongyo Date: Tue Jan 19 01:04:44 2010 New Revision: 202607 URL: http://svn.freebsd.org/changeset/base/202607 Log: Fixes a firmware bug that in some devices (e.g. Netgear WG111T or TRENDnet TEW-504UB/EU) idProduct didn't be decreased after loading the firmware. Pointed by: Steven Friedrich Reviewed by: sam Modified: head/sys/contrib/dev/uath/ar5523.bin.uu Modified: head/sys/contrib/dev/uath/ar5523.bin.uu ============================================================================== --- head/sys/contrib/dev/uath/ar5523.bin.uu Mon Jan 18 23:34:23 2010 (r202606) +++ head/sys/contrib/dev/uath/ar5523.bin.uu Tue Jan 19 01:04:44 2010 (r202607) @@ -59,34 +59,34 @@ M``````````````````````````````````````` M```````````````````````````````````````````````````````````` M``````!`@&@``````#P"$``T0O\`0()@`````````````````"0"``)`@H`` M`````````````````^`((3P:@``G6@MT/!^``"?_!&0#7]`B!!$``0`````# -M7]`@`"#X(0-`^`D``````^`((3P:@`(G6D:X/!^``"?_!)0#7]`B!!$``0`` +M7]`@`"#X(0-`^`D``````^`((3P:@`(G6E98/!^``"?_!)0#7]`B!!$``0`` M```#7]`@`"#X(0-`^`D`````0`)@```````\`___-&,`_P!#$"1`@F`````` -M````````````/`2``B2$5_``@.@A/`$?_S0A__\#H>@D/`&@``.AZ"5`!(`` -M`````````````````^`((3P:@`(G6J6$/!^``"?_!1@#7]`B!!$``0`````# -M7]`@`"#X(3P!'_\T(?__`T'0)#P!H``#0=`E`T#X"0`````\'(`#)YS&L#P$ -M@`(DA%?P`(#H(3P(@``\"8``)2D!P#P+@``E:P'DC2(``"$I``2M`@``(0@` +M````````````/`2``B2$9Y``@.@A/`$?_S0A__\#H>@D/`&@``.AZ"5`!(`` +M`````````````````^`((3P:@`(G6JL0/!^``"?_!1@#7]`B!!$``0`````# +M7]`@`"#X(3P!'_\T(?__`T'0)#P!H``#0=`E`T#X"0`````\'(`#)YS64#P$ +M@`(DA&>0`(#H(3P(@``\"8``)2D!P#P+@``E:P'DC2(``"$I``2M`@``(0@` M!!4K__L`````-`0`$#P%@``DI09T/`:``"3&`@"LQ0``(,8`!""$__\4@/_\ M`````#P$@``DA`(`/`6``"2E!X"LA0``/`6``"2E"RBLA0`D/`6``"2E!G2L -MA0"`K(4`A*R%`(@,``*L``````P`:5H`````#`!J>P`````,`&D:``````@` -M;<\\'P``$````0````!`&F``/!O__S=[__`#6]`D0)I@```````````````` +MA0"`K(4`A*R%`(@,``*L``````P`:KT`````#`!KW@`````,`&I]``````@` +M;S(\'P``$````0````!`&F``/!O__S=[__`#6]`D0)I@```````````````` M`$`:\`````````````````!`FG``````````````````0!I@`#P;_[\W>___ M`UO0)$":8``D&@"(/!N``"=[`@"/>P"(`V``"``````#H-@A([W^L*^Z`(BO MH```KZ$`!*^B``BOHP`,KZ0`$*^E`!2OI@`8KZ<`'*^H`""OJ0`DKZH`**^K M`"ROK``PKZT`-*^N`#BOKP`\K[``0*^Q`$2OL@!(K[,`3*^T`%"OM0!4K[8` M6*^W`%RON`!@K[D`9*^\`'"OO@!XK[\`?```(!```"@2KZ0`@*^E`(2ONP!T M0`AH`$`)8`!`"C@`0`M``$`,&`!`#7@`0`YP`*^H`)BOJ0",KZH`E*^K`)RO -MK`"DKZT`H*^N`)`\'(`#)YS&L`.@@"$CO?_@0!I@`#P;__\W>__P`UO0)$": -M8``````````````````,`&D.`@`@(0@``DT``````Z#8(2.]_K"ON@"(KZ`` +MK`"DKZT`H*^N`)`\'(`#)YS64`.@@"$CO?_@0!I@`#P;__\W>__P`UO0)$": +M8``````````````````,`&IQ`@`@(0@``DT``````Z#8(2.]_K"ON@"(KZ`` M`*^A``2OH@`(KZ,`#*^D`!"OI0`4KZ8`&*^G`!ROJ``@KZD`)*^J`"BOJP`L MKZP`,*^M`#2OK@`XKZ\`/*^P`$"OL0!$K[(`2*^S`$ROM`!0K[4`5*^V`%BO MMP!*^_`'P``"`0```H$J^D`("OI0"$K[L`=$`) -M8`!`"C@`0`MP`*^I`(ROJ@"4KZL`D#P<@`,GG,:P/`*``B1"1E2,1```((0` +M8`!`"C@`0`MP`*^I`(ROJ@"4KZL`D#P<@`,GG-90/`*``B1"5?2,1```((0` M`:Q$```#H(`A)[W_X$`#8```````0`)H````````0Q`D``(2@C!"`'\\`X`` M)&,*/`!#$""`4@```D"((20!``02(0`#`````!````P`````/!&@P#8Q`!". M,0``,C$`?SP#@``D8PH\`'$8((!Q```F,0`&`B"0(0``````$8B`0!I@`#P; -M__\W>__P`UO0)$":8``````````````````\"H`")4HQ>`%14""-2@``/`6` -M`B2E,?``L2@@C*4```)`("$!0/@)``````!`D"$\!8`")*4R:`"Q*"",I0`` -M`@`P(0P`=7,`0"`A`D`0(2.]`"!``F``/`/__S1C__X`0Q`D0()@```````` +M__\W>__P`UO0)$":8``````````````````\"H`")4HW(`%14""-2@``/`6` +M`B2E-Y@`L2@@C*4```)`("$!0/@)``````!`D"$\!8`")*4X$`"Q*"",I0`` +M`@`P(0P`=M8`0"`A`D`0(2.]`"!``F``/`/__S1C__X`0Q`D0()@```````` M`````````(^H`)2/J0"`CZH`A$"(.``!(``1`4``$X^A``2/H@`(CZ,`#(^D M`!"/I0`4CZ8`&(^G`!R/J``@CZD`)(^J`"B/JP`LCZP`,(^M`#2/K@`XCZ\` M/(^P`$"/L0!$C[(`2(^S`$R/M`!0C[4`5(^V`%B/MP!(^_`'R/NP",-!K_``-:T"<#>M@D0!I@``` MN@"0C[T`=#=[``)`FV``````````````````0)IP```````````````````` M``]"```8`````````0`"``$``P`!``(``0`$``$``@`!``,``0`"``$`!0`! M``(``0`#``$``@`!``0``0`"``$``P`!``(``0`#X``(``````.@&"$`H.@A -M([W_X*^C``BOOP`0`(#X"0````"/OP`0C[T`"`/@``@`````/`2``B2$1Z@\ -M!8`#)*6B'#"&``,4P``2``````"D.",`!SE"``P(``WK8((][```#8``(`````#0:`"0( @@ -111,7 +111,7 @@ MGP`LC)X`*(R<`"2,EP`@C)8`'(R5`!B,E``4C), M```#X``(`*`0(0`````GO?_PK[\```P``TL``$`AC[\```/@``@GO0`0)[W_ M\*^R``BOLP`,K[$`!*^P````P$@A`0"0(0#@6"$`H'`A%,`!``"`4"$`AQ`K M$$``9#0"__\`1Q`K%$``60#@*"$D`@`(+.,!``!`,"$``S`+/`.``@#%$`8D -M8Q9\`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8!`!B +M8QP<`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8!`!B M4"4`ZU@$`.YP!``+-`(!1@`;,6K__P`.)`)0P``!```!S0``$!(``!@0``,< M``!D&"4``"@2``````````!P2D@"`&D0*U!```L`:1@C`&L8(0!K$"L40``& M)*7__P!I$"M00``$`&D8(R2E__\`:Q@A`&D8(P!F`!M0P``!```!S3'$__\` @@ -120,7 +120,7 @@ M&"$`:Q`K%$``!B3&__\`:1`K$$``!``%%```:Q@ M(P``F"$20``$`.[(!@``P"&N6```KED`!`)@$"&/L@`(C[,`#(^Q``2/L``` M`,`8(0/@``@GO0`0/`(`_S1"__\D`P`0`$<0*R0$`!@`8#`A$`#_I0"",`L4 MX``*`$L0*R0"``$`1@`;4.```0```",!2U`C)!,``0`+9`(Q:/__`4P`&P`.+`)1@``! M```!S0``(!(``!@0``,<``!E&"4``&@2``````````!PB$@"`&D0*U!```L` M:1@C`&L8(0!K$"L40``&)(W__P!I$"M00``$`&D8(R6M__\`:Q@A`&D8(P!L @@ -134,7 +134,7 @@ M``,<``!D&"4``#`2``````````!P4T@"`&D0*Q! M0``&),;__P!I$"L00``$``\4`"3&__\`:Q@A``\4``!&F"40`/^.`&E0(S1" M__\D`P`0`$L0*R0$`!@`8"@A$`#_>0""*`L`AA`K$$``!S0"__\``#`A``"8 M(1$`_U$`H,@A$`#_30%`P"$`1A`K%$``?#P"`/\D`@`(+,,!``!`*"$``R@+ -M/`.``@"I$`8D8Q9\`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J$"L4 +M/`.``@"I$`8D8QP<`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J$"L4 M0``%`H@!@",`!LQ,___`>X0 M!@#J&`0`8E`E``HL`E&```$```'-`.M8!```,!(``"`0``0D``"%&"4``$`2 @@ -148,7 +148,7 @@ M(",!I!`K`8D8(P!B8",`@&@A$`#_[B3&__\T0O_ M(1``_X,`@B@+)[W_X*^_`!`,``3L`Z!`(8^B``"/HP`$C[\`$`/@``@GO0`@ M)[W_\*^R``BOLP`,K[$`!*^P````P$@A`0"0(0#@6"$`H'`A%,`!``"`4"$` MAQ`K$$``9#0"__\`1Q`K%$``60#@*"$D`@`(+.,!``!`,"$``S`+/`.``@#% -M$`8D8Q9\`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8 +M$`8D8QP<`$,0(9!$```D`@`@`(8@(0!$.",0X``(``LT`@!'$",`3A`&`.H8 M!`!B4"4`ZU@$`.YP!``+-`(!1@`;,6K__P`.)`)0P``!```!S0``$!(``!@0 M``,<``!D&"4``"@2``````````!P2D@"`&D0*U!```L`:1@C`&L8(0!K$"L4 M0``&)*7__P!I$"M00``$`&D8(R2E__\`:Q@A`&D8(P!F`!M0P``!```!S3'$ @@ -157,7 +157,7 @@ M``!K&"$`:Q`K%$``!B3&__\`:1`K$$``!``%%`` M`&EP(P``F"$20``$`.[(!@``P"&N6```KED`!`)@$"&/L@`(C[,`#(^Q``2/ ML````,`8(0/@``@GO0`0/`(`_S1"__\D`P`0`$<0*R0$`!@`8#`A$`#_I0"" M,`L4X``*`$L0*R0"``$`1@`;4.```0```",!2U`C)!,``0`+9`(Q:/__`4P`&P`.+`)1 M@``!```!S0``(!(``!@0``,<``!E&"4``&@2``````````!PB$@"`&D0*U!` M``L`:1@C`&L8(0!K$"L40``&)(W__P!I$"M00``$`&D8(R6M__\`:Q@A`&D8 @@ -171,7 +171,7 @@ M`!@0``,<``!D&"4``#`2``````````!P4T@"`&D M$"L40``&),;__P!I$"L00``$``\4`"3&__\`:Q@A``\4``!&F"40`/^.`&E0 M(S1"__\D`P`0`$L0*R0$`!@`8"@A$`#_>0""*`L`AA`K$$``!S0"__\``#`A M``"8(1$`_U$`H,@A$`#_30%`P"$`1A`K%$``?#P"`/\D`@`(+,,!``!`*"$` -M`R@+/`.``@"I$`8D8Q9\`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J +M`R@+/`.``@"I$`8D8QP<`$,0(9!$```D`@`@`(4@(0!$.",4X``1`$=X(P$J M$"L40``%`H@!@",`!LQ,___ M`>X0!@#J&`0`8E`E``HL`E&```$```'-`.M8!```,!(``"`0``0D``"%&"4` @@ -183,173 +183,173 @@ M`&`0````````````K!`K``!H$@``````````%$` M_N(``)@A`]`"`G -MO?_0K[``$`"`@"$D!`!`.@*"$00``+`$"( M(5:```&ND0``C[\`)(^T`""/LP`]`#"/H@`` -M`$`@(0P`!L^N8@`$%$#_\0!`B"$,`!FN`F`@(11`_^T`0(@A#``2D`)@("$4 -M0/_I`$"((0P`&=D"8"`A`$"0(1!`_^0D$0`"C[````!`("$,`!G1)`4'(`!` -MB"$D`@<@K@(;[`)`*"$"8"`A#``<@JYR```\`X`"K'-'J!``_]6N8@`()[W_ -M\*^P``"OOP`$#``4GP"`@"$"`"`A#``4K```*"$00``&)`,`%H^_``2/L``` -M`&`0(0/@``@GO0`0#``?*P(`("$`0!@A)@4;<`(`("$40/_U)`8``0P`-X4` -M`````$`8(20%``$40/_O`@`@(0P`%*P`````)`,`%A``_^H``A@*K*0`!`/@ -M``BLX```)[W_H*^S`$P`H)@A```H(:^Q`$2OOP!0K[(`2*^P`$`,`!2L`("( -M(11``!6OH@`PCB(7W!1``"T#H"`A#`!Z=0````"/I@`@CZ4`'#P$@`(DT,0` -M`!`7P@("$"$``I!##`!P="2$"(@"("`A#``)M@)`*"&OH@`P$$``"P.@("$2 -M8``"CZ(`,*YB``"/OP!0C[,`3(^R`$B/L0!$C[``0`/@``@GO0!@#`!Z=0`` -M``"/H@`@`B`@(210Q``,``RQ`@`H(3P$@`(DA`BD`@`H(0)`,"$40/_JKZ(` -M,`P`<'0`````)`(``:XB%]P"("`A#``'5R>E`#"/H@`P4$#_X*X@%^@0`/_> +M`$`@(0P`!L^N8@`$%$#_\0!`B"$,`!G!`F`@(11`_^T`0(@A#``2E`)@("$4 +M0/_I`$"((0P`&>P"8"`A`$"0(1!`_^0D$0`"C[````!`("$,`!GD)`4'(`!` +MB"$D`@<@K@(;\`)`*"$"8"`A#``E`#"/H@`P4$#_X*X@%^@0`/_> M`````">]_^"OL0`4K[``$*^_`!B,@Q?@)`(``0"@B"$`@(`A`Z`H(1!B``NO MH```$B``!JX`%^B/OP`8C[$`%(^P`!`#X``()[T`((^B```0`/_YKB(```P` -M!Y4`````CZ(``!1`__("`"`A#`!1E``````"`"`A#``4K"0%``$0`/_K```` -M`">]_^"OL@`(`*"0(0``*"&OLP`,K[$`!*^P``"OOP`0#``4K`"`@"$D$P`! +M!Y4`````CZ(``!1`__("`"`A#`!2K``````"`"`A#``4L"0%``$0`/_K```` +M`">]_^"OL@`(`*"0(0``*"&OLP`,K[$`!*^P``"OOP`0#``4L`"`@"$D$P`! M`$"((1!```L"`"`A$D```JX`%^BN40``C[\`$(^S``R/L@`(C[$`!(^P```# -MX``()[T`(*X`&QP,``A^KA,;)`P`"A@"`"`A#`!Q7``````D8P#(+&4`R(X$ -M&`@`11`A`$`P(20(```D"0#(#`!Q=`!@."$,`'%<`````"1C`,@L90#(C@08 -M0`!%$"$`0#`A)`@``"0)`,@,`'%T`&`X(8X"``0,`!T8C$0```(`("$,`"D\ +MX``()[T`(*X`&QP,``A^KA,;)`P`"A@"`"`A#`!ROP`````D8P#(+&4`R(X$ +M&`@`11`A`$`P(20(```D"0#(#`!RUP!@."$,`'*_`````"1C`,@L90#(C@08 +M0`!%$"$`0#`A)`@``"0)`,@,`'+7`&`X(8X"``0,`!TKC$0```(`("$,`"E6 M/`6```P`!_8"`"`AKA,7X!``_]$`````)[W_\*^R``BOL0`$K[```*^_``R, M@A?@)!(``0"@B"$`@(`A$%(`"@``*"$2(``"KA(7Z*X@``"/OP`,C[(`"(^Q -M``2/L````^``"">]`!`,`!2L`````#P%@``,`"EL`@`@(0P`<7N.!!@(#`!Q -M>XX$&$`,``LT`@`@(0P`$7<"`"`A#``(E0(`("$D!0`!#``*2`(`("$,``@' -M`@`@(8X"``0,`!T*C$0``*X`%^`0`/_>`````">]__"OL````*"`(:^Q``0` -MP"@A`("((0(`("&OOP`,K[(`"`P`!S8`P)`A#`!1E`(`("$"("`A)`4`"``` -M,"$,`!$9)`<``59```&N0```C[\`#(^R``B/L0`$C[````/@``@GO0`0)[W_ -M\*^Q``2OL````("((0"@@"&OOP`(#``4;20%``$"("`A$@``"SP%``0,`"D\ -M``````(@("$,`!1M```H(8^_``B/L0`$C[````/@``@GO0`0#``I;#P%``00 -M`/_V`B`@(2>]__`D`@`!K((]`!`,`!2P`````#P%@``,`"F&`@`@(0P``````">]__"OL````*"`(:^Q``0` +MP"@A`("((0(`("&OOP`,K[(`"`P`!S8`P)`A#`!2K`(`("$"("`A)`4`"``` +M,"$,`!$=)`<``59```&N0```C[\`#(^R``B/L0`$C[````/@``@GO0`0)[W_ +M\*^Q``2OL````("((0"@@"&OOP`(#``4<20%``$"("`A$@``"SP%``0,`"E6 +M``````(@("$,`!1Q```H(8^_``B/L0`$C[````/@``@GO0`0#``IACP%``00 +M`/_V`B`@(2>]__`D`@`!K((]_]"OM0`4`*"H(20%``&OOP`@K[<` -M'*^V`!BOM``0K[,`#`$`H"$`X)@AK[(`"*^Q``0`P)`A`("((:^P```,`!1M -M/!:``CP0@`(FI``0/!>``@``*"&N$C.`KM,SA`P`:S2N]#.(`J`@(0P`:S0D -M!0`!CB4``(X$,X`\`O_QC*-`$#1"__\`!"1``&(8)#P"``X`@B`D`&08):RC -M0!".)0``CL0SA#P"_X^,HT`0-$+__P`$)0``8A@D/`(`<`""("0`9!@EK*-` -M$(XE``".Y#.(/`+_?XRC0!`T0O__``0EP`!B&"0\`@"``((@)`!D&"6LHT`0 -M`B`@(0P`%&T``"@AC[\`((^W`!R/M@`8C[4`%(^T`!"/LP`,C[(`"(^Q``2/ -ML````^``"">]`#`GO?_PK[```"0&``0`@(`AK[\`!`P`-@X``"@A#`!1O28$ -M'8P00``'`@`@(0P`-;2,10`D#``UN`(`("$,`#7H`@`@(0P`<=`F!!K(C[\` -M!(^P```#X``()[T`$">]__```"@A)`8``Z^P``"OOP`$#``V#@"`@"$,`''" -M)@0:R`P`<+4`````#``U_0(`("$,`#6_`@`@(0P`<+H`````#``(VP(`("$D +M'*^V`!BOM``0K[,`#`$`H"$`X)@AK[(`"*^Q``0`P)`A`("((:^P```,`!1Q +M/!:``CP0@`(FI``0/!>``@``*"&N$CDHKM,Y+`P`;)>N]#DP`J`@(0P`;)]`#`GO?_PK[```"0&``0`@(`AK[\`!`P`-F$``"@A#`!2U28$ +M'9`00``'`@`@(0P`-@>,10`D#``V"P(`("$,`#8[`@`@(0P`]__```"@A)`8``Z^P``"OOP`$#``V80"`@"$,`',E +M)@0:R`P`]`!",I0`H)`/_\#"B``\D0@`G`$,X)`"C M&"0`9Q`A`$,0*Q1```<`8#`AO'$``"1C`!``QQ`A`$,0*Q!`__L`````D*(` -M`"0#`(`P0@#\4$,`!)2C`!0``"`A`^``"`"`$"&4@AQ>5&+__```("&4HP`2 -ME((<7%1B__@``"`AE((<6I2C`!`48O_S)`0``1``__(`````C((:_(Q#```# +M`"0#`(`P0@#\4$,`!)2C`!0``"`A`^``"`"`$"&4@AQB5&+__```("&4HP`2 +ME((<8%1B__@``"`AE((<7I2C`!`48O_S)`0``1``__(`````C((:_(Q#```# MX``(K(,:_(R"&ORLH@```^``"*R%&OPGO?_@)`(``:^P``"OOP`, +MK((`)%*@``&N!Q?`C@(`!`)`*"$,`!K:C$0``!(@``0"("@AC@(`!`P`&MJ, M1```H@`:^!``_XBN`!KT#``(TP(`("$`0(@AD@(:^"8E``0D0@`!HB(``"0" M``.B(@`!)`(`0!``_\2F(@`"D@,:^`)`*"$D8@`!H@(:^))"``&B0P``,$(` -M_J)"``&.`@`$#``:QXQ$```0`/]P)A8=C`P`"*X"`"`A$`#_F*X"&MR/OP`< +M_J)"``&.`@`$#``:VHQ$```0`/]P)A8=D`P`"*X"`"`A$`#_F*X"&MR/OP`< MC[8`&(^U`!2/M``0C[,`#(^R``B/L0`$C[````"`$"$#X``()[T`(">]__"O -ML0`$K[````#`B"$`H(`A)`4``:^_``ROL@`(#``4;0"`D"$"`"`A#``W=`(@ -M*"$"`#`A`@`H(0P`4=@F1!V,`D`@(0P`%&T``"@AC[\`#(^R``B/L0`$C[`` +ML0`$K[````#`B"$`H(`A)`4``:^_``ROL@`(#``4<0"`D"$"`"`A#``WQP(@ +M*"$"`#`A`@`H(0P`4O`F1!V0`D`@(0P`%'$``"@AC[\`#(^R``B/L0`$C[`` M``/@``@GO0`0)[W_\*^_``"0H@`!,$(``A!```8DI_^D#``(UP````"/OP`` -M`^``"">]`!"@H```H*```8R&&^RDH``"`.`H(0P`"8@DQO_\$`#_]H^_```G -MO?_0K[\`(*^W`!ROM@`8K[,`#*^Q``2OL```K[4`%*^T`!"OL@`(C((;[`"` -MF"$DA!V,)%``H`"P`!JN8!M44@```0```]`#!RT!@")`(``:YB';0D<``0#`!Z5P(`("$0 -M0``R`$"((0!`("$``"@A`@`P(0!`D"$,`'"J)C4`8`+V$"JN<1JX`B"@(:YP -M&KP00``5`J"((0+`@"&.9AOLKE0`)*Y5`"BN40`$`D`H(0)@("$,``F(),;_ -M_(YB&^PF$/__`B(H(0)"&"$"HB`A`H(0(21R`%PDE0!<)%0`7!8`_^XDL0!< +M`^``"">]`!"@H```H*```8R&&_"DH``"`.`H(0P`"8@DQO_\$`#_]H^_```G +MO?_0K[\`(*^W`!ROM@`8K[,`#*^Q``2OL```K[4`%*^T`!"OL@`(C((;\`"` +MF"$DA!V0)%``H`"P`!JN8!M44@```0```]`#!RT!@")`(``:YB';@D<``0#`![N@(`("$0 +M0``R`$"((0!`("$``"@A`@`P(0!`D"$,`'(-)C4`8`+V$"JN<1JX`B"@(:YP +M&KP00``5`J"((0+`@"&.9AOPKE0`)*Y5`"BN40`$`D`H(0)@("$,``F(),;_ +M_(YB&_`F$/__`B(H(0)"&"$"HB`A`H(0(21R`%PDE0!<)%0`7!8`_^XDL0!< M)I$`$!K```BN8!K\`L"`(0(@*"$"8"`A#``(UR80__\6`/_[)C$`1"9P&L@, -M`'&T`@`@(0P`<]__"OL````("`(:^_ -M``0,`''0)(0:F`P`<=`F!!J$)`(``:X"&K2/OP`$C[````/@``@GO0`0)[W_ +M`',7`@`@(0P`]__"OL````("`(:^_ +M``0,`',S)(0:F`P`] -M__"OL0`$`("((:X@&K0DA!J$K[\`"*^P```,`''"`*"`(0P`<<(F)!J8$@`` +M`!#D`D`@(28Q__\&(?_M)A`!'(^_``R/L@`(C[$`!(^P```#X``()[T`$">] +M__"OL0`$`("((:X@&K0DA!J$K[\`"*^P```,`',E`*"`(0P`LC@,`.*X@```"0A`JKA$`.*QQ```40/_N -MKB,`!"8$`"0,`'&'```H(0)@$"&/OP`0C[,`#(^R``B/L0`$C[````/@``@G -MO0`@$`#_]R03``(GO?_PK[$`!*^_``BOL```C)``!`P`<+4`H(@AC@0`-(R% +ML@`(K[```#P"@`*OOP`0K[$`!(Q%5TPD@P`T)((`+`"`@"&L@@`PK(,`.*R` +M`"RL@``T``"0(1B@`!0``)@A#`![NB0$``PF4@`!`$"((0!`("$``"@A$$`` +M%R0&``P,`'(-`````#P"@`*,0E=,C@,`.*X@```"0A`JKA$`.*QQ```40/_N +MKB,`!"8$`"0,`'+J```H(0)@$"&/OP`0C[,`#(^R``B/L0`$C[````/@``@G +MO0`@$`#_]R03``(GO?_PK[$`!*^_``BOL```C)``!`P`]`"`,``L3`D`@(1!`__<` M0"@A,$(`#R1"`"LD`__P`$,P)`"C&"0`9A`A`$,0*Q1```<`8"`AO'$``"1C M`!``AA`A`$,0*Q!`__L`````C*,`""0"`!`08@`*``````P`"H,"`"`ACZ(` M`"8Q``$"(A`J%$#_XX^_`!P0`/_=C[(`&`P`"O0"`"`A$`#_]X^B```GO?_P MK[(`"*^P``"OOP`,K[$`!(R1``0D`@`!``"`(0(@("&N(A?8#``*@R8R&JP" -M0"`A#`!QAP``*"$,``ZZ`B`@(2H#``440``.)A```5!@``TF,!J8#`!Q7``` -M```D8P!D+&0`9`!$$"$`0#`A`&`X(0P`<94"0"`A$`#_[P`````F,!J8#`!Q -MT`(`("$,`'&C)B07T`P`<8XF)!?(`@`@(:X@%]@,`''"`````(^_``R/L@`( +M0"`A#`!RZ@``*"$,``Z^`B`@(2H#``440``.)A```5!@``TF,!J8#`!ROP`` +M```D8P!D+&0`9`!$$"$`0#`A`&`X(0P`]_]"OL0`DK[\`+*^R`"BOL``@`*"((8R2``0` M`%`A``!P(1"@`'X``'@AC*T`#(RD`!`QH@`/``(8P`!B&",``QC``D,8(20" M__\0@@`8)'D8>``$$,``1!`A``(0P`!$$",``A"``D(0(8Q$``@D`P`!KZ,` M!!2```X`6!'``&DD`@`& MC<,`!%!B`&<``'@A)BG__(XL`!@!((`A)CC_H!$@`#\D!@`<`29`(24J_Z0E M"``$K4@`!(TK``"10P`.)`7P```+$"L``A$`,&,`[P!B&"6A0P`.CB(``)5# -M``HE9_^D)$+_Y#!"#_\`91@D`&(8):5#``J.0AOLE40`#@`+.`H`1A`C)$+_ +M``HE9_^D)$+_Y#!"#_\`91@D`&(8):5#``J.0AOPE40`#@`+.`H`1A`C)$+_ M_`&"&"L!@Q`+`(4@)#!"#_\`@B`EI40`#I5&``ZM)_^DC4(`/"0#_?\`#2E` M`$,0)#"E`@``#1E"/`3^_S2$__\`11`E,&,``0!$$"0``QX``$,0):U"`#RM M2``HCB,`$##&#_\D`O__)&0`!*U'`""M6``PK4\`4*U.`$P08@`C`89@(ZU$ M`#@!8$@A%6#_PP``,"$"`$@A$2``#`%`@"$E*O^DC4,`/(TK```\`G__-$+_ -M_P!B&"0!8$@AK4,`/*U9`%@58/_VK5``+`)`("$#("@A`P`P(0P`#TL``#@A +M_P!B&"0!8$@AK4,`/*U9`%@58/_VK5``+`)`("$#("@A`P`P(0P`#T\``#@A MCB(`%%!```.N``!4CB(`!*X"`%2/OP`LC[(`*(^Q`"2/L``@`^``"">]`#`D M`G__$`#_W:U"`#@``'@A$`#_F0``<"$,``JD`Z`P(:X@``0"0"`A#``*@P(@ -M*"$0`/_NC[\`+">]_]"OL0`4K[\`(*^S`!ROL@`8K[``$`"`B"$,`'#^C)(` -M!`!`("$,`'$!```H(0(@("$,``L3)E,:F`)@("$,`''"`$"`(0)`("$,`!1M +M*"$0`/_NC[\`+">]_]"OL0`4K[\`(*^S`!ROL@`8K[``$`"`B"$,`')AC)(` +M!`!`("$,`')D```H(0(@("$,``L3)E,:F`)@("$,`',E`$"`(0)`("$,`!1Q M)`4``8X#``@D`@`0`@`H(1!B`!X"("`ACD(7X`(`*"$40``6`D`@(0P`"H,` -M````)B0`)`P`<:H#H"@ACZ(`````@"$00``$`B`@(0P`"Q,``````$"`(58` -M_^N.`P`(#`!QT`)@("$"0"`A#``4;0``*"$0`/_;`B`@(0P`"YX"("`A$`#_ +M````)B0`)`P`]`"`,`'&T)@0:F#P%@``\!X`"/`B``CP+@`(D!``!)FID$"2E -M,.@"(#`A).<(Q"4(6!`E:V08#`!PRR0)#``,`'#DCF1D$!``_^<"0!`A)[W_ -M\*^P``"OOP`$C((;]`"`@"&,0@!$%$``!20$.@"/OP`$C[````/@``@GO0`0 -M)`(`!PP`>E>N`AL`)$("`"0#_@``0Q`DK@(=Q!``__2N`AL$)[W_X*^_`!RO -MM@`8K[4`%*^T`!"OL@`(K[$`!*^P``"OLP`,C((;[`"`B"$DD!AX)%4`7`"U -M`!H\`H`"4J```0```]`"`,`',7)@0:F#P%@``\!X`"/`B``CP+@`(D!``!)FISL"2E +M,.@"(#`A).<.5"4(9[`E:W.X#`!R+B0)#``,`')'CF1SL!``_^<"0!`A)[W_ +M\*^P``"OOP`$C((;^`"`@"&,0@!$%$``!20$.@"/OP`$C[````/@``@GO0`0 +M)`(`!PP`>[JN`AL`)$("`"0#_@``0Q`DK@(=R!``__2N`AL$)[W_X*^_`!RO +MM@`8K[4`%*^T`!"OL@`(K[$`!*^P``"OLP`,C((;\`"`B"$DD!AX)%4`7`"U +M`!H\`H`"4J```0```L)E(``0)"$"H40/_X`A6`(1``_]P`````$`#_WB03``(GO?_`K[``,*^_ -M`#BOL0`TC((;](S+```D#``!C$,`"`%L$`0`@(`A`&(8)!1@`"D`H$@A+*(` +M)C`:A`P`]__"OL@`( +MH``D$0``!J^@`"@5(``6`````(X"'<@D0AP`KZ(`*`(`("$,`$MR`Z`H(0!` +M&"&.`AOXC$(`:`!B$"M40``&KB,`)(^_`#B/L0`TC[``,`/@``@GO0!`#`!S +M%P(@("$0`/_YC[\`.%$L_^R.`AW()`+_]P%"$"00`/_IKZ(`!">]__"OL@`( MK[$`!*^P``"OOP`,`("`(0``D"$DD1G(C@,:<"0"``$"0A`$`&(8)`)`*"$4 M8``+`@`@(292``$N0@`&%$#_]B8Q`!R/OP`,C[(`"(^Q``2/L````^``"">] -M`!`,`$J'``````(`("$"0"@A#``-%@(@,"$0`/_P)E(``2>]__"OL@`(K[$` +M`!`,`$N1``````(`("$"0"@A#``-%@(@,"$0`/_P)E(``2>]__"OL@`(K[$` M!*^P``"OOP`,`("`(0``D"$DD1AXC@(:<"0#``$"0Q@$`$,0)%!```DF4@`! -MC@(;]`)`*"$"`"`AC$(`"`!#$"040``+)`8`!"92``$N0@`&%$#_\"8Q`#B/ -MOP`,C[(`"(^Q``2/L````^``"">]`!`,`$JV)E(``0(`("$,`!#@`B`H(1`` -M__(N0@`&)[W_\*^_``2OL```C*8`.`P`2[4`H(`AC@(`+(^_``2/L```K$`` +MC@(;^`)`*"$"`"`AC$(`"`!#$"040``+)`8`!"92``$N0@`&%$#_\"8Q`#B/ +MOP`,C[(`"(^Q``2/L````^``"">]`!`,`$O`)E(``0(`("$,`!#D`B`H(1`` +M__(N0@`&)[W_\*^_``2OL```C*8`.`P`3,(`H(`AC@(`+(^_``2/L```K$`` M0`/@``@GO0`0)[W_L*^U`#2OM``PK[,`+*^_`$"OMP`\K[8`.*^R`"BOL0`D -MK[``((RR`!0`H*@A`("8(1)``&XDE`2`CD(`/`1!``0``+`ACD(`(!!``.8` +MK[``((RR`!0`H*@A`("8(1)``&XDE`2`CD(`/`1!``0``+`ACD(`(!!``.H` M0)`ACD(`4%!```6.40`LC$(``%!```&N0`!0CE$`+(XB`$`40``')C<`0`)@ -M("$,`$VK`B`H(20#``T00P!9C[\`0`)@("$,`!"&`B`H(11``,\D`@`!CB,` -M0*Y@&QP08@`&CE``4%(```6.H@`(ZB`#"50P`(EF(<7E!B``.50P`&$`#_VB5"`!"68AQ<%&+_UR5"`!"50P`$ -MEF(<6E1B_],E0@`0CH(!+"1"``$0`/_TKH(!+`*@*"$,`!`!`B`P(5!`_X6. -ML@`4$`#_/8ZB`!P0`/^#KB``0(YB%]A00/^!C[\`0`P`<:,F9!JL$`#_?8^_ -M`$",@P`4$&``""0$``&,8@`\!$,`!0``("&,8@`@$$```@```````"`A`^`` -M"`"`$"$GO?_PK[$`!*^_``@`@(@AK[```(XB&\P00``4)(08>`P`#JX````` -M)B08L`P`#JX``H`K)B08Z`P`#JX``H`*)B09(`P`#JX``H`*4$```0``@"$" -M`!`AC[\`"(^Q``2/L````^``"">]`!`,``ZN`````!``__<``H`K)[W_\*^P -M``"OOP`$#`!PM0"`@"&.`AO,)@48>!!```L"`"`A#``-K0`````F!1BP#``- -MK0(`("$F!1CH#``-K0(`("$F!1D@`@`@(0P`#:T`````#`!PN@````"/OP`$ -MC[````/@``@GO0`0C*<`*```2"&0X@`!,$(`!!1``!",J``LD.(`%C!#``]4 -M8``-C*(`/)4"`$8``"`A``(1`J#B`!>1`@!',$(`#P`"$0``8A`EH.(`%@/@ -M``@`@!`AC*(`/``"%H(P0@`!5$``#Y#B``&5"0!&D.,`%C$B``\``A$`,&,` -M#P!B&"4`"1$"H.,`%J#B`!>,H@`\/`,$``!#$"6LH@`\D.(``3!"``000/_I -M`2`@(8T&`"!0P/_F`2`@(8S(`"PD!/_PC,<`*"4#``@P8@`/)$(`)P!D&"0` -M1"@D`&40(0!#$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[`````(S" -M`#P``A:",$(``51```Z0X@`!D.,`%C$B``\``A$`,&,`#P!B&"4`"1$"H.,` -M%J#B`!>,P@`\/`,$``!#$"6LP@`\D.(``3!"``140/_8C08`(!``_[T!("`A -M)[W_X*^S``P`P)@AK[4`%*^T`!"OL0`$K[```*^_`!BOL@`(`("@(0"@B"$, -M`'"U``"H(1)@`$("8(`AC@(`/``"%D(P0@`!%$``58X2`%`20`!4`H`@(8Y" -M`%000`!1`````!*@`$R.`@`LC$,``(Q"`""NHP``KJ(`((X&`"PF1`!<`@`H -M(:S``""LP```#`!1V`````".0@!X)$(``:Y"`'@2H``"`F"`(8ZP`"!6`/_C -MC@(`/!)@`"$`````EB,`-%!@`!&.(@`8CF0`*)""`!8P10`/4*``"Z8@`#0` -M`Q$"H((`%Y(B`#60@P`!,$(`#P`"$0``HA`E-&,`"*"#``&@@@`6CB(`&%1` -M`!VL4P`@)`(``:XB`"RN,P`4KC4`&`````^.(@`L5$``$(YF`"2.)0`D#`!* -MG`*`("$,`'"Z`````(^_`!B/M0`4C[0`$(^S``R/L@`(C[$`!(^P`````!`A -M`^``"">]`"".)0`D#`!*E0*`("$0`/_MKB``+(XC`!B.8@`DK&(``!``_^2N -M-0`8$`#_N(Q3`"`"@"`A#``-H0(`*"&.@ALX4$``&(XB`!Q2```6CB(`'(X" -M`#P``A9",$(``11```D"@"`ACB8`&(XG`#".*``D#`!*_@(`*"%40``*CB(` -M'`*`("$,`"EL/`6``(X"`#`"@"`A/`6```P`*3RN(@`PCB(`'"1"``$20``* -MKB(`'(XB`"2.1`!0``(0P`!2$"&40P`P)(0``:Y$`%`D8P`!I$,`,!``_Y>. -M%0`L)[W_\*^R``BOOP`,K[$`!*^P``",H@!4%$``!P"`D"$DL0!]`!",P@`LC,4` -M6`)`("&,4``@K$```*Q``"`,``]+```X(8XB`!P"`#`A)$+__Q1`__2N(@`< -M$`#_ZZX@`!@GO?_@K[0`$*^S``ROL0`$K[\`%*^R``BOL```C-``,(RB`"2, -MPP!`CA(`4``"$,``H(@A`D(H(20"``(`@*`A$&(`.22S`#".(P`4C&(`/`1" -M`"V,8@`@C@(`/#P#`@".!P`L`$,0):X"`#R.(@`] -M`""L8````&`H(:XB`!0"@"`A#``*8ZQ@`"`0`/_.C@(`/)2C`#".0@!4)`8` -M`:YF``0`0Q`AKD(`5*9C``*.`P`\/`6'_S2E__\``Q;",$(`#R1"``$P0@`/ -M``(6P`!E&"0`8A@EK@,`/(R"&V@``Q[",&,`#P!#$"M40``%CD(`5(R"&K14 -M0``1C((%@(Y"`%268P`")`7__R1"__^N0@!4CH(%A"1C__^F8P`")$(``0P` -M5NZN@@6$`H`@(0P`#]X"0"@A$`#_QB0"__\D0@`!K((%@(X"`#P``A;",$(` -M#Q!&``8`````C@,`*)!B``$T0@`($`#_DJ!B``$,``[T`@`H(1``__BF(@`T -M)[W_\*^Q``2OL```K[\`"`"@@"&.`P!`C*4`,"0"``$`@(@A$&(`3HRD`%". -M(AMH$$``1@``$"%0@`!%C[\`"(RB`"B00@`!,$(`!!!``"6.`P`@$&``/0`` -M$"&,<``LC@(`,(Q"`"B00@`6,$(`#Q!``#LF!``(,((`#R0#__`D0@`G`(,@ -M)`!#*"0`A1`A`$00*Q1```<`@!@AO)$``"2$`!``91`A`$00*Q!`__L````` -M`B`@(0(`*"$,`$Z')`8``1!``"$D`O__C@(`,(Q"`"B00@`!,$(`!!1`_]V. -M`P`@$&``&0``$"&,<``L)`3_\"8#``@P8@`/)$(`)P!D&"0`1"@D`&40(0!# -M$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[``````(@("$"`"@A#`!. -MAR0&``$D`___``(8"P!@$"&/OP`(C[$`!(^P```#X``()[T`$!``__H``!`A -M)[W_T*^Q`"0`H(@AK[(`**^P`""OOP`L#`!PM0"`D"&.,``4$@``&0````". -M0@2PCD,$M(X$`%0D8P`!+&4``0!%$"&N0@2PKD,$M!2``!]`!`0`/_JK@(`4`P`<9P` -M````)`,``11#__,D!``"$`#_W``````GO?_PK[````"`@"$DA``\K[\`#*^Q -M``2OL@`(#`!QC@"@B"$,`'"U`````(X%`$2,HP``$&``'(RB``2L8@`$C*(` -M!"8$`%2,L@`($B```ZQ#``",H@`,KB(``(X"`%`D`___K*```*RB``2.`@!0 -MK*,`"*X%`%"L10``#`!QHZR@``P,`'"Z``````)`$"&/OP`,C[(`"(^Q``2/ -ML````^``"">]`!`0`/_EK@(`2">]_^"OOP`4K[``$(R0``2OH```)@0`/`P` -M<:H#H"@ACZ(```(`("$40``()Z4`!(^B``!40/_X)@0`/(^_`!2/L``0`^`` -M"">]`"`,`!%+`````!``__>/H@``)[W_\"2E__^OL0`$K[\`#*^R``BOL``` -M+*(`&0"`B"$00``4C)(`!#P#@`(`!1"`)&,(X`!#$"&,0@```$``"`````", -MA```#``;"B0%`!$`0(`A)D8$@`!`("$D!0$X#``;/@````".)```#``:O0(` -M*"&/OP`,C[(`"(^Q``2/L````^``"">]`!```#`A`D`@(0P`+H$D!0`"CB0` -M``P`&PHD!0`2`$"`(29&!(@`0"`A$`#_ZB0%``B,A```#``;"B0%`!..)``` -M`$"`(20"`@`0`/_EK@(```P`$ZB,A``$$`#_Y(^_``P,`!/`C(0`!!``_^"/ -MOP`,)[W_T*^S`!ROOP`@K[(`&*^Q`!2OL``0C)(`!`"`F"$#H"@A`F`@(0P` -M$4LF41?L`B`@(0P`<<(`0(`A`D`@(0P`%&TD!0`!CZ8```(`*"$,`!&.`F`@ -M(0)`("$,`!1M```H(0P`<=`"("`A$`#_[0.@*"$GO?_@K[0`$*^S``ROOP`< -MK[8`&*^U`!2OL@`(K[$`!*^P``",D0`$``"@(0``F"&.(A?@5$``"HXB%]PF -M,!K(#`!QP@(`("$,`''0`@`@(8XB%^!00/_Z)C`:R(XB%]P00``X`````"8V -M&N`,`''"`L`@(8XC'*0D`@`#$&(`-0`````D!0`!`B`@(0P`%&TF,AK()C4: -MA`P`<]__"OOP``C*(`!`"@("$``#`A -MC$(7Q"0%`!@40``$```X(8^_```#X``()[T`$`P`$1D`````$`#_^X^_```G -MO?_P`*`@(0``,"$D!0`9K[\```P`$1D``#@AC[\```/@``@GO0`0)[W_\*^_ -M``BOL0`$K[```(R0``0,`'%9`("((0!`("$,`'%7)@4;7(X$&UP\!8``)@<8 -M""8(&!`"(#`A#`!Q822E20P,`'%<`````"1C`,@L90#(C@08"`!%$"$D"``` -M)`D`R`!`,"$,`'%T`&`X(8X$&UP\!8``)@<80"8(&$@"(#`A#`!Q822E24P, -M`'%<`````"1C`,B.!!A`+&4`R`!%$"$`0#`A)`@``"0)`,@,`'%T`&`X(8^_ -M``B/L0`$C[````/@``@GO0`0)[W_X"2"`$0D@P!,K[$`!`"`B"&OOP`8K[4` -M%*^S``ROL@`(K[0`$*^P```DA``\KB(`2*XC`%```"@AKB``1*X@`$PF,P!4 -M#`!QAXXT``0"8"`A#`!QAP``*"$``*@A``"0(0P`>EH).<)1"4(9+@E:VS``B`P(20)"``,`'#+ -M)`0``8X$;+@,`'#D/!"``CP%@``\!X`"/`B``CP+@`(F"GE@)*5'-"3G"50E -M"&U@)6MY:"0$``$"(#`A#`!PRR0)#``,`'#DC@1Y8`P`$ET"("`A`J`0(8^_ -M`!B/M0`4C[0`$(^S``R/L@`(C[$`!(^P```#X``()[T`(!``__4D%0`")[W_ -MT*^P`!``H(`AK[\`(*^S`!ROL@`8`("8(:^Q`!0,`'%"KZ``!`P`*.@"`"`A -M%$``$B02``$,`'%0`F`@(20"``$20@`)``````)`$"&/OP`@C[,`'(^R`!B/ -ML0`4C[``$`/@``@GO0`P#`!Q20)@("$0`/_V`D`0(0(`("$#H"@A#``H[2>F -M``0`0(@A,$(``11``%`"`"`A,B(`(%1``$:.`@2$,B((`!1``#X"`"`A,B(` -M0!1``#<"`"`A/`(`!`(B$"040``O`@`@(3(B`(`00``2`````(X"&\Q00``B -MC@48G(^B``0P0@`(5$``&HX%&42/H@`$,$(`!%1``!*.!1D,CZ(`!#!"``)4 -M0``*C@48U"0"_W\"(H@D$B#_Q:^@``".`AV$)!(``P!1$"40`/_`K@(=A`P` -M2IP"`"`A$`#_]20"_W\,`$J<`@`@(1``_^V/H@`$#`!*G`(`("$0`/_ECZ(` -M!(^B``0`LA@$`$,0)!!`_^D`````$`#_[@`````,`"EL/`4`!!``_]`R(@"` -M#``I;"0%`$`0`/_(/`(`!`P`2@HD!0`!)`+W_Q``_[\"(H@D`@`@(20%`"`D -M0@`!#``I;*X"!(00`/^V,B((``P`*6PD!0`!$`#_KS(B`"`GO?_@K[0`$*^R -M``BOL```K[\`%*^S``ROL0`$C,,] -M`"`,`#>``````%1```..!``$$`#_Z0)3D"4``#`A```X(0P`$1DD!0`#4$#_ -MY`)`*"$0`/_A`E.0)2>]__"OL```K[\`!(R"%^`00``/`("`(8R"%]P00``, -M)`(``HR#'*008@`))`(``1!B``B/OP`$#`!PM0`````,`##@`@`@(0P`<+H` -M````C[\`!(^P```#X``()[T`$">]_]"OL0`DK[\`+*^R`"BOL``@C((7X!!` -M`"8`@(@AC((7W!!``",D`@`"C(,)`(``1``_]RN(AL<)[W_X"0#``&OLP`,K[(`"*^Q``2O -ML```K[\`$`"@D"$`P)@A`("`(1"C`$8``(@A4*``,(R"'*0D`@`"$*(`$R0" -M``,0H@`,`````%(@``&N$ARD5F```:YQ``"/OP`0C[,`#(^R``B/L0`$C[`` -M``/@``@GO0`@#``4K"0%``(D$0`6$`#_\0`"B`H,`"EL/`6```(`("$,`!2L -M```H(201`!8"`"`A#``(E0`"B`HD!0`!#``*2`(`("&.`@`$#``="HQ$```, -M`%&4`@`@(0(`("&N`!?@#``I/#P%@``"`"`A#``4K"0%``$0`/_7`````!!# -M``D``````@`@(0``*"$,`!2L`````%1`_\\D$0`6$`#_S0````",@A?@4$#_ -M]P(`("&,@@`$#``=&(Q$```,`''0)@0:X!``__`"`"`AC((7X%1```2,@@`$ -M`@`@(1``_^LD!0`!#``="HQ$```,`''")@0:X!``__D"`"`A)[W_\*^P```P -ML`#_K[\`#*^R``BOL0`$``"0(0P`<+4`@(@A#`!Q-``````2```:CB(]`!`,`#3E)`8``8X#%]PD -M$@`6$&``!``"D`J.`A?@$%$`&3P%@``60/_O)`(``8X#'*A08@`/C@(%)`8``1!```0`0)`A)!(`%A9` -M_[X"0!`A`@`@(1``_]]__`D@@`4 -M)(,`'*^R``BOL```K[\`#*^Q``0`@(`AK((`&*R#`""L@``4K(``'```D"$, -M`'I7)`0`#`!`B"$2(``1)`(``@(@("$``"@A#`!PJB0&``R.`@`@)E(``2I# -M``*N$0`@KB```*XB``048/_PK%$``"8$``P,`'&'```H(0``$"&/OP`,C[(` -M"(^Q``2/L````^``"">]`!`GO?_PK[\``(R&`!R,R```$0``$0"`."&,P@`$ -MK0(`!(SB`!B,PP`$).0`#*S"``2,X@`8K&@``*S%``BLP```K.8`&`P`<:.L -M1@``C[\```/@``@GO0`0C,(`!!``__"L@@`@)[W_\*^Q``0`@(@A)(0`#*^_ -M``@,`'&.K[````P`<+4`````CB0`%(R%```0H``3C((`!*RB``2.(@`@C(,` -M!(R0``BL@@`$CB(`(*QE``"N)``@K(```*R```@,`'"ZK$0```(`$"&/OP`( -MC[$`!(^P```#X``()[T`$!``_^ZN(@`8,*8`#R>]_?`D`O_P),,`3Z^T`@`` -M8A@D`*"@(0"B*"0`HQ`AK[$!]*^_`@ROM@((K[4"!*^S`?ROL@'XK[`!\`!% -M$"L`@(@AC),`!(R6``"OH`"TKZ``H!1```<`H"`AO+$``"2E`!``@Q`A`$40 -M*Q!`__L`````CH,``"QB`$%40``1CH(`#`!F$"$D0@`/)`/_\`!#*"0"@Q@D -M`&40(0!#$"L40``'`&`@(;QQ```D8P`0`(40(0!#$"L00/_[`````(Z"``P4 -M0`.[CI``!```J"$F!?__+*(`0Q!``!L\`X`"``40@"1C"80`0Q`AC$(```!` -M``@`````)Z4`H">F`*0,`!MH`H`@(0*`("$GI0"@#``;:">F`*@"@"`A)Z4` -MH`P`&V@GI@"L`H`@(2>F`+`,`!MH)Z4`H`(@("$"8"@A#``'PR>F`+02H``' -M`L`@(8Z"``@"H"@AKJ(`"(^B`+0,`!J]KJ(`#(^_`@R/M@((C[4"!(^T`@"/ -MLP'\C[(!^(^Q`?2/L`'P`^``"">]`A`"@"`A)Z4`H`P`&V@GI@"XCZ8`N`(@ -M("$"8"@A#``&\">G`+00`/_D``````)@("$,`%>0)Z4`M!``_]\``````H`@ -M(2>E`*`,`!MH)Z8`O(^E`+P"8"`A)Z8`P```."$,`%!<)Z@`Q(^E`,`,`!LW -M`J`@(8^B`,`00``1CZ4`O`*@("$GI0#(#``;5R>F`,R/I0"\CZ<`R`)@("$G -MI@#0#`!07">H`,2/I0#0`J`@(0P`&V$`````$`#_OP`````"8"`A)Z8`P">G -M`-0,`%!<)Z@`Q(^E`-0"H"`A#``;-P`````0`/^T`````">E`*`GI@#8#``; -M:`*`("$"@"`A)Z4`H`P`&V@GI@#F`.B/ -MI0#8CZ<`Z`)@("$0`/_U```P(0*`("$GI0"@#``;:">F`.R/I0#L`F`@(2>F -M`/```#@A#`!8(2>H`/2/I0#P#``;-P*@("&/H@#P4$``#H^E`.P"H"`A)Z4` -M^`P`&UF`/`GIP$`#`!8(2>H`/2/I0$`$`#_N@*@("$"("`A)`4``0``,"$, -M`!$9```X(1``_VH``````F`@(0P`!O,GI0"T/`2``@P`<'0DA`ET$J#_:X^_ -M`@P,`"YR`F`@(0*@("$0`/^F`$`H(0)@("$,``E`+00`/].`````">E`*`GI@$$ -M#``;:`*`("$"@"`A)Z4`H`P`&V@GI@$(`H`@(2>E`*`,`!MH)Z8!#`*`("$G -MI0"@#``;F`1"/I0$$CZ8!"(^G`1`,`%#?`F`@(1``_S<`````)Z4`H">F -M`10,`!MH`H`@(0*`("$GI0"@#``;:">F`1@"@"`A)Z4`H`P`&V@GI@$E`*`,`!MH)Z8!/(^E -M`3P"8"`A#``4$">F`+00`/\#``````*`("$GI0"@#``;:">F`42/I0%$#``' -MW0)@("$0`/[Z`````">E`*`GI@%(#``;:`*`("$"@"`A)Z4`H`P`&V@GI@%, -MCZ4!2(^F`4P,``@6`F`@(1``_NP`````)Z4`H">F`5`,`!MH`H`@(0*`("$G -MI0"@#``;:">F`50"@"`A)Z4`H`P`&V@GI@%8`H`@(2>E`*`,`!MH)Z8!7(^E -M`5"/I@%4CZF`6`,`!MH`H`@ -M(0*`("$GI0"@#``;:">F`60GL``0`H`@(2>E`*`,`!MR)Z8!:`(`("$``"@A -M#`!PJB0&`!R/HP%DCZ(!:)>E`6("8"`A`@`P(:^B`!2OHP`D#`!/@*^C`!P0 -M`/ZX``````*`("$GI0"@#``;:">F`6R/I@%L`F`@(0P`3\@``"@A$`#^K@`` -M```,`!VR`F`@(1``_JH``````H`@(2>E`*`,`!MH)Z8!<(^E`7`,`"F>`F`@ -M(1``_J$`````)Z0`,```*"$,`'"J)`8`!@*`("$GI0"@#``;:">F`70"@"`A -M)Z4`H`P`&V@GI@%X`H`@(2>E`*`,`!MH)Z8!?`*`("$GI0"@#``;F`8"/ -MI@&`EZ4`-```@"&4QP`4E,0`!"3#``@XX@`'$*0`,P!B@`L`P(@ACZ,!="QB -M``040``8``,0P`!#$"$``A#``$,0(P`"$(`"8A`A)$/[F"0"``<0X@`B)`(` -M!*1B`18D`@`#$.(`&B0"`!`0X@`8)`(`$5#B`!>48@$6).+__BQ"``(40``" -M)`0`""0$``2D9`$8#``(E0)@("&.8AM4`F`@(0(@,"$D0@`!KF(;5(^E`72/ -MJ`%X#``IO`(`."$,``A^`F`@(1``_ED`````E&(!%B1"``00`/_HI&(!%J1@ -M`1@0`/_KI&`!%I>C`#*4P@`"%&+_S`#`B"&7HP`PE,(``!1B_\<``(@A$`#_ -MQX^C`70GI0"@)Z8!A`P`&V@"@"`A`H`@(2>E`*`,`!MH)Z8!B`*`("$GI0"@ -M#``;:">F`8R/IP&,CZ4!A(^F`8@,`"P_`F`@(8^C`80``A0```(D`RQB``04 -M0/XQ``,0P`!#$"$``A#``$,0(P`"$(`"8A`A$`#^*J1$_*P"@"`A)Z4`H`P` -M&V@GI@%`CZ4!0`P`5W\"8"`A$`#^(0`````GI0"@)Z8!D`P`&V@"@"`A`H`@ -M(2>E`*`,`!MH)Z8!E`*`("$GI0"@#``;:">F`9@"@"`A)Z4`H`P`&V@GI@&< -M)Z4`H">F`9P"@"`A#``;:(^P`9P"@"`A)Z4`H`P`&W(GI@&@CZ8!E(^G`9B/ -MJ`&@CZD!D`)@("$"`%`A#`!0$@``*"$0`/W^`````">E`*`GI@&D#``;:`*` -M("$"@"`A)Z4`H`P`&W(GI@&HCZ4!J`P`+2("8"`A$`#]\0`````GL``X`F`@ -M(0P`+>T"`"@A`J`@(0(`,"$D!0`(#``;/@`````0`/WF``````P`+@0"8"`A -M$`#]X@`````D`@`"KF(;L`P`+A("8"`A$`#]W``````GI0"@)Z8!K`P`&V@" -M@"`A`H`@(2>E`*`,`!MH)Z8!L">E`*`GI@&P`H`@(0P`&VB/L`&P`H`@(2>E -M`*`,`!MR)Z8!M(^C`:PD`O__$&(`)0`#$,``0Q`A``(0P`!#$"./I0&T``(0 -M@`)B$"$D1@`0`*88)3!C``,D1``($&``'R2G`"``X!@AB*(``)BB``.(IP`$ -MF*<`!XBH``B8J``+B*D`#)BI``^HP@``N,(``ZC'``2XQP`'J,@`"+C(``NH -MR0`,N,D`#R2E`!`4H__N),8`$("B``"@P@``#`!2Q0(`*"$6`/VACZ4!M`P` -M+BX"8"`A$`#]G0````",H@``C*,`!(RH``B,J0`,K,(``*S#``2LR``(K,D` -M#"2E`!`4I__V),8`$!``_^H``````H`@(2>E`*`,`!MH)Z8!N(Z"``P00``? -MCZ,!N"0"``408@`()`(`!!1B_80"8"`A```P(0P`+H$D!0`$$`#^(0*@("$" -M8"`A)Z8`0`P`+H$D!0`%CZ(`0">F`%@"H"`AKZ(`6(^B`$0D!0`4KZ(`7(^B -M`$BOH@!@CZ(`3*^B`&27H@!2IZ(`:)>B`%80`/^"IZ(`:H^E`;@"8"`A#``N -M@0``,"$0`/UE``````P`+PX"8"`A$`#^`P*@("$GI0"@)Z8!O`P`&V@"@"`A -M`H`@(2>E`*`,`!MH)Z8!P(^E`;R/I@'`#``RH0)@("$0`/U3``````P`,XT" -M8"`A$`#]3P`````"@"`A)Z4`H`P`&V@GI@'DCZ4!Y`P`,\$"8"`A$`#]1@`` -M```"@"`A)Z4`H`P`&V@GI@'HCF8<_(^E`>@,`#,5`F`@(1``_3RN8AS\)Z4` -MH">F`30,`!MH`H`@(0*`("$GI0"@#``;:">F`3B/I0$TCZ8!.`P`-@4"8"`A -M$`#]+@`````GI0"@)Z8!+`P`&V@"@"`A`H`@(2>E`*`,`!MH)Z8!,(^E`2R/ -MI@$P#``V#@)@("$0`/T@``````P`2'\"8"`AKF(%L"9E&W`,`#KG`F`@(1`` -M_1@`````)[`!Q`*`("$GI0"@#``;:`(`,"$"@"`A)Z4`H`(`,"$,`!MHE[(! -MQB>E`*`GI@'(`H`@(0P`&VB7L0'&`H`@(2>E`*`,`!MH)Z8!S`*`("$GI0"@ -M#``;:">F`=`"@"`A)Z4`H`P`&V@"`#`A`@`P(0*`("$GI0"@#``;:(^P`<2/ -MIP'(CZ@!S(^I`="/JP'$)Z(`M`)@("$"0"@A`B`P(0(`4"&OH@``#`!7EZ^@ -M``00`/SJ``````P`.F<"8"`A$`#\Y@`````"@"`A)Z4`H`P`&V@GI@'4CZ4! -MU`P`0=<"8"`A$`#\W0`````"@"`A)Z4`H`P`&V@GI@'8CZ(!V`*`("$GI0"@ -M``*`P`("@",,`!MH)Z8!W``0B("/H@'<`G&((28Q&E`*"N -M(@`$#``;:">F`=R/H@'<`H`@(2>E`*"OH@"`)Z8!W`P`&VBN(@`(CZ(!W`*` -M("$GI0"@KZ(`A">F`=P,`!MHKB(`#(^B`=P`$(#``H`@(:^B`)`GI0"@KB(` -M$">F`=P,`!MH`G"`(280&'B/H@'F`20"@"`A#``;:(^P`20" -M@"`A)Z4`H`P`&W(GI@$HCZ8!*``0$,``4!`CC,,````"$(``4Q`AK$,9R(S# -M``0D0AG()`<``:Q#``2,PP`(`@F`>"/HP'@`F`@(0`#$,``0Q`C``(0P`!3$"$, -M`$J'C$48G!``_&T``````H`@(2>E`*`,`!MH)Z8![)>B`>X0`/QFIF(;\`+` -M("$,`!L*`@`H(11`_$,`0*@A)`(``A``_&:OH@"T)[W_\*^Q``2OOP`(`("( -M(0P`]__"OL@`(K[$`!*^P``"OOP`,`("`(0P`%4,\ -M$H`#/`6``#P'@`(\"(`"/`N``P!`B"$F2HH()*5F;`(`,"$DYPJ0)0AZ""5K -MBA`D!``!$$``""0)$``"(!`AC[\`#(^R``B/L0`$C[````/@``@GO0`0#`!P -MRP`````,`'#DCD2*"!``__4"(!`A)`(``:R"`#`\`H`"K$5$1#P"@`*L140\ -M`^``"```$"$GO?_0K[0`(*^R`!BOL0`4K[``$*^_`"0\$(`"K[,`'(X%,N`\ -M!H``/`>```"`B"$DQFI0```@(23G:K@GJ@`!)Z@`!`P`66L#H$@A/`*``HQ4 -M1$`\`H`"C$9$.(X#,N"3H@``CZ4`!*QQ``"@8@`(K&4`!).B``&.!#+@``"0 -M(:""``F.`C+@K$8`$*Q4``P\$X`"CG`RX`P`>E<"@"`ACF,RX``2B(`",(`A -MK@(`%`(CB"&.)``4#``;'B92``$J0@`"5$#_\SP3@`*.9#+@#``:VB02``\\ -M$(`"C@(RX"92__\,`'I7C$0`#(X$,N`,`!KW`$`H(09#__@\$(`"C@(RX(^_ -M`"2/M``@C[,`'(^R`!B/L0`4C[``$`/@``@GO0`P)[W_T#"B``\D0@!-)`/_ -M\*^R`!@`H)`A`$,H)`)#&"0`91`A`$,0*Z^Q`!2OOP`@`("((:^S`!ROL``0 -M%$``!P!@("&\<0``)&,`$`"%$"$`0Q`K$$#_^P````"20@`!DD0``)(C`$`0 -M@P`2,%,``8XC`#B.(@`\K&```(XD`#0D0@`!$(``!:XB`#P,`!LIC)```!8` -M__T"`"`AKB``1*X@`#2B(`!`DD(``!1``$(`````DD(``%1```6.(@!$KC(` -M-*XR`#BN(`!$CB(`1)9#``*.)``X`$,0(:R2``"N(@!$%F``"ZXR`#B2(@!` -M)$(``:(B`$"/OP`@C[,`'(^R`!B/L0`4C[``$`/@``@GO0`PKD```(XC``". -M(@`THB``0"1D`"0D4@`$KB``-`.@*"&,<``$#`!QJJ^@``".0P`()`(`$!!B -M``J/H@``5$``"8XB``".`A?8)`,``5!#``6.(@``C@(:M!!#`` -M`D`H(0P`<=`"`"`A$`#_TH^_`"`,`!LI`D`@(1``_\Z/OP`@)[W_\*^_```0 -MX``-,*(`_Q!```8`P"@A#``:(@````"/OP```^``"">]`!",A```#``5:P#` -M*"$0`/_ZC[\``!!```4`P"`A#``;*0`````0`/_TC[\```P`&QX`P"`A$`#_ -M\(^_```GO?_P,*(`_Z^_```40``&`,`H(0P`&Q8`````C[\```/@``@GO0`0 -MC((```P`":*,1``$$`#_^H^_```GO?_PK[\``(RG``",A``$`*`P(0P`6@0` -M`"@AC[\```/@``@GO0`0)[W_\*^_```\`H`"C$(RY`"@,"$00``+D(4`,Y3" -M``(D1P`$#`!:!(R$``2/OP``)`0``3P#@`*L9#+D`^``"">]`!`0`/_W)`<' -M("2"`!PGO?_PK(``)```*"&OOP``#`!QAP!`("&/OP```^``"">]`!`GO?_P -MK[````"`@"$DA``]__"OOP`$K[````P`&N0`H(`AK%``!(^_``2/L``` -M)`,`(*Q#```#X``()[T`$">]__"LH``$K[\```P`&O<`````C[\```/@``@G -MO0`0)[W_\*^_```\`H`"C$(RX`"`,"$``"@A#`!9[HQ$``2/OP```^``"">] -M`!`GO?_PK[\``#P"@`*,0S+@`(`P(3P"B(B090`SC&0`!#1"B(@,`%GNK,(` -M`(^_```#X``()[T`$(R"````@A`AK$4``(R"```D0@`$`^``"*R"```GO?_P -MK[\`"*^Q``2OL````("((8R$````H(`A)`+__`(D("$`P"@AK)````(`,"$D -MA``$)A```PP`<)T"`H`DCB(``(^_``@`4!`A)$(`!*XB``"/L```C[$`!`/@ -M``@GO0`0C(,``"0"`@``0Q`C$*```@"#("&LI```5,```:S"```#X``(```` -M`(R#```DI0`#)`+__`"B*"0`91@A`^``"*R#```0H``"```8(8RC````@Q`A -MC$(`(!"@``(D8P`$K*,```/@``BLP@``C*(```""("$0P``")(0`(*S$```# -MX``(`````">]__"OOP`$K[````P`:_(`@(`A)`,``:X#``RN`@``K@``"*X` -M``2/OP`$C[````/@``@GO0`0)[W_\*^P``"OOP`$C((`.`"`@"$40``F)`0` -M`0P`:LDD!``!#`!K\@````"N`@`L#`!K]20$``*.`@`````H(0P`%-^,1``$ -M%$``$P````".`@`P%$``#```("&.`@`X%$``!0``("&/OP`$C[````/@``@G -MO0`0#`!K#P`````0`/_ZC[\`!`P`:P$`````$`#_\XX"`#@,`&OUC@0`+`P` -M:LD``"`A$`#_[8X"`#@,`&L/`````!``_]@`````)[W_\*^P``"OOP`$C((` -M.`"`@"$40``=)`0``8X"```D!0`!#``4WXQ$``000``%`````(^_``2/L``` -M`^``"">]`!`,`&OUC@0`+`P`:LD``"`AC@(`,!1```@D!``!C@(`.!!`__,` -M`"`A#`!K#P`````0`/_PC[\`!`P`:P$`````$`#_]XX"`#@,`&L/`````!`` -M_^*.`@``)[W_\*^P``"OOP`(K[$`!(S#`"@D`@`!$&(`!@#`@"&/OP`(C[$` -M!(^P```#X``()[T`$*S``#P,`'$T``````P`&[<"`"`AC@(`*!1``"```"`A -M$(``$`````".`@`\/`,``C1C2?`D0@`!K@(`/(X"`#P`8A@K$&``!P````". -M`@``C$(`!(Q1%^@D`@`!$B(`"@`````,`!S\C@0`!"0$``4,`'%)``````P` -M<3L`````$`#_VX^_``@,`!N'`@`@(20$``L0`/_VKA$`*`P`'0..!``$#``= -M(XX$``0\`P`"`$`@(1!```XT8TGPC@(`/"1"``&N`@`\C@(`/`!B$"M00``( -MC@(`*(X"``",0@`$C$,7Z"0"``$08O_-`````(X"`"@40/_I`````!``_\@` -M````)[W_\*^Q``2OL````*"((:^_``@,`'%"`("`(0(`("$"(#`A#``;W@`` -M*"&/OP`(C[$`!(^P```D`@`!`^``"">]`!`GO?_PK[```#P'@```@(`A/`B` -M`"2)`"0DB@`().=PL"0$``LE"&]X```H(:^_``0,`'$(`@`P(8X"`"040``% -M`$`@(8^_``2/L````^``"">]`!`,`'$F`````!``__J/OP`$)[W_\"0#``&O -ML```K[\`"*^Q``00HP`1`("`(5"@`!*,@@`H)`(``A"B``PD`@`#4*(`!HR" -M`"B/OP`(C[$`!(^P```#X``()[T`$%1`__JL@``H$`#_^8^_``BN```\$`#_ -M]H^_``@40/_TC[\`"(R"``",0@`$C%$7Z%8C__"/L0`$#``<]8R$``0,`'%" -M)`0`!0P`&X<"`"`AKA$`*`P`<4DD!``+$`#_Y(^_``@GO?_PK[(`"`"`D"$D -M!`!`K[$`!*^P``"OOP`,#`!Z5P"@B"$`0(`A$@``%```$"$``"@A)`8`0`P` -M<*H"`"`A)@0`+*X2``"N$0`$#``;>:X``"@,`'%))`0`!`P`'#T"`"`AC@0` -M!#P%@``DI7%8#``]`!``0/@)C(0`+!``__N/ -MOP``)[W_\*^_``",@@`H%$``!"0%``&/OP```^``"">]`!``0/@)C(0`+!`` -M__N/OP``)[W_\*^_``",@@`H%$``!"0%``*/OP```^``"">]`!``0/@)C(0` -M+!``__N/OP``)[W_\*^_``",@@`H%$``!"0%``./OP```^``"">]`!``0/@) -MC(0`+!``__N/OP``)[W_\*^_``2OL````("`(8R$``2N!@`L/`:``*X%`"@D -MQG*<#`!9U```*"&.!``$/`:``"3&]__"OOP``#`!:SXR$``2/OP`` -M`^``"">]`!`GO?_PK[\```P`6N",A``$C[\```/@``@GO0`0)[W_\*^_``2O -ML````("`(0P`6M>,A``$#``<_`(`("$,`!T#`@`@(8^_``2/L````^``"">] -M`!`GO?_PK[```*^_``0,`!SU`("`(0P`6MN.!``$C[\`!(^P```#X``()[T` -M$">]__"OOP``#`!:](R$``2/OP```^``"">]`!",@@`````H(8Q"0"`P1@#_ -M/`.``@`%$(`D8S,P`$,@(92"```DI0`!$,(`!2RC``A48/_X/`.``@/@``@` -M`!`A`^``")2"``(D`A0`I((`"B0""9ZD@@`()`(`!:2"`!0D`@`$K((`8"0" -M`!ZD@@`<)`()*J2"`'0D`@`'K((`>"0"``\D`P`")`4``20&``,D!P`\H((` -M4R0"$`"LA0!(H(8`?*"#`'VL@@!4I(<`6JR```2@@P`6H(``%ZR%`'"LA@`` -MK(``:*R``&RL@`!,K(``9*R``#2D@`!]_^"O -ML````("`(20$'`!`&"$``(`A/`*``B12,N@`$!#``%(0(91"```00P`& -M)`(`"280``$J`@`)%$#_]SP"@`(D`@`)$@(`%20#``$,`'I7)`0`O*XB&_00 -M0``0)`/__P``*"$D!@"\#`!PJ@!`("$,`!T\)B0;:``0$,``4A`AC$(`!`!` -M^`D"("`A%$``"P!`@"&N<0```@`8(8^_`!"/LP`,C[(`"(^Q``2/L````&`0 -M(0/@``@GO0`@#`!Z:HXD&_00`/_SKB`;]!``__(D$``")[W_\"0%``X``#`A -MK[(`"*^Q``2OL```K[\`#`P`'B``(40`!K)!0$```4 -M$$`D4?Z`#`!Z5P(@("$`0)@A$$#_YB0$``("(#`A`$`@(0P`<*H``"@AC@(; -M]"01`,`"-!@KK%,`M!!@``P"8)`A`B`H(0(`("$"H#`A#``LKR8Q``$40``* -M`C08*Y>B``*F0@``%&#_]B92``("@"@A#``@YP)@("$00``*`````!)@``8D -M!0`6#`!Z:@)@("&.`AOTK$``M"0%`!80`/_#`*`@(0P`>EB``(0`/^,`H*@)2Q"``440/]U)`0`%A``_VX"`"`A+((``A1`_W`D -M!``6$`#_#S0"@``GO?_PK[$`!*^P``"OOP`,K[(`"(R"&_0`@(@A)`0`(`P` -M>E>,4@"T$$``%P!`@"$`0"`A```H(0P`<*HD!@`@CB(;]`(`*"$"("`A#`!( -M#JQ0``0``(`A`@`H(0(@("$,`"F>)A```2H"`(`40/_[`@`H(8XE&_0,`#\Y -M`B`@(11```\`````$D```P`````,`'IJ`D`@(0P`'WP"("`A)`0`%H^_``R/ -ML@`(C[$`!(^P````@!`A`^``"">]`!`,`#3``B`@(0P`+V0"("`ACB0;]#P# -M@`(D8RRT/!"``CP'@``\"(``/`J``ZR#`!BN(A?$)@E'L"3G2\`E"$VH)4JA -M8```*"$"(#`A#`!Q"```("$,`'$FC@1'L`P`<4D``"`A#`!Z:@)`("&.(QOT -M)`(`"@``("&L8@!H$`#_V:Q@`+0GO?_@K[0`$*^_`!2OLP`,K[(`"*^Q``2O -ML```C)(;](Y0```2```=`("@(8X$``04@`!!`````(X$``@4@``Z`````(X$ -M``P4@``S`````(X$`!`4@``L````````F"$"`(@ACB(`%"9S``$40``B`$`@ -M(8XB`!PF,0`,%$``&@!`("$N8@`#5$#_]XXB`!0,`'IJ`@`@(:Y```".1``$ -M%(``#0`````"@"`A#``_1@)`*"&/OP`4C[0`$(^S``R/L@`(C[$`!(^P```` -M`!`A`^``"">]`"`,`'IJ`````!``__&N0``$#`!Z:@`````0`/_E+F(``PP` -M>FH`````$`#_W8XB`!P,`'IJ``"8(1``_]0"`(@A#`!Z:@`````0`/_,C@0` -M$`P`>FH`````$`#_Q8X$``P,`'IJ`````!``_[Z.!``(C(,;]"0"``XD8P`T -M`^``"``#$`LGO?_0K[0`(*^R`!BOL``0K[\`)*^S`!ROL0`4C)$;]"0%`+\# -MH#`ACB(```"`D"&GH``$#``LKXQ3``0F,``T%$``I@!`H"&.0AOTEZ,``(Q" -M``"N(P`TE$(``"Q"4`,40`"_)Z8`!`)`("$,`"RO)`4`RA1``)D`0*`AEZ(` -M!#!"#\```A%"-$(``:X"`#R.0AOTC$(``)1"```L0E`!$$``IR>F``*GH``" -MEF(`$I9D`!"68P`4``(0@`""("4``QC`EF4```"#("4T@@`"`$4@"I9C``(` -M@"@A-*(`$)>D````0R@*,*(``11```.N!```)`+__0"B*"0PH@`(%$``!"0" -M"0@D`O_O`*(H)"0""0BF`@!$ED(<]C!"`/`L0@`P$$``A*X%``260QSP)`(` -M!Q!B``4D`@G$)`(`"A!B``(D`@G$)`(*K*8"`$:7J``")`(3.*8"`$`D`A?4 -MI@(`0C$#``(D`@`!K@(`8*X``%P48``(```P(99#'/`L8@`&4$``!"0&``$D -M`@`%4&(`8I9#'/*61!SP)`(``:X&`%@L@P`&K@(`4*X``$P08`!8```P(20" -M``50@@!2ED(<\C$$__\`!!!".$(``20'``$P0@`!,0,``:X&`%2N`@!(K@<` -M"*X'``P48``#```P(3"B``D``C`K``00PCA"``$P0@`!,0,`!*X&`!"N`@`4 -M%&```P``,"$PH@`)``(P*Y9B``:.9``8``49`C!C``&N!@`8K@,`(*X'`"2N -M`@`HK@<`'!"```0``"@ACF(`'%1```,D`@`!)`4``20"``$Q`P'PK@(`,*X% -M`"P48``"``,1`B0"``HQ`_``$&``'ZX"`#0``QL")`(``0!B$`2N`@`XCD(; -M](Q#``"7H@`$,$(/P``"(4*48@``+$)0`Q1```.N!``\-((``:X"`#R"8@`@ -M`D`@(:X"`&2"8@`A#``?SJX"`&@"@!`AC[\`)(^T`""/LP`]`#`0`/_D)`(`@"Q"``@40/^N,03__Q``_ZLD!@`!)`(``A!B -M``,L8@`$5$#_G)9$'/`0`/^9)`8``1``_X0D`@G$`D`@(0P`+*\D!0#)%$#_ -MXP!`H"&7H@`"$`#_5*9B`#@"0"`A#``LKR0%`,H40/_;`$"@(9>B``0P0@P` -M``(90JX#`#P0`/]"IZ(`!">]_]"OLP`B -M``"3HP`!``(2`J(#``"B`@`!%(#_\B80``*20P`+)`(`_Q!B``H``(@AHD`` -M#(^_`""/LP`] -M__"OL````("`(:^_``0,`'I7)`0!6*X"``000`!")`,``@!`("$``"@A#`!P -MJB0&`5@,`'I7)`0#9*X"``@00``Y)`,``@!`("$``"@A#`!PJB0&`V2."0`( -M)`(`"B0(``FE(@`4)`(``Z4B`AXE(P`<)`(`"R4(__^D8@``!0'__21C`#0` -M`$`A`2`X(3P#@`(\`H`"``@@0"1C%X0D0A=\`((0(0"#&"&41@``E&,``"4( -M``$`B2`A)`(`"RD%``.D@P(@I(8")J3B`C*DX@+.%*#_[B3G`#0,`'I7)`0` -MB*X"``P00``/)`,``@!`("$``"@A#`!PJB0&`(@,`'I7)`0(`*X"`!`00``& -M)`,``@!`("$``"@A#`!PJB0&"````!@AC[\`!(^P````8!`A`^``"">]`!`G -MO?_@K[\`$*^S``ROL@`(K[$`!*^P``",@AOT`*!((3##__^,4P``EF(``"Q" -M,`,40``ICG``")8&`!0``)`A`D80*U!``!"6`@`4`@`X(0`#$$``21`AE$@` -M`"92``(D8P`!,00`_P`($@("1B@KI.(``*3D``(P8___%*#_]"3G``26`@`4 -M$$``#```D"$"`(@AEB4``)9D`````#`A#``HGB92``&6`P`4IB(```)#&"L4 -M8/_W)C$``H^_`!"/LP`,C[(`"(^Q``2/L````^``"">]`"```Q!``$40(91( -M```D8P`!,&/__P!@*"$`"#%```@8@@`($D(PQ@!_,&,`?P`%($"F!@`$I@(` -M`*8#``(`B2`AE(@``"2E``$PH___`&`@(0`($L(`""C```@9`@#","4PI0!_ -M,&,`?P`$$$"F!0`(I@8`!*8#``8`21`AE$@``"2$``$P@___`&`@(0`($T(` -M"#A```@9@@"B*"4PYP!_,&,`?P`$$$"F!P`,I@4`"*8#``H`21`AE$@``"2$ -M``$PA/__``@I@``(,\(`"!("``@80C"E`'\P0@!_`.8X)3!C`'\`!"!`I@4` -M$J8"``ZF!P`,I@,`$`")("&4B`````@2@@"B*"40`/^HI@4`$B>]_\"OMP`L -MK[4`)*^Q`!2OOP`TK[X`,*^V`"BOM``@K[,`'*^R`!BOL``0C((;]##&__^O -MI0``C%0``*^F``0``+@ACH(`!(Z2``@``(@AE%X`$@``J"$D`@`!```@(1*B -M`'>/HP`$4J``<997`!0D`@`"$J(`9P`````2X`!5``"P(0`#$$"/HP```("8 -M(0!#@"&68@``)B<`"*8B``"6"@``)A```@`*((``"BD"``HR@C"E`#\PA``_ -MIB0`'J8F``2F)0`"E@H``"80``(`"DN"``I!```*$@(`"AB"`(D@)3$(`#\P -M0@`_,&,`/Z8H`"2F)``>IB(`(*8C`"*6"@``)A```@`*&P(`"A&"`0-`)3!" -M`#\Q0P`_IB@`)*8B`":F(P`HE@H``"80``(`"D"```H9`@`*$H(Q"``_,&,` -M/Z8H`"ZF(@`JIB,`+)8*```F$``"``HC@@`*&((`"A("`01`)3!"`#\P8P`_ -MIB@`+J8B`#"F(P`R#``H>I:$``"6)P`&$.``#0``,"$"("@AA*(`'B3&``$` -MQR`K``(80`!B&"$``QC``&(8(0`#&$"DHP`>%(#_]B2E``(FU@`!`M<0*R8Q -M`#040/^Q)G,``B:U``$NH@`#5$#_GR0"``&/OP`TC[X`,(^W`"R/M@`HC[4` -M)(^T`""/LP`]`$!3P/_P)K4``997`AXD8P!& -M)E$"+!``_Y0F1`(@)&,`!291`!80`/^0`D`@(5/`_^4FM0`!EE<"'B1C`#`````":#``$P=/__EB,````4*$``O8@A``,:`H^D`!@``#`AIF(``!!@ -M``H`8"@A#``HG@`````F`P`!,'#__R:#``$P=/__`I(8*Q1@_^*F(@```!(0 -M0@+"$"$P4/__IO0`%!*``&$``$`A``@@0`"($"$`G1@A``(0@)1C````2!`A -M``(00`!7,"$`$"A``)<@(:2#````M2@AI,,`&)2C```F`@`!,%#__P`#$$`P -M0@$`,&,`_P!B&".DPP`$$"/OP!$`$,0(91"`'Z/O@!`C[8`.*;B`!:/M0`TC[<`/(^T`#"/ -MLP`LC[(`*(^Q`"2/L``@`^``"">]`%"4X@``)`,``:3#`!H``AO"``,:```" -M$@(`0Q`C$`#_X:3"`"H`"!!``$D0(91%```E`P`!,&C__R0"`/\`%!A`+08` -M`R:$``$010`#`'T8(3"4__^D90``%,#_\P`($$`0`/]TIO0`%">]__"OL``` -M,+#__P`0$$"OL0`$`("((0!`("&OL@`(K[\`#`P`>E<`P)`AKB(``!!``#,D -M`P`"`!`@@`"0("$`!""``)`@(0P`>E<`!""`$$``,JXB``BF,``$$@``)P`` -M,"$`!D"```880`$&$"$`K0"`8"&GH@`"I*,` -M!J>B````8#@A```P(0``("$`AQ`',$(``1A```@LPP`"$&``@```$"$`!AA` -M),(``0!]&"$P1O__I&0``"2"``$P1/__+((`!!1`__(`AQ`'E8(`%```2"$0 -M0`!QI*(`!``)&$``:1@A``,8@`!I&"$`"4"```,80`$)$"$!@Q@A``(0@(RJ -M``B49``8`$D0(0`"$(``2A`AI$0``"1F`!B4PP`2I$,``I>C``(T`MZM$&(` -M7@``("$!"1@A``,8@`!I&"$`!!"``$00(0`#6(`D@P`!``(0@#!D__\!:C@A -M`$<0(2R#``048/_SI$``!I>C``"4Q``"``,0@`!#$"$``A"``$<0(:1$``B7 -MHP`"``,0@`!#$"$``A"``$<0(20#`!2D0P`(EZ,``@`#$(``0Q`A``(0@`!' -M$"$D`P`CI$,`"I>C``(``Q"``$,0(0`"$(``1Q`A)`,`/Z1#``R7I`````00 -M@`!$$"$``A"``6(0(0!*$"$D1``$)`(`!*2"``*4PP`&E((`!`!#$"&D@@`& -ME,,`"@!#$"&D@@`(E,,`#@!#$"&D@@`*E,(`!*2"``R4P@`(I((`#I3"``RD -M@@`0E,(`$*2"`!*7I``"``00@`!$$"$``A"``6(0(0!*$"$D1``$)`(``Z2" -M``*4P@`4I((`#)3"`!:D@@`.E,(`&*2"`!"4H@`$)2,``3!I__\!(A`K%$#_ -MD@`)&$`D`@`!`^``"">]`!`!"1@A``,8@`!I&"$`!!"``$00(0`#.(`D@P`! -M,&3__P`"$(``ZA@A`$,0(2R#``048/_SI$``!I>D````!!"``$00(0`"$(`` -MXA`A`$H0(21$``0D`@`$I((``I3"``*D@@`$E,,`!@!#$"&D@@`&E,,`"@!# -M$"&D@@`(E,,`#@!#$"&D@@`*E,(`!*2"``R4P@`(I((`#I3"``RD@@`0E,(` -M$!``_\VD@@`2)[W^L*^W`3ROM@$XK[4!-*^S`2ROL@$HK[$!)*^P`2"OOP%` -MK[0!,(R"&_0`@+`A`*"X(8Q"```PT?__`."0(8Q4``0``)@A``"H(0``@"$D -M`@`!4@(`-I:"`!)2```XEH(`$"0"``)2`@`QEH(`%`.@("$``"@A#`!PJB0& -M`1P"P"`A`Z`H(0(@,"$"H#@A`N!`(0P`(E4"`$@AEZ4`%`)`("$,`",F`Z`P -M(0!`F"$40``3`$`8(0.@("$,`"-Q`D`H(1!```XD`___EZ,`%``#$(``0Q`A -M`B(0(18```,P4?__)B(`!3!1__\F$``!+@(``Q1`_]8F4@`,`F`8(8^_`4"/ -MMP$\C[8!.(^U`32/M`$PC[,!+(^R`2B/L0$DC[`!(`!@$"$#X``()[T!4%!` -M_^\F$``!$`#_S205``-00/_K)A```1``_\DD%0`*)[W_P*^W`"ROM``@K[\` -M-*^^`#"OM@`HK[4`)*^S`!ROL@`8K[$`%*^P`!",@AOT,,;__Z^E``",4P`` -MKZ<`"*^F``2.8@`$``"X(0``H"&47@`2)`(``0``D"$``*@A$H(`]`$"60P`$`!`@0@`0*T(`$!'"`&48)3!"`#\0`/_=,(0`/Q``_\@` -M$!#"$`#_O20&``$0`/_=,%'__Q``_[(`$!)"%\``!#!1__\F(@`&$`#_VC!1 -M__^.8@`,)!<``R15`%(0`/^;)%(`5"8B`%4P4?__`&"H(207``@0`/^5)'(` -M`B8B`&4P4?__$\#_\"8B``2.8@`,)!<``B15`'(0`/^,)%(`=">]_]"OM@`8 -MK[0`$*^Q``2OOP`@K[<`'*^U`!2OLP`,K[(`"*^P``",@AOT`*"@(3#1__^, -M50````"P(8ZC``248@$6$$``$8ZR`!``%KA``N,0(91"`1@40``7EJ(``"8C -M``@F)``'+$(P`P!@B"$`@H@+CJ,`!";6``&48@$6`L(0*Q1`__$F4@!`C[\` -M((^W`!R/M@`8C[4`%(^T`!"/LP`,C[(`"(^Q``2/L````^``"">]`#`L0C`# -M%$``0``1$$``5#`A``"8(0)`*"&4R```)G,``BYD``@Q`P#_``@2`J2B``"D -MHP`(),8``B8Q``$4@/_V)*4`$``1$$``5$@A``"8(0)`."&5*```)G,``BYF -M``@`""&"``@2`@`(&X(P0@`_,&,``3"$``$Q!0`_I.(``JSC``2DY0`*K.0` -M#"4I``(F,0`!%,#_[R3G`!```)@A`D"`(8X"``!00``/)G,``8ZB``0"XA`A -ME$(!&#!#``<08``.```P(20"``,08@`,EJ0``)8%```D!@`!#``HGB9S``&F -M`@``+F(`"!1`_^TF$``($`#_LHZC``26I```$`#_]I8%````5!`AE$@``"8Q -M``$`$2!```@I0``(&((`"!)",*4`?S!C`'^F10`0ID(``*9#``@`E"`AE(@` -M`"8Q``$`$3!```@:P@`((,``"!$"`*,H)3"$`'\P0@!_ID0`(*9%`!"F0@`8 -M`-0P(93(```F,0`!`!$H0``(&T(`"#!```@1@@"#("4PQ@!_,$(`?Z9&`#"F -M1``@ID(`*`"T*"&4J```)C$``0`1.$``""/"``@I```($@(`"!B"`,0P)3"E -M`#\P0@!_,&,`/Z9%``JF0@`XID,``J9&`#``]#@AE.@``"8Q``$`$2!```@; -M`@`($8(`HR@E,$(`/S$#`#^F10`*ID(`$J9#`!H`E"`AE(@``"8Q``$`$2A` -M``@@@``(&0(`"!*",(0`/S!C`#^F1``RID(`(J9#`"H`M"@AE*@``"8Q``$` -M"!H"``@3@@""("4P8P`_ID0`,A``_XZF0P`Z)[W_T*^U`"2OM``@K[,`'*^_ -M`"BOL@`8K[$`%*^P`!",@AOT`*`P(0"@H"&,4@```("8(0``J"$,`"8TCD4` -M!)9B'/8P0@#P+$(`,%1```:60@``CD(`!)1"`"@00``I)`,`%I9"```D$`"0 -M)!$`0"Q",`,"`#`A`B(P"P)@("$,`"%$`H`H(99"```"`#`A+$-``"Q",`,4 -M8``&`B(P"XY"``240P`H)`(``1!B`",F1P`4`F`@(0P`(;X"@"@AED,``"QB -M0``40``8+&,P`XY"``240@`L)$+^ZS!&__\"8"`A`H`H(0P`)($#H#@AEZ8` -M``)@("$,`"45`H`H(0*@&"&/OP`HC[4`)(^T`""/LP`F1@#JID(`[*9#`.:F1`#HID4`XJ9'`.0`$1!``%,0 -M(910```F,0`!`9)0(3($`/\`$!H"`!$00*5#`%"E1`!6`%,0(910```F,0`! -M`!$80#($`/\`$!("I4(`7*5$`&(`DH@`"`!$00`!3$"&44```+H5``"8Q -M``$`$!E"`!`@0C!C`/\PA``/,@(``:5"`(2E0P!X%*``!J5$`'X2H`$T`!`3 -M0B0"``(2H@$N`!`30A;``!$N@C`$`!$00`!3$"&44````9(8(0`0$8(P0@!_ -MI&(`S"0"``$2H@$<)C$``2JB``(40`$4)`(``A*B`0T`$!#"+H(P!!1``00` -M%1!``!480`!R&"$`$"-")&,`T``1$$"D9``"`%,0(910```F,0`!`!`0P#!" -M`#@`@B`E)`(``A*B`.VD9``"%J``"2Z"0``4H``'`!`8P@`0$@(P0@`_,&,` -M'Z9"`0*F0P$&+H)``!1``#`FH@`!)`(``1*B`,$D`@`"$J(`:P`1$$`6H``I -M)J(``2Z"0`$40``F)J(``0`1$$``4Q`AE%```"Z#4``F,0`!,@(`/Q1@`!VF -M0@#8`!`1@@`0,T(P0@!_`!$80*9&`$RF0@!"`',8(91P```F,0`!`!$H0#(" -M``<``A#``!`8P@`0(D(`PC`E,&,`/Z)$`&NF1@!,ID,`W@"S*"&4L```)C$` -M`3("``$``A'``((@)0`0$$*B1`!KHD(`<":B``$P5?__+J(``Q1`_O\`%1"` -M4L``$X[B`!0`$1!``%,0(910```F,0`!`!$@0``0$,(R`P`',$(`!Z9#`/JF -M0@#^`),@(920````$!#",$(`!S(#``>F0P#\ID(!`([B`!261P$6``"H(1#@ -M``\D4?]``!$00`!3,"&4T```)J,``@`5$$`P=?__`%(0(3(#`/\`$"("`J,@4`_R8Q``$`$"H"`H`@(20&``$,`"B>ID(!$``1 -M&$``F0P#Z$`#^Y:9" -M`/XP0@`!$`#^T:9"`#`P0@`!$`#^SJ9"`"XP0@`',@,`!Z9"`/80`/Z`ID,` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 01:11:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43D98106566B; Tue, 19 Jan 2010 01:11:28 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32E978FC1E; Tue, 19 Jan 2010 01:11:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J1BSQx032706; Tue, 19 Jan 2010 01:11:28 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J1BS4S032703; Tue, 19 Jan 2010 01:11:28 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201001190111.o0J1BS4S032703@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 19 Jan 2010 01:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202608 - in head/sys/dev/usb: . wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 01:11:28 -0000 Author: weongyo Date: Tue Jan 19 01:11:27 2010 New Revision: 202608 URL: http://svn.freebsd.org/changeset/base/202608 Log: removes a hack to attach TRENDnet TEW-504UB/EU that I think this issue is solved with r202607. Now idProduct of all uath(4) devices should be decreased after loading the firmware. Modified: head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_uath.c Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jan 19 01:04:44 2010 (r202607) +++ head/sys/dev/usb/usbdevs Tue Jan 19 01:11:27 2010 (r202608) @@ -2778,7 +2778,6 @@ product UMEDIA TEW429UBC1 0x300d TEW-429 product UMEDIA ALL0298V2 0x3204 ALL0298 v2 product UMEDIA AR5523_2 0x3205 AR5523 product UMEDIA AR5523_2_NF 0x3206 AR5523 (no firmware) -product UMEDIA AR5523_3 0x3207 AR5523 /* Universal Access products */ product UNIACCESS PANACHE 0x0101 Panache Surf USB ISDN Adapter Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Tue Jan 19 01:04:44 2010 (r202607) +++ head/sys/dev/usb/wlan/if_uath.c Tue Jan 19 01:11:27 2010 (r202608) @@ -190,7 +190,6 @@ static const struct usb_device_id uath_d UATH_DEV(NETGEAR3, WPN111), UATH_DEV(UMEDIA, TEW444UBEU), UATH_DEV(UMEDIA, AR5523_2), - UATH_DEV(UMEDIA, AR5523_3), UATH_DEV(WISTRONNEWEB, AR5523_1), UATH_DEV(WISTRONNEWEB, AR5523_2), UATH_DEV(ZCOM, AR5523) From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 01:26:41 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57E271065672; Tue, 19 Jan 2010 01:26:41 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4734B8FC12; Tue, 19 Jan 2010 01:26:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J1Qfga036044; Tue, 19 Jan 2010 01:26:41 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J1Qfrf036042; Tue, 19 Jan 2010 01:26:41 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201001190126.o0J1Qfrf036042@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 19 Jan 2010 01:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202609 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 01:26:41 -0000 Author: weongyo Date: Tue Jan 19 01:26:40 2010 New Revision: 202609 URL: http://svn.freebsd.org/changeset/base/202609 Log: Product ID of D-Link DWA-120 after loading the firmware is incorrect. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jan 19 01:11:27 2010 (r202608) +++ head/sys/dev/usb/usbdevs Tue Jan 19 01:26:40 2010 (r202609) @@ -1236,8 +1236,8 @@ product DLINK DSB650TX_PNA 0x4003 1/10/1 product DLINK DSB650TX3 0x400b 10/100 Ethernet product DLINK DSB650TX2 0x4102 10/100 Ethernet product DLINK DSB650 0xabc1 10/100 Ethernet +product DLINK2 DWA120 0x3a0c DWA-120 product DLINK2 DWA120_NF 0x3a0d DWA-120 (no firmware) -product DLINK2 DWA120 0x3a0e DWA-120 product DLINK2 DWLG122C1 0x3c03 DWL-G122 c1 product DLINK2 WUA1340 0x3c04 WUA-1340 product DLINK2 DWA111 0x3c06 DWA-111 From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 01:33:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E0951065670; Tue, 19 Jan 2010 01:33:56 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D3978FC14; Tue, 19 Jan 2010 01:33:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J1XuV8037698; Tue, 19 Jan 2010 01:33:56 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J1XuHq037695; Tue, 19 Jan 2010 01:33:56 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <201001190133.o0J1XuHq037695@svn.freebsd.org> From: Weongyo Jeong Date: Tue, 19 Jan 2010 01:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202610 - head/etc/devd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 01:33:56 -0000 Author: weongyo Date: Tue Jan 19 01:33:56 2010 New Revision: 202610 URL: http://svn.freebsd.org/changeset/base/202610 Log: adds a hardware specific configuration file for uath(4). Pointed by: sam Reviewed by: imp, thompsa Added: head/etc/devd/uath.conf (contents, props changed) Modified: head/etc/devd/Makefile Modified: head/etc/devd/Makefile ============================================================================== --- head/etc/devd/Makefile Tue Jan 19 01:26:40 2010 (r202609) +++ head/etc/devd/Makefile Tue Jan 19 01:33:56 2010 (r202610) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= asus.conf +FILES= asus.conf uath.conf NO_OBJ= FILESDIR= /etc/devd Added: head/etc/devd/uath.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/devd/uath.conf Tue Jan 19 01:33:56 2010 (r202610) @@ -0,0 +1,120 @@ +# $FreeBSD$ +# +# Atheros USB wireless network device specific devd events + +# Accton +# SMCWUSB-G and SMCWUSBT-G2 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x083a"; + match "product" "(0x4505|0x4507)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Atheros Communications +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x168c"; + match "product" "0x0002"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Atheros Communications +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0cf3"; + match "product" "(0x0002|0x0004|0x0006)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Conceptronic +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0d8e"; + match "product" "(0x7802|0x7812)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# D-Link +# DWL-AG132, DWL-G132 and DWL-AG122 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x2001"; + match "product" "(0x3a01|0x3a03|0x3a05)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# D-Link +# DWA-120 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x07d1"; + match "product" "0x3a0c"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Gigaset +# SMCWUSBT-G +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1690"; + match "product" "(0x0711|0x0713)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Global Sun Technology +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x16ab"; + match "product" "(0x7802|0x7812)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# BayNETGEAR +# WG111U +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0846"; + match "product" "0x4301"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Netgear +# WG111T and WPN111 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1385"; + match "product" "(0x4251|0x5f01)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# U-MEDIA Communications +# TEW-444UB and AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x157e"; + match "product" "(0x3007|0x3206)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Wistron NeWeb +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x1435"; + match "product" "(0x0827|0x0829)"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; + +# Z-Com +# AR5523 +attach 100 { + device-name "ugen[0-9.]+"; + match "vendor" "0x0cde"; + match "product" "0x0013"; + action "/usr/sbin/uathload -d /dev/$device-name"; +}; From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 03:00:20 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7F1F106566B; Tue, 19 Jan 2010 03:00:19 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 0AD788FC0C; Tue, 19 Jan 2010 03:00:18 +0000 (UTC) Received: by fxm27 with SMTP id 27so2956317fxm.3 for ; Mon, 18 Jan 2010 19:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=mZSyeNCdNYcmgqykCYrjjwIwpu6oQ7F68IVdspIvny0=; b=hwlVCXLTjK1kRUs05PqsS/Tpun0H1g9AQsF+BXytyAjeY57Smx+sd9bIDadWGeJanK ZFk5hCo1cOvwDax4+Zv1BQxrsYTjAxRtUjiVdZT1d7CkDDNG6dTKeHffNXUofieGUrlg gi/ffkhIw9Wpu25M30YLMiudJKfHxDFti0mM0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=ajShzuXQZoWbTfwlRvQ82eCzYKNIpTOEPD+8UIkfKkvibdU6ppgYFR3vsbFgpm0Rei xjIGlAPPWOj4TWmWFkAzdK75kHqorQv7cd3aNId45djQ50me5SMhH3T7iIZugO07tLYq oxrHmSk2mHJHllKwnLx4hyLuO48s/SlBX/f38= Received: by 10.223.94.200 with SMTP id a8mr8470779fan.77.1263870017758; Mon, 18 Jan 2010 19:00:17 -0800 (PST) Received: from mbp-gige.totalterror.net (93-152-151-19.ddns.onlinedirect.bg [93.152.151.19]) by mx.google.com with ESMTPS id 28sm7509713fkx.28.2010.01.18.19.00.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 18 Jan 2010 19:00:16 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Nikolay Denev In-Reply-To: <201001182034.o0IKY1p4070521@svn.freebsd.org> Date: Tue, 19 Jan 2010 05:00:13 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <347EFF83-64D3-4C83-B652-C9A0F94B8FC6@gmail.com> References: <201001182034.o0IKY1p4070521@svn.freebsd.org> To: Andrew Thompson X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202588 - in head/sys: net netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 03:00:20 -0000 On 18 Jan, 2010, at 22:34 , Andrew Thompson wrote: > Author: thompsa > Date: Mon Jan 18 20:34:00 2010 > New Revision: 202588 > URL: http://svn.freebsd.org/changeset/base/202588 >=20 > Log: > Declare a new EVENTHANDLER called iflladdr_event which signals that = the L2 > address on an interface has changed. This lets stacked interfaces = such as > vlan(4) detect that their lower interface has changed and adjust = things in > order to keep working. Previously this situation broke at least = vlan(4) and > lagg(4) configurations. >=20 > The EVENTHANDLER_INVOKE call was not placed within if_setlladdr() due = to the > risk of a loop. >=20 > PR: kern/142927 > Submitted by: Nikolay Denev >=20 > Modified: > head/sys/net/if.c > head/sys/net/if_bridge.c > head/sys/net/if_lagg.c > head/sys/net/if_var.h > head/sys/net/if_vlan.c > head/sys/netgraph/ng_eiface.c > head/sys/netgraph/ng_ether.c > head/sys/netgraph/ng_fec.c >=20 Thanks! -- Regards, Nikolay Denev From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 04:29:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24F7A1065679; Tue, 19 Jan 2010 04:29:43 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 153048FC12; Tue, 19 Jan 2010 04:29:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J4Tg1G076488; Tue, 19 Jan 2010 04:29:42 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J4TgTR076487; Tue, 19 Jan 2010 04:29:42 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001190429.o0J4TgTR076487@svn.freebsd.org> From: Andrew Thompson Date: Tue, 19 Jan 2010 04:29:42 +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: r202611 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 04:29:43 -0000 Author: thompsa Date: Tue Jan 19 04:29:42 2010 New Revision: 202611 URL: http://svn.freebsd.org/changeset/base/202611 Log: Do not hold the lock over if_setlladdr() as it calls into the interface driver init routine. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Tue Jan 19 01:33:56 2010 (r202610) +++ head/sys/net/if_vlan.c Tue Jan 19 04:29:42 2010 (r202611) @@ -473,6 +473,9 @@ static void vlan_iflladdr(void *arg __unused, struct ifnet *ifp) { struct ifvlan *ifv; +#ifndef VLAN_ARRAY + struct ifvlan *next; +#endif int i; /* @@ -488,13 +491,15 @@ vlan_iflladdr(void *arg __unused, struct */ #ifdef VLAN_ARRAY for (i = 0; i < VLAN_ARRAY_SIZE; i++) - if ((ifv = ifp->if_vlantrunk->vlans[i])) - if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); + if ((ifv = ifp->if_vlantrunk->vlans[i])) { #else /* VLAN_ARRAY */ for (i = 0; i < (1 << ifp->if_vlantrunk->hwidth); i++) - LIST_FOREACH(ifv, &ifp->if_vlantrunk->hash[i], ifv_list) - if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); + LIST_FOREACH_SAFE(ifv, &ifp->if_vlantrunk->hash[i], ifv_list, next) { #endif /* VLAN_ARRAY */ + VLAN_UNLOCK(); + if_setlladdr(ifv->ifv_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); + VLAN_LOCK(); + } VLAN_UNLOCK(); } From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 05:00:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C6461065692; Tue, 19 Jan 2010 05:00:58 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F070D8FC19; Tue, 19 Jan 2010 05:00:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0J50vp3083378; Tue, 19 Jan 2010 05:00:57 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0J50vGJ083374; Tue, 19 Jan 2010 05:00:57 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201001190500.o0J50vGJ083374@svn.freebsd.org> From: Andrew Thompson Date: Tue, 19 Jan 2010 05:00:57 +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: r202612 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 05:00:58 -0000 Author: thompsa Date: Tue Jan 19 05:00:57 2010 New Revision: 202612 URL: http://svn.freebsd.org/changeset/base/202612 Log: Use the iflladdr_event event to keep the mac address on the vap in sync with the parent wirless interface. If the user passed in a mac address or it was autogenerated then flag this to avoid trashing it on update. This will fix wlan+lagg in a post vap world. Modified: head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Tue Jan 19 04:29:42 2010 (r202611) +++ head/sys/net80211/ieee80211.c Tue Jan 19 05:00:57 2010 (r202612) @@ -440,6 +440,9 @@ ieee80211_vap_setup(struct ieee80211com /* auto-enable s/w beacon miss support */ if (flags & IEEE80211_CLONE_NOBEACONS) vap->iv_flags_ext |= IEEE80211_FEXT_SWBMISS; + /* auto-generated or user supplied MAC address */ + if (flags & (IEEE80211_CLONE_BSSID|IEEE80211_CLONE_MACADDR)) + vap->iv_flags_ext |= IEEE80211_FEXT_UNIQMAC; /* * Enable various functionality by default if we're * capable; the driver can override us if it knows better. Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Tue Jan 19 04:29:42 2010 (r202611) +++ head/sys/net80211/ieee80211_freebsd.c Tue Jan 19 05:00:57 2010 (r202612) @@ -730,6 +730,7 @@ ieee80211_load_module(const char *modnam } static eventhandler_tag wlan_bpfevent; +static eventhandler_tag wlan_ifllevent; static void bpf_track(void *arg, struct ifnet *ifp, int dlt, int attach) @@ -756,6 +757,33 @@ bpf_track(void *arg, struct ifnet *ifp, } } +static void +wlan_iflladdr(void *arg __unused, struct ifnet *ifp) +{ + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211vap *vap, *next; + + if (ifp->if_type != IFT_IEEE80211 || ic == NULL) + return; + + IEEE80211_LOCK(ic); + TAILQ_FOREACH_SAFE(vap, &ic->ic_vaps, iv_next, next) { + /* + * If the MAC address has changed on the parent and it was + * copied to the vap on creation then re-sync. + */ + if (vap->iv_ic == ic && + (vap->iv_flags_ext & IEEE80211_FEXT_UNIQMAC) == 0) { + IEEE80211_ADDR_COPY(vap->iv_myaddr, IF_LLADDR(ifp)); + IEEE80211_UNLOCK(ic); + if_setlladdr(vap->iv_ifp, IF_LLADDR(ifp), + IEEE80211_ADDR_LEN); + IEEE80211_LOCK(ic); + } + } + IEEE80211_UNLOCK(ic); +} + /* * Module glue. * @@ -772,6 +800,12 @@ wlan_modevent(module_t mod, int type, vo bpf_track, 0, EVENTHANDLER_PRI_ANY); if (wlan_bpfevent == NULL) return ENOMEM; + wlan_ifllevent = EVENTHANDLER_REGISTER(iflladdr_event, + wlan_iflladdr, NULL, EVENTHANDLER_PRI_ANY); + if (wlan_ifllevent == NULL) { + EVENTHANDLER_DEREGISTER(bpf_track, wlan_bpfevent); + return ENOMEM; + } if_clone_attach(&wlan_cloner); if_register_com_alloc(IFT_IEEE80211, wlan_alloc, wlan_free); return 0; @@ -779,6 +813,7 @@ wlan_modevent(module_t mod, int type, vo if_deregister_com_alloc(IFT_IEEE80211); if_clone_detach(&wlan_cloner); EVENTHANDLER_DEREGISTER(bpf_track, wlan_bpfevent); + EVENTHANDLER_DEREGISTER(iflladdr_event, wlan_ifllevent); return 0; } return EINVAL; Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Tue Jan 19 04:29:42 2010 (r202611) +++ head/sys/net80211/ieee80211_var.h Tue Jan 19 05:00:57 2010 (r202612) @@ -545,11 +545,12 @@ MALLOC_DECLARE(M_80211_VAP); /* NB: immutable: should be set only when creating a vap */ #define IEEE80211_FEXT_WDSLEGACY 0x00010000 /* CONF: legacy WDS operation */ #define IEEE80211_FEXT_PROBECHAN 0x00020000 /* CONF: probe passive channel*/ +#define IEEE80211_FEXT_UNIQMAC 0x00040000 /* CONF: user or computed mac */ #define IEEE80211_FEXT_BITS \ "\20\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \ "\0114ADDR\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\16STATEWAIT\17REINIT" \ - "\20BPF\21WDSLEGACY\22PROBECHAN" + "\20BPF\21WDSLEGACY\22PROBECHAN\23UNIQMAC" /* ic_flags_ht/iv_flags_ht */ #define IEEE80211_FHT_NONHT_PR 0x00000001 /* STATUS: non-HT sta present */ From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 08:15:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E433C1065695; Tue, 19 Jan 2010 08:15:12 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8A35C8FC1B; Tue, 19 Jan 2010 08:15:12 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2D797.dip.t-dialin.net [217.226.215.151]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 27102844023; Tue, 19 Jan 2010 09:15:06 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 8B47A1435A; Tue, 19 Jan 2010 09:15:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1263888902; bh=NFFjxsy1TJ7P7OTJ5KtpGm2frWp1mWqf0EyZk9NZJ/o=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=KH2IJ3g/cZzd4+bbiOAs7v7cADGx1BB4YdWTN/aVHIlC9EsJLv8HaY8bAkzEdPM4u b8lIw1xqXKR5bUNhqTmVNNFb60Jrt6rkMVT+V5HSA3pq7oRvhu1mdgtoSn258b5stp NdqHyH8Fu2ddaeT2k07em4lZZa/kan0g6yLY9BXAh4TlfFNyjSFvxjMWPEIQwe73le s31zqwlbSqCqNqTFHRe4falB1ZoM2lHRujU5loXCGL1HxuiAWbGa6Tn51D3ity9DQ3 JdtY6cRC2iW9wJgwqsdLWCqB6wSFg/DDujCY7OC3xDCEI/UtRGr9Buwv0KXAG6JYJN /+owVHL1qF3eg== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o0J8F1Et064922; Tue, 19 Jan 2010 09:15:01 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 19 Jan 2010 09:15:00 +0100 Message-ID: <20100119091500.17856jhlpl7mjsow@webmail.leidinger.net> Date: Tue, 19 Jan 2010 09:15:00 +0100 From: Alexander Leidinger To: "Wojciech A. Koszek" References: <201001182246.o0IMk6dw000346@svn.freebsd.org> In-Reply-To: <201001182246.o0IMk6dw000346@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 27102844023.5D894 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1264493708.452@4zeddjp7X7Umw1wLXkDsNA X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202598 - head/sys/compat/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 08:15:13 -0000 Quoting "Wojciech A. Koszek" (from Mon, 18 Jan 2010 22:46:06 +0000 (UTC)): > Author: wkoszek > Date: Mon Jan 18 22:46:06 2010 > New Revision: 202598 > URL: http://svn.freebsd.org/changeset/base/202598 > > Log: > Let us to use our libusb(3) in Linuxolator. > > With this change, Linux binaries can work with our libusb(3) when > it's compiled against our header files on GNU/Linux system -- this > solves the problem with differences between /dev layouts. > > With ported libusb(3), I am able to use my USB JTAG cable with Linux > binaries that support it. The commit log is IMHO omitting the info if you checked (or not) that there is no linux ioctl in this range. It would also be nice if the comment in linux_ioctl.h tells to check that there is no clash with a linux ioctl when the min/max is changed. Bye, Alexander. -- The longer the title the less important the job. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 10:19:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0996106568D; Tue, 19 Jan 2010 10:19:55 +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 AEC048FC1F; Tue, 19 Jan 2010 10:19:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JAJtiO058166; Tue, 19 Jan 2010 10:19:55 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JAJttr058163; Tue, 19 Jan 2010 10:19:55 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201001191019.o0JAJttr058163@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 19 Jan 2010 10:19:55 +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: r202613 - head/lib/libfetch X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 10:19:55 -0000 Author: des Date: Tue Jan 19 10:19:55 2010 New Revision: 202613 URL: http://svn.freebsd.org/changeset/base/202613 Log: Add HTTP digest authentication. Submitted by: Jean-Francois Dockes Forgotten by: des (repeatedly) Modified: head/lib/libfetch/Makefile head/lib/libfetch/http.c Modified: head/lib/libfetch/Makefile ============================================================================== --- head/lib/libfetch/Makefile Tue Jan 19 05:00:57 2010 (r202612) +++ head/lib/libfetch/Makefile Tue Jan 19 10:19:55 2010 (r202613) @@ -17,7 +17,9 @@ CFLAGS+= -DINET6 .if ${MK_OPENSSL} != "no" CFLAGS+= -DWITH_SSL DPADD= ${LIBSSL} ${LIBCRYPTO} -LDADD= -lssl -lcrypto +LDADD= -lssl -lcrypto -lmd +.else +LDADD= -lmd .endif CFLAGS+= -DFTP_COMBINE_CWDS Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Tue Jan 19 05:00:57 2010 (r202612) +++ head/lib/libfetch/http.c Tue Jan 19 10:19:55 2010 (r202613) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -343,7 +344,8 @@ typedef enum { hdr_last_modified, hdr_location, hdr_transfer_encoding, - hdr_www_authenticate + hdr_www_authenticate, + hdr_proxy_authenticate, } hdr_t; /* Names of interesting headers */ @@ -357,6 +359,7 @@ static struct { { hdr_location, "Location" }, { hdr_transfer_encoding, "Transfer-Encoding" }, { hdr_www_authenticate, "WWW-Authenticate" }, + { hdr_proxy_authenticate, "Proxy-Authenticate" }, { hdr_unknown, NULL }, }; @@ -446,21 +449,114 @@ http_match(const char *str, const char * return (hdr); } + /* - * Get the next header and return the appropriate symbolic code. - */ -static hdr_t -http_next_header(conn_t *conn, const char **p) + * Get the next header and return the appropriate symbolic code. We + * need to read one line ahead for checking for a continuation line + * belonging to the current header (continuation lines start with + * white space). + * + * We get called with a fresh line already in the conn buffer, either + * from the previous http_next_header() invocation, or, the first + * time, from a fetch_getln() performed by our caller. + * + * This stops when we encounter an empty line (we dont read beyond the header + * area). + * + * Note that the "headerbuf" is just a place to return the result. Its + * contents are not used for the next call. This means that no cleanup + * is needed when ie doing another connection, just call the cleanup when + * fully done to deallocate memory. + */ + +/* Limit the max number of continuation lines to some reasonable value */ +#define HTTP_MAX_CONT_LINES 10 + +/* Place into which to build a header from one or several lines */ +typedef struct { + char *buf; /* buffer */ + size_t bufsize; /* buffer size */ + size_t buflen; /* length of buffer contents */ +} http_headerbuf_t; + +static void +init_http_headerbuf(http_headerbuf_t *buf) { - int i; + buf->buf = NULL; + buf->bufsize = 0; + buf->buflen = 0; +} - if (fetch_getln(conn) == -1) - return (hdr_syserror); - while (conn->buflen && isspace((unsigned char)conn->buf[conn->buflen - 1])) +static void +clean_http_headerbuf(http_headerbuf_t *buf) +{ + if (buf->buf) + free(buf->buf); + init_http_headerbuf(buf); +} + +/* Remove whitespace at the end of the buffer */ +static void +http_conn_trimright(conn_t *conn) +{ + while (conn->buflen && + isspace((unsigned char)conn->buf[conn->buflen - 1])) conn->buflen--; conn->buf[conn->buflen] = '\0'; +} + +static hdr_t +http_next_header(conn_t *conn, http_headerbuf_t *hbuf, const char **p) +{ + int i, len; + + /* + * Have to do the stripping here because of the first line. So + * it's done twice for the subsequent lines. No big deal + */ + http_conn_trimright(conn); if (conn->buflen == 0) return (hdr_end); + + /* Copy the line to the headerbuf */ + if (hbuf->bufsize < conn->buflen + 1) { + if ((hbuf->buf = realloc(hbuf->buf, conn->buflen + 1)) == NULL) + return (hdr_syserror); + hbuf->bufsize = conn->buflen + 1; + } + strcpy(hbuf->buf, conn->buf); + hbuf->buflen = conn->buflen; + + /* + * Fetch possible continuation lines. Stop at 1st non-continuation + * and leave it in the conn buffer + */ + for (i = 0; i < HTTP_MAX_CONT_LINES; i++) { + if (fetch_getln(conn) == -1) + return (hdr_syserror); + + /* + * Note: we carry on the idea from the previous version + * that a pure whitespace line is equivalent to an empty + * one (so it's not continuation and will be handled when + * we are called next) + */ + http_conn_trimright(conn); + if (conn->buf[0] != ' ' && conn->buf[0] != "\t"[0]) + break; + + /* Got a continuation line. Concatenate to previous */ + len = hbuf->buflen + conn->buflen; + if (hbuf->bufsize < len + 1) { + len *= 2; + if ((hbuf->buf = realloc(hbuf->buf, len + 1)) == NULL) + return (hdr_syserror); + hbuf->bufsize = len + 1; + } + strcpy(hbuf->buf + hbuf->buflen, conn->buf); + hbuf->buflen += conn->buflen; + } + /* * We could check for malformed headers but we don't really care. * A valid header starts with a token immediately followed by a @@ -468,11 +564,290 @@ http_next_header(conn_t *conn, const cha * characters except "()<>@,;:\\\"{}". */ for (i = 0; hdr_names[i].num != hdr_unknown; i++) - if ((*p = http_match(hdr_names[i].name, conn->buf)) != NULL) + if ((*p = http_match(hdr_names[i].name, hbuf->buf)) != NULL) return (hdr_names[i].num); + return (hdr_unknown); } +/************************** + * [Proxy-]Authenticate header parsing + */ + +/* + * Read doublequote-delimited string into output buffer obuf (allocated + * by caller, whose responsibility it is to ensure that it's big enough) + * cp points to the first char after the initial '"' + * Handles \ quoting + * Returns pointer to the first char after the terminating double quote, or + * NULL for error. + */ +static const char * +http_parse_headerstring(const char *cp, char *obuf) +{ + for (;;) { + switch (*cp) { + case 0: /* Unterminated string */ + *obuf = 0; + return (NULL); + case '"': /* Ending quote */ + *obuf = 0; + return (++cp); + case '\\': + if (*++cp == 0) { + *obuf = 0; + return (NULL); + } + /* FALLTHROUGH */ + default: + *obuf++ = *cp++; + } + } +} + +/* Http auth challenge schemes */ +typedef enum {HTTPAS_UNKNOWN, HTTPAS_BASIC,HTTPAS_DIGEST} http_auth_schemes_t; + +/* Data holder for a Basic or Digest challenge. */ +typedef struct { + http_auth_schemes_t scheme; + char *realm; + char *qop; + char *nonce; + char *opaque; + char *algo; + int stale; + int nc; /* Nonce count */ +} http_auth_challenge_t; + +static void +init_http_auth_challenge(http_auth_challenge_t *b) +{ + b->scheme = HTTPAS_UNKNOWN; + b->realm = b->qop = b->nonce = b->opaque = b->algo = NULL; + b->stale = b->nc = 0; +} + +static void +clean_http_auth_challenge(http_auth_challenge_t *b) +{ + if (b->realm) + free(b->realm); + if (b->qop) + free(b->qop); + if (b->nonce) + free(b->nonce); + if (b->opaque) + free(b->opaque); + if (b->algo) + free(b->algo); + init_http_auth_challenge(b); +} + +/* Data holder for an array of challenges offered in an http response. */ +#define MAX_CHALLENGES 10 +typedef struct { + http_auth_challenge_t *challenges[MAX_CHALLENGES]; + int count; /* Number of parsed challenges in the array */ + int valid; /* We did parse an authenticate header */ +} http_auth_challenges_t; + +static void +init_http_auth_challenges(http_auth_challenges_t *cs) +{ + int i; + for (i = 0; i < MAX_CHALLENGES; i++) + cs->challenges[i] = NULL; + cs->count = cs->valid = 0; +} + +static void +clean_http_auth_challenges(http_auth_challenges_t *cs) +{ + int i; + /* We rely on non-zero pointers being allocated, not on the count */ + for (i = 0; i < MAX_CHALLENGES; i++) { + if (cs->challenges[i] != NULL) { + clean_http_auth_challenge(cs->challenges[i]); + free(cs->challenges[i]); + } + } + init_http_auth_challenges(cs); +} + +/* + * Enumeration for lexical elements. Separators will be returned as their own + * ascii value + */ +typedef enum {HTTPHL_WORD=256, HTTPHL_STRING=257, HTTPHL_END=258, + HTTPHL_ERROR = 259} http_header_lex_t; + +/* + * Determine what kind of token comes next and return possible value + * in buf, which is supposed to have been allocated big enough by + * caller. Advance input pointer and return element type. + */ +static int +http_header_lex(const char **cpp, char *buf) +{ + size_t l; + /* Eat initial whitespace */ + *cpp += strspn(*cpp, " \t"); + if (**cpp == 0) + return (HTTPHL_END); + + /* Separator ? */ + if (**cpp == ',' || **cpp == '=') + return (*((*cpp)++)); + + /* String ? */ + if (**cpp == '"') { + *cpp = http_parse_headerstring(++*cpp, buf); + if (*cpp == NULL) + return (HTTPHL_ERROR); + return (HTTPHL_STRING); + } + + /* Read other token, until separator or whitespace */ + l = strcspn(*cpp, " \t,="); + memcpy(buf, *cpp, l); + buf[l] = 0; + *cpp += l; + return (HTTPHL_WORD); +} + +/* + * Read challenges from http xxx-authenticate header and accumulate them + * in the challenges list structure. + * + * Headers with multiple challenges are specified by rfc2617, but + * servers (ie: squid) often send them in separate headers instead, + * which in turn is forbidden by the http spec (multiple headers with + * the same name are only allowed for pure comma-separated lists, see + * rfc2616 sec 4.2). + * + * We support both approaches anyway + */ +static int +http_parse_authenticate(const char *cp, http_auth_challenges_t *cs) +{ + int ret = -1; + http_header_lex_t lex; + char *key = malloc(strlen(cp) + 1); + char *value = malloc(strlen(cp) + 1); + char *buf = malloc(strlen(cp) + 1); + + if (key == NULL || value == NULL || buf == NULL) { + fetch_syserr(); + goto out; + } + + /* In any case we've seen the header and we set the valid bit */ + cs->valid = 1; + + /* Need word first */ + lex = http_header_lex(&cp, key); + if (lex != HTTPHL_WORD) + goto out; + + /* Loop on challenges */ + for (; cs->count < MAX_CHALLENGES; cs->count++) { + cs->challenges[cs->count] = + malloc(sizeof(http_auth_challenge_t)); + if (cs->challenges[cs->count] == NULL) { + fetch_syserr(); + goto out; + } + init_http_auth_challenge(cs->challenges[cs->count]); + if (!strcasecmp(key, "basic")) { + cs->challenges[cs->count]->scheme = HTTPAS_BASIC; + } else if (!strcasecmp(key, "digest")) { + cs->challenges[cs->count]->scheme = HTTPAS_DIGEST; + } else { + cs->challenges[cs->count]->scheme = HTTPAS_UNKNOWN; + /* + * Continue parsing as basic or digest may + * follow, and the syntax is the same for + * all. We'll just ignore this one when + * looking at the list + */ + } + + /* Loop on attributes */ + for (;;) { + /* Key */ + lex = http_header_lex(&cp, key); + if (lex != HTTPHL_WORD) + goto out; + + /* Equal sign */ + lex = http_header_lex(&cp, buf); + if (lex != '=') + goto out; + + /* Value */ + lex = http_header_lex(&cp, value); + if (lex != HTTPHL_WORD && lex != HTTPHL_STRING) + goto out; + + if (!strcasecmp(key, "realm")) + cs->challenges[cs->count]->realm = + strdup(value); + else if (!strcasecmp(key, "qop")) + cs->challenges[cs->count]->qop = + strdup(value); + else if (!strcasecmp(key, "nonce")) + cs->challenges[cs->count]->nonce = + strdup(value); + else if (!strcasecmp(key, "opaque")) + cs->challenges[cs->count]->opaque = + strdup(value); + else if (!strcasecmp(key, "algorithm")) + cs->challenges[cs->count]->algo = + strdup(value); + else if (!strcasecmp(key, "stale")) + cs->challenges[cs->count]->stale = + strcasecmp(value, "no"); + /* Else ignore unknown attributes */ + + /* Comma or Next challenge or End */ + lex = http_header_lex(&cp, key); + /* + * If we get a word here, this is the beginning of the + * next challenge. Break the attributes loop + */ + if (lex == HTTPHL_WORD) + break; + + if (lex == HTTPHL_END) { + /* End while looking for ',' is normal exit */ + cs->count++; + ret = 0; + goto out; + } + /* Anything else is an error */ + if (lex != ',') + goto out; + + } /* End attributes loop */ + } /* End challenge loop */ + + /* + * Challenges max count exceeded. This really can't happen + * with normal data, something's fishy -> error + */ + +out: + if (key) + free(key); + if (value) + free(value); + if (buf) + free(buf); + return (ret); +} + + /* * Parse a last-modified header */ @@ -618,6 +993,291 @@ http_base64(const char *src) return (str); } + +/* + * Extract authorization parameters from environment value. + * The value is like scheme:realm:user:pass + */ +typedef struct { + char *scheme; + char *realm; + char *user; + char *password; +} http_auth_params_t; + +static void +init_http_auth_params(http_auth_params_t *s) +{ + s->scheme = s->realm = s->user = s->password = 0; +} + +static void +clean_http_auth_params(http_auth_params_t *s) +{ + if (s->scheme) + free(s->scheme); + if (s->realm) + free(s->realm); + if (s->user) + free(s->user); + if (s->password) + free(s->password); + init_http_auth_params(s); +} + +static int +http_authfromenv(const char *p, http_auth_params_t *parms) +{ + int ret = -1; + char *v, *ve; + char *str = strdup(p); + + if (str == NULL) { + fetch_syserr(); + return (-1); + } + v = str; + + if ((ve = strchr(v, ':')) == NULL) + goto out; + + *ve = 0; + if ((parms->scheme = strdup(v)) == NULL) { + fetch_syserr(); + goto out; + } + v = ve + 1; + + if ((ve = strchr(v, ':')) == NULL) + goto out; + + *ve = 0; + if ((parms->realm = strdup(v)) == NULL) { + fetch_syserr(); + goto out; + } + v = ve + 1; + + if ((ve = strchr(v, ':')) == NULL) + goto out; + + *ve = 0; + if ((parms->user = strdup(v)) == NULL) { + fetch_syserr(); + goto out; + } + v = ve + 1; + + + if ((parms->password = strdup(v)) == NULL) { + fetch_syserr(); + goto out; + } + ret = 0; +out: + if (ret == -1) + clean_http_auth_params(parms); + if (str) + free(str); + return (ret); +} + + +/* + * Digest response: the code to compute the digest is taken from the + * sample implementation in RFC2616 + */ +#define IN +#define OUT + +#define HASHLEN 16 +typedef char HASH[HASHLEN]; +#define HASHHEXLEN 32 +typedef char HASHHEX[HASHHEXLEN+1]; + +static const char *hexchars = "0123456789abcdef"; +static void +CvtHex(IN HASH Bin, OUT HASHHEX Hex) +{ + unsigned short i; + unsigned char j; + + for (i = 0; i < HASHLEN; i++) { + j = (Bin[i] >> 4) & 0xf; + Hex[i*2] = hexchars[j]; + j = Bin[i] & 0xf; + Hex[i*2+1] = hexchars[j]; + }; + Hex[HASHHEXLEN] = '\0'; +}; + +/* calculate H(A1) as per spec */ +static void +DigestCalcHA1( + IN char * pszAlg, + IN char * pszUserName, + IN char * pszRealm, + IN char * pszPassword, + IN char * pszNonce, + IN char * pszCNonce, + OUT HASHHEX SessionKey + ) +{ + MD5_CTX Md5Ctx; + HASH HA1; + + MD5Init(&Md5Ctx); + MD5Update(&Md5Ctx, pszUserName, strlen(pszUserName)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszRealm, strlen(pszRealm)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszPassword, strlen(pszPassword)); + MD5Final(HA1, &Md5Ctx); + if (strcasecmp(pszAlg, "md5-sess") == 0) { + + MD5Init(&Md5Ctx); + MD5Update(&Md5Ctx, HA1, HASHLEN); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce)); + MD5Final(HA1, &Md5Ctx); + }; + CvtHex(HA1, SessionKey); +} + +/* calculate request-digest/response-digest as per HTTP Digest spec */ +static void +DigestCalcResponse( + IN HASHHEX HA1, /* H(A1) */ + IN char * pszNonce, /* nonce from server */ + IN char * pszNonceCount, /* 8 hex digits */ + IN char * pszCNonce, /* client nonce */ + IN char * pszQop, /* qop-value: "", "auth", "auth-int" */ + IN char * pszMethod, /* method from the request */ + IN char * pszDigestUri, /* requested URL */ + IN HASHHEX HEntity, /* H(entity body) if qop="auth-int" */ + OUT HASHHEX Response /* request-digest or response-digest */ + ) +{ +/* DEBUG(fprintf(stderr, + "Calc: HA1[%s] Nonce[%s] qop[%s] method[%s] URI[%s]\n", + HA1, pszNonce, pszQop, pszMethod, pszDigestUri));*/ + MD5_CTX Md5Ctx; + HASH HA2; + HASH RespHash; + HASHHEX HA2Hex; + + // calculate H(A2) + MD5Init(&Md5Ctx); + MD5Update(&Md5Ctx, pszMethod, strlen(pszMethod)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszDigestUri, strlen(pszDigestUri)); + if (strcasecmp(pszQop, "auth-int") == 0) { + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, HEntity, HASHHEXLEN); + }; + MD5Final(HA2, &Md5Ctx); + CvtHex(HA2, HA2Hex); + + // calculate response + MD5Init(&Md5Ctx); + MD5Update(&Md5Ctx, HA1, HASHHEXLEN); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce)); + MD5Update(&Md5Ctx, ":", 1); + if (*pszQop) { + MD5Update(&Md5Ctx, pszNonceCount, strlen(pszNonceCount)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce)); + MD5Update(&Md5Ctx, ":", 1); + MD5Update(&Md5Ctx, pszQop, strlen(pszQop)); + MD5Update(&Md5Ctx, ":", 1); + }; + MD5Update(&Md5Ctx, HA2Hex, HASHHEXLEN); + MD5Final(RespHash, &Md5Ctx); + CvtHex(RespHash, Response); +} + +/* + * Generate/Send a Digest authorization header + * This looks like: [Proxy-]Authorization: credentials + * + * credentials = "Digest" digest-response + * digest-response = 1#( username | realm | nonce | digest-uri + * | response | [ algorithm ] | [cnonce] | + * [opaque] | [message-qop] | + * [nonce-count] | [auth-param] ) + * username = "username" "=" username-value + * username-value = quoted-string + * digest-uri = "uri" "=" digest-uri-value + * digest-uri-value = request-uri ; As specified by HTTP/1.1 + * message-qop = "qop" "=" qop-value + * cnonce = "cnonce" "=" cnonce-value + * cnonce-value = nonce-value + * nonce-count = "nc" "=" nc-value + * nc-value = 8LHEX + * response = "response" "=" request-digest + * request-digest = <"> 32LHEX <"> + */ +static int +http_digest_auth(conn_t *conn, const char *hdr, http_auth_challenge_t *c, + http_auth_params_t *parms, struct url *url) +{ + int r; + char noncecount[10]; + char cnonce[40]; + char *options = 0; + + if (!c->realm || !c->nonce) { + DEBUG(fprintf(stderr, "realm/nonce not set in challenge\n")); + return(-1); + } + if (!c->algo) + c->algo = strdup(""); + + if (asprintf(&options, "%s%s%s%s", + *c->algo? ",algorithm=" : "", c->algo, + c->opaque? ",opaque=" : "", c->opaque?c->opaque:"")== -1) + return (-1); + + if (!c->qop) { + c->qop = strdup(""); + *noncecount = 0; + *cnonce = 0; + } else { + c->nc++; + sprintf(noncecount, "%08x", c->nc); + /* We don't try very hard with the cnonce ... */ + sprintf(cnonce, "%x%lx", getpid(), (unsigned long)time(0)); + } + + HASHHEX HA1; + DigestCalcHA1(c->algo, parms->user, c->realm, + parms->password, c->nonce, cnonce, HA1); + DEBUG(fprintf(stderr, "HA1: [%s]\n", HA1)); + HASHHEX digest; + DigestCalcResponse(HA1, c->nonce, noncecount, cnonce, c->qop, + "GET", url->doc, "", digest); + + if (c->qop[0]) { + r = http_cmd(conn, "%s: Digest username=\"%s\",realm=\"%s\"," + "nonce=\"%s\",uri=\"%s\",response=\"%s\"," + "qop=\"auth\", cnonce=\"%s\", nc=%s%s", + hdr, parms->user, c->realm, + c->nonce, url->doc, digest, + cnonce, noncecount, options); + } else { + r = http_cmd(conn, "%s: Digest username=\"%s\",realm=\"%s\"," + "nonce=\"%s\",uri=\"%s\",response=\"%s\"%s", + hdr, parms->user, c->realm, + c->nonce, url->doc, digest, options); + } + if (options) + free(options); + return (r); +} + /* * Encode username and password */ @@ -627,8 +1287,8 @@ http_basic_auth(conn_t *conn, const char char *upw, *auth; int r; - DEBUG(fprintf(stderr, "usr: [%s]\n", usr)); - DEBUG(fprintf(stderr, "pwd: [%s]\n", pwd)); + DEBUG(fprintf(stderr, "basic: usr: [%s]\n", usr)); + DEBUG(fprintf(stderr, "basic: pwd: [%s]\n", pwd)); if (asprintf(&upw, "%s:%s", usr, pwd) == -1) return (-1); auth = http_base64(upw); @@ -641,33 +1301,49 @@ http_basic_auth(conn_t *conn, const char } /* - * Send an authorization header + * Chose the challenge to answer and call the appropriate routine to + * produce the header. */ static int -http_authorize(conn_t *conn, const char *hdr, const char *p) +http_authorize(conn_t *conn, const char *hdr, http_auth_challenges_t *cs, + http_auth_params_t *parms, struct url *url) { - /* basic authorization */ - if (strncasecmp(p, "basic:", 6) == 0) { - char *user, *pwd, *str; - int r; - - /* skip realm */ - for (p += 6; *p && *p != ':'; ++p) - /* nothing */ ; - if (!*p || strchr(++p, ':') == NULL) - return (-1); - if ((str = strdup(p)) == NULL) - return (-1); /* XXX */ - user = str; - pwd = strchr(str, ':'); - *pwd++ = '\0'; - r = http_basic_auth(conn, hdr, user, pwd); - free(str); - return (r); + http_auth_challenge_t *basic = NULL; + http_auth_challenge_t *digest = NULL; + int i; + + /* If user or pass are null we're not happy */ + if (!parms->user || !parms->password) { + DEBUG(fprintf(stderr, "NULL usr or pass\n")); + return (-1); } - return (-1); -} + /* Look for a Digest and a Basic challenge */ + for (i = 0; i < cs->count; i++) { + if (cs->challenges[i]->scheme == HTTPAS_BASIC) + basic = cs->challenges[i]; + if (cs->challenges[i]->scheme == HTTPAS_DIGEST) + digest = cs->challenges[i]; + } + + /* Error if "Digest" was specified and there is no Digest challenge */ + if (!digest && (parms->scheme && + !strcasecmp(parms->scheme, "digest"))) { + DEBUG(fprintf(stderr, + "Digest auth in env, not supported by peer\n")); + return (-1); + } + /* + * If "basic" was specified in the environment, or there is no Digest + * challenge, do the basic thing. Don't need a challenge for this, + * so no need to check basic!=NULL + */ + if (!digest || (parms->scheme && !strcasecmp(parms->scheme,"basic"))) + return (http_basic_auth(conn,hdr,parms->user,parms->password)); + + /* Else, prefer digest. We just checked that it's not NULL */ + return (http_digest_auth(conn, hdr, digest, parms, url)); +} /***************************************************************************** * Helper functions for connecting to a server or proxy @@ -797,13 +1473,13 @@ http_print_html(FILE *out, FILE *in) */ FILE * http_request(struct url *URL, const char *op, struct url_stat *us, - struct url *purl, const char *flags) + struct url *purl, const char *flags) { char timebuf[80]; char hbuf[MAXHOSTNAMELEN + 7], *host; conn_t *conn; struct url *url, *new; - int chunked, direct, ims, need_auth, noredirect, verbose; + int chunked, direct, ims, noredirect, verbose; int e, i, n, val; off_t offset, clength, length, size; time_t mtime; @@ -811,6 +1487,14 @@ http_request(struct url *URL, const char FILE *f; hdr_t h; struct tm *timestruct; + http_headerbuf_t headerbuf; + http_auth_challenges_t server_challenges; + http_auth_challenges_t proxy_challenges; + + /* The following calls don't allocate anything */ + init_http_headerbuf(&headerbuf); + init_http_auth_challenges(&server_challenges); + init_http_auth_challenges(&proxy_challenges); direct = CHECK_FLAG('d'); noredirect = CHECK_FLAG('A'); @@ -830,7 +1514,6 @@ http_request(struct url *URL, const char i = 0; e = HTTP_PROTOCOL_ERROR; - need_auth = 0; do { new = NULL; chunked = 0; @@ -895,27 +1578,67 @@ http_request(struct url *URL, const char /* virtual host */ http_cmd(conn, "Host: %s", host); - /* proxy authorization */ - if (purl) { - if (*purl->user || *purl->pwd) - http_basic_auth(conn, "Proxy-Authorization", - purl->user, purl->pwd); - else if ((p = getenv("HTTP_PROXY_AUTH")) != NULL && *p != '\0') - http_authorize(conn, "Proxy-Authorization", p); + /* + * Proxy authorization: we only send auth after we received + * a 407 error. We do not first try basic anyway (changed + * when support was added for digest-auth) + */ + if (purl && proxy_challenges.valid) { + http_auth_params_t aparams; + init_http_auth_params(&aparams); + if (*purl->user || *purl->pwd) { + aparams.user = purl->user ? + strdup(purl->user) : strdup(""); + aparams.password = purl->pwd? + strdup(purl->pwd) : strdup(""); + } else if ((p = getenv("HTTP_PROXY_AUTH")) != NULL && + *p != '\0') { + if (http_authfromenv(p, &aparams) < 0) { + http_seterr(HTTP_NEED_PROXY_AUTH); + goto ouch; + } + } + http_authorize(conn, "Proxy-Authorization", + &proxy_challenges, &aparams, url); + clean_http_auth_params(&aparams); } - /* server authorization */ - if (need_auth || *url->user || *url->pwd) { - if (*url->user || *url->pwd) - http_basic_auth(conn, "Authorization", url->user, url->pwd); - else if ((p = getenv("HTTP_AUTH")) != NULL && *p != '\0') - http_authorize(conn, "Authorization", p); - else if (fetchAuthMethod && fetchAuthMethod(url) == 0) { - http_basic_auth(conn, "Authorization", url->user, url->pwd); + /* + * Server authorization: we never send "a priori" + * Basic auth, which used to be done if user/pass were + * set in the url. This would be weird because we'd send the + * password in the clear even if Digest is finally to be + * used (it would have made more sense for the + * pre-digest version to do this when Basic was specified + * in the environment) + */ + if (server_challenges.valid) { + http_auth_params_t aparams; + init_http_auth_params(&aparams); + if (*url->user || *url->pwd) { + aparams.user = url->user ? + strdup(url->user) : strdup(""); + aparams.password = url->pwd ? + strdup(url->pwd) : strdup(""); + } else if ((p = getenv("HTTP_AUTH")) != NULL && + *p != '\0') { + if (http_authfromenv(p, &aparams) < 0) { + http_seterr(HTTP_NEED_AUTH); + goto ouch; + } + } else if (fetchAuthMethod && + fetchAuthMethod(url) == 0) { + aparams.user = url->user ? + strdup(url->user) : strdup(""); + aparams.password = url->pwd ? + strdup(url->pwd) : strdup(""); } else { http_seterr(HTTP_NEED_AUTH); goto ouch; } + http_authorize(conn, "Authorization", + &server_challenges, &aparams, url); + clean_http_auth_params(&aparams); } /* other headers */ @@ -965,7 +1688,7 @@ http_request(struct url *URL, const char */ break; case HTTP_NEED_AUTH: - if (need_auth) { + if (server_challenges.valid) { /* * We already sent out authorization code, * so there's nothing more we can do. @@ -978,13 +1701,18 @@ http_request(struct url *URL, const char fetch_info("server requires authorization"); break; case HTTP_NEED_PROXY_AUTH: - /* - * If we're talking to a proxy, we already sent - * our proxy authorization code, so there's - * nothing more we can do. - */ - http_seterr(conn->err); - goto ouch; + if (proxy_challenges.valid) { + /* + * We already sent our proxy + * authorization code, so there's + * nothing more we can do. */ + http_seterr(conn->err); + goto ouch; + } + /* try again, but send the password this time */ + if (verbose) + fetch_info("proxy requires authorization"); + break; case HTTP_BAD_RANGE: /* * This can happen if we ask for 0 bytes because @@ -1004,9 +1732,13 @@ http_request(struct url *URL, const char /* fall through so we can get the full error message */ } - /* get headers */ + /* get headers. http_next_header expects one line readahead */ + if (fetch_getln(conn) == -1) { + fetch_syserr(); + goto ouch; + } do { - switch ((h = http_next_header(conn, &p))) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 11:42:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B409A106566C; Tue, 19 Jan 2010 11:42:16 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3C008FC17; Tue, 19 Jan 2010 11:42:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JBgGfP076968; Tue, 19 Jan 2010 11:42:16 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JBgGbq076967; Tue, 19 Jan 2010 11:42:16 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201001191142.o0JBgGbq076967@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 19 Jan 2010 11:42:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202614 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 11:42:16 -0000 Author: ru Date: Tue Jan 19 11:42:15 2010 New Revision: 202614 URL: http://svn.freebsd.org/changeset/base/202614 Log: Removed NO_UNDEF. Nudged by: trasz Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Jan 19 10:19:55 2010 (r202613) +++ head/sys/conf/kern.mk Tue Jan 19 11:42:15 2010 (r202614) @@ -12,10 +12,7 @@ CWARNFLAGS= .else CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - ${_wundef} -Wno-pointer-sign -fformat-extensions -.if !defined(NO_UNDEF) -_wundef= -Wundef -.endif + -Wundef -Wno-pointer-sign -fformat-extensions .endif # # The following flags are next up for working on: From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 13:31:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5ECE410656B5; Tue, 19 Jan 2010 13:31:58 +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 ABEC78FC08; Tue, 19 Jan 2010 13:31:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JDVvrZ003211; Tue, 19 Jan 2010 13:31:57 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JDVvOH003209; Tue, 19 Jan 2010 13:31:57 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201001191331.o0JDVvOH003209@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 19 Jan 2010 13:31:57 +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: r202623 - head/lib/libfetch X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 13:31:58 -0000 Author: des Date: Tue Jan 19 13:31:57 2010 New Revision: 202623 URL: http://svn.freebsd.org/changeset/base/202623 Log: Add missing DPADD and fix whitespace. Submitted by: ru Modified: head/lib/libfetch/Makefile Modified: head/lib/libfetch/Makefile ============================================================================== --- head/lib/libfetch/Makefile Tue Jan 19 13:27:54 2010 (r202622) +++ head/lib/libfetch/Makefile Tue Jan 19 13:31:57 2010 (r202623) @@ -16,10 +16,11 @@ CFLAGS+= -DINET6 .if ${MK_OPENSSL} != "no" CFLAGS+= -DWITH_SSL -DPADD= ${LIBSSL} ${LIBCRYPTO} +DPADD= ${LIBSSL} ${LIBCRYPTO} ${LIBMD} LDADD= -lssl -lcrypto -lmd .else -LDADD= -lmd +DPADD= ${LIBMD} +LDADD= -lmd .endif CFLAGS+= -DFTP_COMBINE_CWDS From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 14:42:12 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8D4E106566B; Tue, 19 Jan 2010 14:42:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 5BF4C8FC17; Tue, 19 Jan 2010 14:42:11 +0000 (UTC) Received: from c220-239-227-214.carlnfd1.nsw.optusnet.com.au (c220-239-227-214.carlnfd1.nsw.optusnet.com.au [220.239.227.214]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0JEg8Gk004687 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Jan 2010 01:42:10 +1100 Date: Wed, 20 Jan 2010 01:42:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "Andrey A. Chernov" In-Reply-To: <201001181344.o0IDiiEL079037@svn.freebsd.org> Message-ID: <20100120012639.B67517@delplex.bde.org> References: <201001181344.o0IDiiEL079037@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: r202572 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 14:42:12 -0000 On Mon, 18 Jan 2010, Andrey A. Chernov wrote: > Log: > Double checking my commit I found that comment saying that > POSIX 2008 and XSI 7require strcoll() for opendir() is not true. > I can't find such requirement in POSIX 2008 and XSI 7. The comment was correct. It says that POSIX requires strcoll() for alphasort(), not for opendir(). Since opendir() is not alphasort(), and it wants plain ASCII sorting to support union file systems, it intentionally doesn't use either alphasort() or strcoll(). > So, back out that part of my commit, returning old strcmp(), and remove > this misleading comment. > > Modified: > head/lib/libc/gen/opendir.c > > Modified: head/lib/libc/gen/opendir.c > ============================================================================== > --- head/lib/libc/gen/opendir.c Mon Jan 18 13:38:45 2010 (r202571) > +++ head/lib/libc/gen/opendir.c Mon Jan 18 13:44:44 2010 (r202572) > @@ -92,15 +92,11 @@ __opendir2(const char *name, int flags) > return __opendir_common(fd, name, flags); > } > > -/* > - * POSIX 2008 and XSI 7 require alphasort() to call strcoll() for > - * directory entries ordering. > - */ Was correct, but it could have been clearer by saying ", so opendir() uses this comparison function instead of alphasort()". > static int > -opendir_alphasort(const void *p1, const void *p2) > +opendir_sort(const void *p1, const void *p2) I forget what the old name was. Having alphasort in the name here was wrong 3 layers deep, since this is not alphasort(), and alphasort() is not an alpha sorting function -- it is a lexicographically-on-the-whole- character-set comparison function. fts's internal comparison function is named correctly -- fts_compar. > { > > - return (strcoll((*(const struct dirent **)p1)->d_name, > + return (strcmp((*(const struct dirent **)p1)->d_name, > (*(const struct dirent **)p2)->d_name)); Now correct (was broken by previous commit). > } > > @@ -253,7 +249,7 @@ __opendir_common(int fd, const char *nam > * This sort must be stable. > */ > mergesort(dpv, n, sizeof(*dpv), > - opendir_alphasort); > + opendir_sort); Correct modulo the name. > > dpv[n] = NULL; > xp = NULL; > New bug in a comment in scandir(): now has an extra blank line, due to partial removal. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 15:31:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DCE21065679; Tue, 19 Jan 2010 15:31:18 +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 634AA8FC15; Tue, 19 Jan 2010 15:31:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JFVIRp029722; Tue, 19 Jan 2010 15:31:18 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JFVI6n029716; Tue, 19 Jan 2010 15:31:18 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001191531.o0JFVI6n029716@svn.freebsd.org> From: Ed Schouten Date: Tue, 19 Jan 2010 15:31:18 +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: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 15:31:18 -0000 Author: ed Date: Tue Jan 19 15:31:18 2010 New Revision: 202628 URL: http://svn.freebsd.org/changeset/base/202628 Log: Recommit r193732: Remove __gnu89_inline. Now that we use C99 almost everywhere, just use C99-style in the pmap code. Since the pmap code is the only consumer of __gnu89_inline, remove it from cdefs.h as well. Because the flag was only introduced 17 months ago, I don't expect any problems. Reviewed by: alc It was backed out, because it prevented us from building kernels using a 7.x compiler. Now that most people use 8.x, there is nothing that holds us back. Even if people run 7.x, they should be able to build a kernel if they run `make kernel-toolchain' or `make buildworld' first. Modified: head/Makefile head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/sys/cdefs.h Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jan 19 14:45:58 2010 (r202627) +++ head/Makefile Tue Jan 19 15:31:18 2010 (r202628) @@ -303,7 +303,7 @@ universe_${target}: .if !defined(MAKE_JUST_KERNELS) @echo ">> ${target} started on `LC_ALL=C date`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ - ${MAKE} ${JFLAG} buildworld \ + ${MAKE} ${JFLAG} kernel-toolchain \ TARGET=${target} \ > _.${target}.buildworld 2>&1 || \ (echo "${target} world failed," \ Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Jan 19 14:45:58 2010 (r202627) +++ head/sys/amd64/amd64/pmap.c Tue Jan 19 15:31:18 2010 (r202628) @@ -153,7 +153,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(DIAGNOSTIC) -#define PMAP_INLINE __gnu89_inline +#define PMAP_INLINE extern inline #else #define PMAP_INLINE #endif Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Tue Jan 19 14:45:58 2010 (r202627) +++ head/sys/i386/i386/pmap.c Tue Jan 19 15:31:18 2010 (r202628) @@ -162,7 +162,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(DIAGNOSTIC) -#define PMAP_INLINE __gnu89_inline +#define PMAP_INLINE extern inline #else #define PMAP_INLINE #endif Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Tue Jan 19 14:45:58 2010 (r202627) +++ head/sys/i386/xen/pmap.c Tue Jan 19 15:31:18 2010 (r202628) @@ -173,7 +173,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(PMAP_DIAGNOSTIC) -#define PMAP_INLINE __gnu89_inline +#define PMAP_INLINE extern inline #else #define PMAP_INLINE #endif Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Tue Jan 19 14:45:58 2010 (r202627) +++ head/sys/sys/cdefs.h Tue Jan 19 15:31:18 2010 (r202628) @@ -234,12 +234,6 @@ #define __always_inline #endif -#if __GNUC_PREREQ__(4, 2) /* actually 4.1.3 */ -#define __gnu89_inline __attribute__((__gnu_inline__)) __inline -#else -#define __gnu89_inline -#endif - #if __GNUC_PREREQ__(3, 1) #define __noinline __attribute__ ((__noinline__)) #else From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 15:34:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2CB0106566C; Tue, 19 Jan 2010 15:34:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A37E08FC15; Tue, 19 Jan 2010 15:34:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JFYG45030443; Tue, 19 Jan 2010 15:34:16 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JFYGEs030441; Tue, 19 Jan 2010 15:34:16 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001191534.o0JFYGEs030441@svn.freebsd.org> From: Ed Schouten Date: Tue, 19 Jan 2010 15:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202629 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 15:34:16 -0000 Author: ed Date: Tue Jan 19 15:34:16 2010 New Revision: 202629 URL: http://svn.freebsd.org/changeset/base/202629 Log: Back out the change to Makefile made in r202628. It was just a local modification to build the i386 and amd64 more quickly. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jan 19 15:31:18 2010 (r202628) +++ head/Makefile Tue Jan 19 15:34:16 2010 (r202629) @@ -303,7 +303,7 @@ universe_${target}: .if !defined(MAKE_JUST_KERNELS) @echo ">> ${target} started on `LC_ALL=C date`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ - ${MAKE} ${JFLAG} kernel-toolchain \ + ${MAKE} ${JFLAG} buildworld \ TARGET=${target} \ > _.${target}.buildworld 2>&1 || \ (echo "${target} world failed," \ From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 15:57:01 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77CFE1065670; Tue, 19 Jan 2010 15:57:01 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 29FA78FC16; Tue, 19 Jan 2010 15:57:00 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o0JFuv9j043631; Tue, 19 Jan 2010 08:56:57 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Scott Long In-Reply-To: <201001191531.o0JFVI6n029716@svn.freebsd.org> Date: Tue, 19 Jan 2010 08:56:57 -0700 Content-Transfer-Encoding: 7bit Message-Id: <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> To: Ed Schouten X-Mailer: Apple Mail (2.1076) X-Spam-Status: No, score=-8.2 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 15:57:01 -0000 On Jan 19, 2010, at 8:31 AM, Ed Schouten wrote: > Author: ed > Date: Tue Jan 19 15:31:18 2010 > New Revision: 202628 > URL: http://svn.freebsd.org/changeset/base/202628 > > Log: > Recommit r193732: > > Remove __gnu89_inline. > > Now that we use C99 almost everywhere, just use C99-style in the > pmap > code. Since the pmap code is the only consumer of __gnu89_inline, > remove > it from cdefs.h as well. Because the flag was only introduced 17 > months > ago, I don't expect any problems. > > Reviewed by: alc > > It was backed out, because it prevented us from building kernels > using a > 7.x compiler. Now that most people use 8.x, there is nothing that > holds > us back. Even if people run 7.x, they should be able to build a > kernel > if they run `make kernel-toolchain' or `make buildworld' first. Ok, so you've broken a legitimate piece of compatibility. What's the gain? Scott From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 15:59:22 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00FB5106568D; Tue, 19 Jan 2010 15:59:22 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 989DB8FC17; Tue, 19 Jan 2010 15:59:21 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 4D00A1CDEE; Tue, 19 Jan 2010 16:59:20 +0100 (CET) Date: Tue, 19 Jan 2010 16:59:20 +0100 From: Ed Schouten To: Scott Long Message-ID: <20100119155920.GU64905@hoeg.nl> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AGgD4W3rQzQsN0LU" Content-Disposition: inline In-Reply-To: <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 15:59:22 -0000 --AGgD4W3rQzQsN0LU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Scott, * Scott Long wrote: > Ok, so you've broken a legitimate piece of compatibility. What's the > gain? That we no longer have a blend of GNU and ISO C inline throughout our entire source tree, making the code more accessible for alternative compilers. --=20 Ed Schouten WWW: http://80386.nl/ --AGgD4W3rQzQsN0LU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktV1tgACgkQ52SDGA2eCwWFcgCfQ5IXStaZrI1HdFfZ92UHGPTS mygAnix7IT1A3TRzEq4Wk2Px8qVfDJ3W =wrXg -----END PGP SIGNATURE----- --AGgD4W3rQzQsN0LU-- From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 16:27:43 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71CFE1065676; Tue, 19 Jan 2010 16:27:43 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 265778FC0A; Tue, 19 Jan 2010 16:27:42 +0000 (UTC) Received: from [IPv6:::1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id o0JGRZ0X043796; Tue, 19 Jan 2010 09:27:35 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Scott Long In-Reply-To: <20100119155920.GU64905@hoeg.nl> Date: Tue, 19 Jan 2010 09:27:34 -0700 Content-Transfer-Encoding: 7bit Message-Id: <02BD244A-E287-46E0-B6A4-B6643CA7BA2E@samsco.org> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> <20100119155920.GU64905@hoeg.nl> To: Ed Schouten X-Mailer: Apple Mail (2.1076) X-Spam-Status: No, score=-8.0 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 16:27:43 -0000 On Jan 19, 2010, at 8:59 AM, Ed Schouten wrote: > Hi Scott, > > * Scott Long wrote: >> Ok, so you've broken a legitimate piece of compatibility. What's the >> gain? > > That we no longer have a blend of GNU and ISO C inline throughout our > entire source tree, making the code more accessible for alternative > compilers. > Which compilers? Is this a requirement for CLANG? Or is it just a nice-to-have clean-up? Scott From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 16:30:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04DA0106568D; Tue, 19 Jan 2010 16:30:58 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8051B8FC17; Tue, 19 Jan 2010 16:30:56 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA26524; Tue, 19 Jan 2010 18:30:54 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4B55DE3E.6050504@freebsd.org> Date: Tue, 19 Jan 2010 18:30:54 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Ed Schouten References: <201001191531.o0JFVI6n029716@svn.freebsd.org> In-Reply-To: <201001191531.o0JFVI6n029716@svn.freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 16:30:58 -0000 on 19/01/2010 17:31 Ed Schouten said the following: > It was backed out, because it prevented us from building kernels using a > 7.x compiler. Ed, could you please clarify this part? It seems that we have the same compiler in 7/8/9. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 16:35:29 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3AA4106566B; Tue, 19 Jan 2010 16:35:29 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 782668FC13; Tue, 19 Jan 2010 16:35:29 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id E290C1CE5E; Tue, 19 Jan 2010 17:35:28 +0100 (CET) Date: Tue, 19 Jan 2010 17:35:28 +0100 From: Ed Schouten To: Scott Long Message-ID: <20100119163528.GV64905@hoeg.nl> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> <20100119155920.GU64905@hoeg.nl> <02BD244A-E287-46E0-B6A4-B6643CA7BA2E@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OEHaWX2QSImgzVur" Content-Disposition: inline In-Reply-To: <02BD244A-E287-46E0-B6A4-B6643CA7BA2E@samsco.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 16:35:30 -0000 --OEHaWX2QSImgzVur Content-Type: multipart/mixed; boundary="iWGX19zdMYUyUiWh" Content-Disposition: inline --iWGX19zdMYUyUiWh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Scott Long wrote: > Which compilers? Is this a requirement for CLANG? Or is it just a > nice-to-have clean-up? Clang's support for the gnu89 inline semantics works sometimes, while there have been many regressions over time where fixes related to the ISO C99 inlining broke the GNU semantics. I agreed with other people back in June last year that we should just commit this after releasing 8.0, since our policy has always been to support an upgrade from one major to another, not skipping one in between. If there are such strong feelings about this, we could just commit the attached patch, which brings us the best of both worlds. It uses the C99 keywords when compilers are intelligent enough to do so, but falls back to GNU-style inlining in cases where it has to do this. --=20 Ed Schouten WWW: http://80386.nl/ --iWGX19zdMYUyUiWh Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pmap.diff" Content-Transfer-Encoding: quoted-printable Index: sys/i386/i386/pmap.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/i386/i386/pmap.c (revision 202629) +++ sys/i386/i386/pmap.c (working copy) @@ -162,7 +162,11 @@ #endif =20 #if !defined(DIAGNOSTIC) +#ifdef __GNUC_GNU_INLINE__ +#define PMAP_INLINE inline +#else #define PMAP_INLINE extern inline +#endif #else #define PMAP_INLINE #endif Index: sys/i386/xen/pmap.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/i386/xen/pmap.c (revision 202629) +++ sys/i386/xen/pmap.c (working copy) @@ -173,7 +173,11 @@ #endif =20 #if !defined(PMAP_DIAGNOSTIC) +#ifdef __GNUC_GNU_INLINE__ +#define PMAP_INLINE inline +#else #define PMAP_INLINE extern inline +#endif #else #define PMAP_INLINE #endif Index: sys/amd64/amd64/pmap.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/amd64/amd64/pmap.c (revision 202629) +++ sys/amd64/amd64/pmap.c (working copy) @@ -153,7 +153,11 @@ #endif =20 #if !defined(DIAGNOSTIC) +#ifdef __GNUC_GNU_INLINE__ +#define PMAP_INLINE inline +#else #define PMAP_INLINE extern inline +#endif #else #define PMAP_INLINE #endif --iWGX19zdMYUyUiWh-- --OEHaWX2QSImgzVur Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktV31AACgkQ52SDGA2eCwVjJgCeIzBaF2qttF+X59RdalMz7iqY jw0AoIE1/YQ7efHHfb68B7hqLUJf5LSm =2uNG -----END PGP SIGNATURE----- --OEHaWX2QSImgzVur-- From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 16:37:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D5651065670; Tue, 19 Jan 2010 16:37:10 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 1540C8FC23; Tue, 19 Jan 2010 16:37:10 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 7F76E1CED6; Tue, 19 Jan 2010 17:37:09 +0100 (CET) Date: Tue, 19 Jan 2010 17:37:09 +0100 From: Ed Schouten To: Andriy Gapon Message-ID: <20100119163709.GW64905@hoeg.nl> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <4B55DE3E.6050504@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r0wErS0FX4g8JKWD" Content-Disposition: inline In-Reply-To: <4B55DE3E.6050504@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 16:37:10 -0000 --r0wErS0FX4g8JKWD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Andriy, * Andriy Gapon wrote: > could you please clarify this part? > It seems that we have the same compiler in 7/8/9. Well, not entirely. They do share the same version number, but back in March last year, das@ backported ISO C99 inlining from a GPLv2 licensed snapshot of GCC 4.2: http://svn.freebsd.org/viewvc/base?view=3Drevision&revision=3D189824 This patch has never been merged back to 7.x. --=20 Ed Schouten WWW: http://80386.nl/ --r0wErS0FX4g8JKWD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktV37UACgkQ52SDGA2eCwUdawCfc0LvDXDNvgiU0YlbqXJNEBbu zj0An1x2tqujg+m+wN40iZNX3S7tuMom =1EJs -----END PGP SIGNATURE----- --r0wErS0FX4g8JKWD-- From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 16:42:55 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70417106566C; Tue, 19 Jan 2010 16:42:55 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 2F69E8FC1F; Tue, 19 Jan 2010 16:42:54 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 3C6D31FFC22; Tue, 19 Jan 2010 16:42:54 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 17EE8844BD; Tue, 19 Jan 2010 17:42:54 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Scott Long References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> Date: Tue, 19 Jan 2010 17:42:54 +0100 In-Reply-To: <9FF943CE-9FCB-48C8-A048-23F23620F4E5@samsco.org> (Scott Long's message of "Tue, 19 Jan 2010 08:56:57 -0700") Message-ID: <863a22dp0x.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ed Schouten Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 16:42:55 -0000 Scott Long writes: > Ok, so you've broken a legitimate piece of compatibility. What's the > gain? GCC had inline functions long before they were added to the C standard. Inline functions were introduced in C99 with different semantics (and believe me, that was not a gratuitous decision). We use C99 semantics throughout the kernel, except in the pmap code, which Ed just modified, where we use GCC semantics. This means that in order to compile FreeBSD with a different compiler, that compiler must not only support both C99 and GCC semantics, but it must also support GCC's syntax - or something close to it - for specifying, on a per-function basis, which semantics apply. I say "on a per-function basis" because there are places in the kernel where pmap headers are included alongside headers that use C99 semantics, so you can't select inline semantics on a per-compilation- unit basis. To add insult to injury, GCC's syntax for specifying the precise manner in which GCC should violate the standard violates the standard... I haven't checked, but I believe that we can still build 8 / 9 kernels on 7 as long as we have a cross toolchain available (i.e. make buildworld, make toolchain or make kernel-toolchain before make buildkernel), so this really isn't a big issue. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 17:01:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F2C3106566B; Tue, 19 Jan 2010 17:01:48 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0C4AD8FC0C; Tue, 19 Jan 2010 17:01:46 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA26907; Tue, 19 Jan 2010 19:01:44 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4B55E577.10105@freebsd.org> Date: Tue, 19 Jan 2010 19:01:43 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Ed Schouten References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <4B55DE3E.6050504@freebsd.org> <20100119163709.GW64905@hoeg.nl> In-Reply-To: <20100119163709.GW64905@hoeg.nl> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 17:01:48 -0000 on 19/01/2010 18:37 Ed Schouten said the following: > Hi Andriy, > > * Andriy Gapon wrote: >> could you please clarify this part? >> It seems that we have the same compiler in 7/8/9. > > Well, not entirely. They do share the same version number, but back in > March last year, das@ backported ISO C99 inlining from a GPLv2 licensed > snapshot of GCC 4.2: > > http://svn.freebsd.org/viewvc/base?view=revision&revision=189824 > > This patch has never been merged back to 7.x. So perhaps that should be done as well? -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 17:04:01 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D4D7106566B; Tue, 19 Jan 2010 17:04:01 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id C82E78FC0A; Tue, 19 Jan 2010 17:04:00 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 417451CE5E; Tue, 19 Jan 2010 18:04:00 +0100 (CET) Date: Tue, 19 Jan 2010 18:04:00 +0100 From: Ed Schouten To: Andriy Gapon Message-ID: <20100119170400.GY64905@hoeg.nl> References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <4B55DE3E.6050504@freebsd.org> <20100119163709.GW64905@hoeg.nl> <4B55E577.10105@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HccAQglVq4ohk2lm" Content-Disposition: inline In-Reply-To: <4B55E577.10105@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 17:04:01 -0000 --HccAQglVq4ohk2lm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Andriy Gapon wrote: > So perhaps that should be done as well? Well, I'd say it would be a useful thing to MFC, but I can't really judge how big the impact is, like whether it breaks anything in Ports. --=20 Ed Schouten WWW: http://80386.nl/ --HccAQglVq4ohk2lm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktV5gAACgkQ52SDGA2eCwXNPgCffGZTLYogfb172wgAsMEcX5eX sgUAnj/zNHbFxwS6p7hi+RL5GcDITiBE =OULS -----END PGP SIGNATURE----- --HccAQglVq4ohk2lm-- From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 17:13:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBE311065694; Tue, 19 Jan 2010 17:13:39 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id AF8EA8FC1B; Tue, 19 Jan 2010 17:13:38 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA27098; Tue, 19 Jan 2010 19:13:36 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <4B55E840.2010602@freebsd.org> Date: Tue, 19 Jan 2010 19:13:36 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20091206) MIME-Version: 1.0 To: Ed Schouten References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <4B55DE3E.6050504@freebsd.org> <20100119163709.GW64905@hoeg.nl> <4B55E577.10105@freebsd.org> <20100119170400.GY64905@hoeg.nl> In-Reply-To: <20100119170400.GY64905@hoeg.nl> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 17:13:40 -0000 on 19/01/2010 19:04 Ed Schouten said the following: > * Andriy Gapon wrote: >> So perhaps that should be done as well? > > Well, I'd say it would be a useful thing to MFC, but I can't really > judge how big the impact is, like whether it breaks anything in Ports. There should be some experience from back when it was originally committed. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 17:20:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C117E1065670; Tue, 19 Jan 2010 17:20:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF2C08FC14; Tue, 19 Jan 2010 17:20:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JHKYT7056556; Tue, 19 Jan 2010 17:20:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JHKYmh056541; Tue, 19 Jan 2010 17:20:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001191720.o0JHKYmh056541@svn.freebsd.org> From: John Baldwin Date: Tue, 19 Jan 2010 17:20:34 +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: r202634 - in head/sys: amd64/conf arm/conf conf i386/conf mips/conf pc98/conf powerpc/conf sparc64/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 17:20:34 -0000 Author: jhb Date: Tue Jan 19 17:20:34 2010 New Revision: 202634 URL: http://svn.freebsd.org/changeset/base/202634 Log: Move the examples for the 'hints' and 'env' keywords from various GENERIC kernel configs into NOTES. Reviewed by: imp Modified: head/sys/amd64/conf/GENERIC head/sys/amd64/conf/XENHVM head/sys/arm/conf/CRB head/sys/arm/conf/EP80219 head/sys/arm/conf/GUMSTIX head/sys/arm/conf/IQ31244 head/sys/arm/conf/SIMICS head/sys/arm/conf/SKYEYE head/sys/conf/NOTES head/sys/i386/conf/GENERIC head/sys/mips/conf/QEMU head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/sparc64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/amd64/conf/GENERIC Tue Jan 19 17:20:34 2010 (r202634) @@ -21,15 +21,6 @@ cpu HAMMER ident GENERIC -# To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" # Default places to look for devices. - -# Use the following to compile in values accessible to the kernel -# through getenv() (or kenv(1) in userland). The format of the file -# is 'variable=value', see kenv(1) -# -# env "GENERIC.env" - makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler Modified: head/sys/amd64/conf/XENHVM ============================================================================== --- head/sys/amd64/conf/XENHVM Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/amd64/conf/XENHVM Tue Jan 19 17:20:34 2010 (r202634) @@ -21,15 +21,6 @@ cpu HAMMER ident XENHVM -# To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" # Default places to look for devices. - -# Use the following to compile in values accessible to the kernel -# through getenv() (or kenv(1) in userland). The format of the file -# is 'variable=value', see kenv(1) -# -# env "GENERIC.env" - makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions MODULES_OVERRIDE="" Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/CRB Tue Jan 19 17:20:34 2010 (r202634) @@ -26,8 +26,6 @@ options KERNVIRTADDR=0xc0200000 # Used options COUNTS_PER_SEC=400000000 options STARTUP_PAGETABLE_ADDR=0x00000000 include "../xscale/i8134x/std.crb" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/EP80219 Tue Jan 19 17:20:34 2010 (r202634) @@ -26,8 +26,6 @@ options KERNVIRTADDR=0xc0200000 # Used options STARTUP_PAGETABLE_ADDR=0xa0000000 #options ARM32_NEW_VM_LAYOUT include "../xscale/i80321/std.ep80219" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/arm/conf/GUMSTIX ============================================================================== --- head/sys/arm/conf/GUMSTIX Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/GUMSTIX Tue Jan 19 17:20:34 2010 (r202634) @@ -32,8 +32,6 @@ options KERNVIRTADDR=0xc0200000 # Used options STARTUP_PAGETABLE_ADDR=0xa0000000 include "../xscale/pxa/std.pxa" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/IQ31244 Tue Jan 19 17:20:34 2010 (r202634) @@ -27,8 +27,6 @@ options LOADERRAMADDR=0x00000000 options STARTUP_PAGETABLE_ADDR=0xa0000000 include "../xscale/i80321/std.iq31244" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/arm/conf/SIMICS ============================================================================== --- head/sys/arm/conf/SIMICS Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/SIMICS Tue Jan 19 17:20:34 2010 (r202634) @@ -23,8 +23,6 @@ options KERNPHYSADDR=0xc0000000 options KERNVIRTADDR=0xc0000000 options PHYSADDR=0xc0000000 include "../sa11x0/std.sa11x0" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/arm/conf/SKYEYE ============================================================================== --- head/sys/arm/conf/SKYEYE Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/arm/conf/SKYEYE Tue Jan 19 17:20:34 2010 (r202634) @@ -24,8 +24,6 @@ options KERNPHYSADDR=0xc0000000 options KERNVIRTADDR=0xc0000000 options PHYSADDR=0xc0000000 include "../at91/std.kb920x" -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/conf/NOTES Tue Jan 19 17:20:34 2010 (r202634) @@ -50,6 +50,15 @@ ident LINT # maxusers 10 +# To statically compile in device wiring instead of /boot/device.hints +#hints "LINT.hints" # Default places to look for devices. + +# Use the following to compile in values accessible to the kernel +# through getenv() (or kenv(1) in userland). The format of the file +# is 'variable=value', see kenv(1) +# +#env "LINT.env" + # # The `makeoptions' parameter allows variables to be passed to the # generated Makefile in the build area. Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/i386/conf/GENERIC Tue Jan 19 17:20:34 2010 (r202634) @@ -23,15 +23,6 @@ cpu I586_CPU cpu I686_CPU ident GENERIC -# To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" # Default places to look for devices. - -# Use the following to compile in values accessible to the kernel -# through getenv() (or kenv(1) in userland). The format of the file -# is 'variable=value', see kenv(1) -# -# env "GENERIC.env" - makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler Modified: head/sys/mips/conf/QEMU ============================================================================== --- head/sys/mips/conf/QEMU Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/mips/conf/QEMU Tue Jan 19 17:20:34 2010 (r202634) @@ -30,8 +30,6 @@ makeoptions MODULES_OVERRIDE="" options KERNVIRTADDR=0x80100000 include "../adm5120/std.adm5120" -#hints "GENERIC.hints" #Default places to look for devices. - makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options DDB Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/pc98/conf/GENERIC Tue Jan 19 17:20:34 2010 (r202634) @@ -23,15 +23,6 @@ cpu I586_CPU cpu I686_CPU ident GENERIC -# To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" # Default places to look for devices. - -# Use the following to compile in values accessible to the kernel -# through getenv() (or kenv(1) in userland). The format of the file -# is 'variable=value', see kenv(1) -# -# env "GENERIC.env" - makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_4BSD # 4BSD scheduler Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/powerpc/conf/GENERIC Tue Jan 19 17:20:34 2010 (r202634) @@ -21,9 +21,6 @@ cpu AIM ident GENERIC -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" - makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols # Platform support Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Tue Jan 19 17:10:34 2010 (r202633) +++ head/sys/sparc64/conf/GENERIC Tue Jan 19 17:20:34 2010 (r202634) @@ -21,15 +21,6 @@ cpu SUN4U ident GENERIC -# To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" # Default places to look for devices. - -# Use the following to compile in values accessible to the kernel -# through getenv() (or kenv(1) in userland). The format of the file -# is 'variable=value', see kenv(1) -# -# env "GENERIC.env" - makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols # Platforms supported From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 18:13:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 896C01065694; Tue, 19 Jan 2010 18:13:54 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77D3D8FC0A; Tue, 19 Jan 2010 18:13:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JIDshs068345; Tue, 19 Jan 2010 18:13:54 GMT (envelope-from fanf@svn.freebsd.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JIDsPs068342; Tue, 19 Jan 2010 18:13:54 GMT (envelope-from fanf@svn.freebsd.org) Message-Id: <201001191813.o0JIDsPs068342@svn.freebsd.org> From: Tony Finch Date: Tue, 19 Jan 2010 18:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202635 - head/usr.bin/unifdef X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 18:13:54 -0000 Author: fanf Date: Tue Jan 19 18:13:54 2010 New Revision: 202635 URL: http://svn.freebsd.org/changeset/base/202635 Log: Add a -o outfile option, which can be used to specify an output file. The file can safely be the same as the input file. Idea from IRIX unifdef(1). This version fixes a bug in the NetBSD unifdef which refuses to write to a -o outfile which does not exist. Obtained from: NetBSD Modified: head/usr.bin/unifdef/unifdef.1 head/usr.bin/unifdef/unifdef.c Modified: head/usr.bin/unifdef/unifdef.1 ============================================================================== --- head/usr.bin/unifdef/unifdef.1 Tue Jan 19 17:20:34 2010 (r202634) +++ head/usr.bin/unifdef/unifdef.1 Tue Jan 19 18:13:54 2010 (r202635) @@ -1,6 +1,6 @@ .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. -.\" Copyright (c) 2002 - 2009 Tony Finch . All rights reserved. +.\" Copyright (c) 2002 - 2010 Tony Finch . All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Dave Yost. It was rewritten to support ANSI C by Tony Finch. @@ -30,10 +30,10 @@ .\" SUCH DAMAGE. .\" .\" @(#)unifdef.1 8.2 (Berkeley) 4/1/94 -.\" $dotat: unifdef/unifdef.1,v 1.60 2009/11/25 00:11:02 fanf2 Exp $ +.\" $dotat: unifdef/unifdef.1,v 1.62 2010/01/19 17:33:53 fanf2 Exp $ .\" $FreeBSD$ .\" -.Dd September 24, 2002 +.Dd January 19, 2010 .Dt UNIFDEF 1 .Os .Sh NAME @@ -48,7 +48,8 @@ .Op Fl iD Ns Ar sym Ns Op = Ns Ar val .Op Fl iU Ns Ar sym .Ar ... -.Op Ar file +.Op Fl o Ar outfile +.Op Ar infile .Nm unifdefall .Op Fl I Ns Ar path .Ar ... @@ -254,6 +255,18 @@ directives to the output following any d so that errors produced when compiling the output file correspond to line numbers in the input file. .Pp +.It Fl o Ar outfile +Write output to the file +.Ar outfile +instead of the standard output. +If +.Ar outfile +is the same as the input file, +the output is written to a temporary file +which is renamed into place when +.Nm +completes successfully. +.Pp .It Fl s Instead of processing the input file as usual, this option causes Modified: head/usr.bin/unifdef/unifdef.c ============================================================================== --- head/usr.bin/unifdef/unifdef.c Tue Jan 19 17:20:34 2010 (r202634) +++ head/usr.bin/unifdef/unifdef.c Tue Jan 19 18:13:54 2010 (r202635) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 - 2009 Tony Finch + * Copyright (c) 2002 - 2010 Tony Finch * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,27 +24,14 @@ */ /* + * unifdef - remove ifdef'ed lines + * * This code was derived from software contributed to Berkeley by Dave Yost. * It was rewritten to support ANSI C by Tony Finch. The original version * of unifdef carried the 4-clause BSD copyright licence. None of its code * remains in this version (though some of the names remain) so it now * carries a more liberal licence. * - * The latest version is available from http://dotat.at/prog/unifdef - */ - -#include - -#ifdef __IDSTRING -__IDSTRING(dotat, "$dotat: unifdef/unifdef.c,v 1.190 2009/11/27 17:21:26 fanf2 Exp $"); -#endif -#ifdef __FBSDID -__FBSDID("$FreeBSD$"); -#endif - -/* - * unifdef - remove ifdef'ed lines - * * Wishlist: * provide an option which will append the name of the * appropriate symbol after #else's and #endif's @@ -56,8 +43,12 @@ __FBSDID("$FreeBSD$"); * also make it possible to handle all "dodgy" directives correctly. */ +#include +#include + #include #include +#include #include #include #include @@ -65,6 +56,13 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef __IDSTRING +__IDSTRING(dotat, "$dotat: unifdef/unifdef.c,v 1.193 2010/01/19 18:03:02 fanf2 Exp $"); +#endif +#ifdef __FBSDID +__FBSDID("$FreeBSD$"); +#endif + /* types of input lines: */ typedef enum { LT_TRUEI, /* a true #if with ignore flag */ @@ -157,6 +155,11 @@ static char const * const linestate_name #define EDITSLOP 10 /* + * For temporary filenames + */ +#define TEMPLATE "unifdef.XXXXXX" + +/* * Globals. */ @@ -179,6 +182,10 @@ static int nsyms; /* numb static FILE *input; /* input file pointer */ static const char *filename; /* input file name */ static int linenum; /* current line number */ +static FILE *output; /* output file pointer */ +static const char *ofilename; /* output file name */ +static bool overwriting; /* output overwrites input */ +static char tempname[FILENAME_MAX]; /* used when overwriting */ static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */ static char *keyword; /* used for editing #elif's */ @@ -197,6 +204,7 @@ static bool constexpr; /* c static int exitstat; /* program exit status */ static void addsym(bool, bool, char *); +static void closeout(void); static void debug(const char *, ...); static void done(void); static void error(const char *); @@ -227,7 +235,7 @@ main(int argc, char *argv[]) { int opt; - while ((opt = getopt(argc, argv, "i:D:U:I:BbcdeKklnst")) != -1) + while ((opt = getopt(argc, argv, "i:D:U:I:o:BbcdeKklnst")) != -1) switch (opt) { case 'i': /* treat stuff controlled by these symbols as text */ /* @@ -277,6 +285,9 @@ main(int argc, char *argv[]) case 'n': /* add #line directive after deleted lines */ lnnum = true; break; + case 'o': /* output to a file */ + ofilename = optarg; + break; case 's': /* only output list of symbols that control #ifs */ symlist = true; break; @@ -301,6 +312,43 @@ main(int argc, char *argv[]) filename = "[stdin]"; input = stdin; } + if (ofilename == NULL) { + output = stdout; + } else { + struct stat ist, ost; + memset(&ist, 0, sizeof(ist)); + memset(&ost, 0, sizeof(ost)); + + if (fstat(fileno(input), &ist) != 0) + err(2, "can't fstat %s", filename); + if (stat(ofilename, &ost) != 0 && errno != ENOENT) + warn("can't stat %s", ofilename); + + overwriting = (ist.st_dev == ost.st_dev + && ist.st_ino == ost.st_ino); + if (overwriting) { + const char *dirsep; + int ofd; + + dirsep = strrchr(ofilename, '/'); + if (dirsep != NULL) + snprintf(tempname, sizeof(tempname), + "%.*s/" TEMPLATE, + dirsep - ofilename, ofilename); + else + strlcpy(tempname, TEMPLATE, sizeof(tempname)); + ofd = mkstemp(tempname); + if (ofd != -1) + output = fdopen(ofd, "w+"); + if (output == NULL) + err(2, "can't create temporary file"); + fchmod(ofd, ist.st_mode & ACCESSPERMS); + } else { + output = fopen(ofilename, "w"); + if (output == NULL) + err(2, "can't open %s", ofilename); + } + } process(); abort(); /* bug */ } @@ -435,13 +483,6 @@ static state_fn * const trans_table[IS_C * State machine utility functions */ static void -done(void) -{ - if (incomment) - error("EOF in comment"); - exit(exitstat); -} -static void ignoreoff(void) { if (depth == 0) @@ -498,13 +539,13 @@ flushline(bool keep) } else { if (lnnum && delcount > 0) printf("#line %d\n", linenum); - fputs(tline, stdout); + fputs(tline, output); delcount = 0; blankmax = blankcount = blankline ? blankcount + 1 : 0; } } else { if (lnblank) - putc('\n', stdout); + putc('\n', output); exitstat = 1; delcount += 1; blankcount = 0; @@ -533,6 +574,40 @@ process(void) } /* + * Flush the output and handle errors. + */ +static void +closeout(void) +{ + if (fclose(output) == EOF) { + warn("couldn't write to output"); + if (overwriting) { + unlink(tempname); + errx(2, "%s unchanged", filename); + } else { + exit(2); + } + } +} + +/* + * Clean up and exit. + */ +static void +done(void) +{ + if (incomment) + error("EOF in comment"); + closeout(); + if (overwriting && rename(tempname, filename) == -1) { + warn("couldn't rename temporary file"); + unlink(tempname); + errx(2, "%s unchanged", filename); + } + exit(exitstat); +} + +/* * Parse a line and determine its type. We keep the preprocessor line * parser state between calls in the global variable linestate, with * help from skipcomment(). @@ -1097,5 +1172,6 @@ error(const char *msg) else warnx("%s: %d: %s (#if line %d depth %d)", filename, linenum, msg, stifline[depth], depth); + closeout(); errx(2, "output may be truncated"); } From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 18:18:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BFE21065695; Tue, 19 Jan 2010 18:18:16 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D67E98FC08; Tue, 19 Jan 2010 18:18:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JIIFnH069345; Tue, 19 Jan 2010 18:18:15 GMT (envelope-from fanf@svn.freebsd.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JIIFbT069343; Tue, 19 Jan 2010 18:18:15 GMT (envelope-from fanf@svn.freebsd.org) Message-Id: <201001191818.o0JIIFbT069343@svn.freebsd.org> From: Tony Finch Date: Tue, 19 Jan 2010 18:18: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: r202636 - head/usr.bin/unifdef X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 18:18:16 -0000 Author: fanf Date: Tue Jan 19 18:18:15 2010 New Revision: 202636 URL: http://svn.freebsd.org/changeset/base/202636 Log: Sync unifdefall with upstream. It no longer relies entirely on $PATH to find unifdef, in order to support running the test suite before installing. Modified: head/usr.bin/unifdef/unifdefall.sh Modified: head/usr.bin/unifdef/unifdefall.sh ============================================================================== --- head/usr.bin/unifdef/unifdefall.sh Tue Jan 19 18:13:54 2010 (r202635) +++ head/usr.bin/unifdef/unifdefall.sh Tue Jan 19 18:18:15 2010 (r202636) @@ -2,7 +2,8 @@ # # unifdefall: remove all the #if's from a source file # -# Copyright (c) 2002 - 2009 Tony Finch . All rights reserved. +# Copyright (c) 2002 - 2010 Tony Finch +# Copyright (c) 2009 - 2010 Jonathan Nieder # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -25,19 +26,27 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $dotat: unifdef/unifdefall.sh,v 1.24 2009/11/26 12:54:39 fanf2 Exp $ +# $dotat: unifdef/unifdefall.sh,v 1.27 2010/01/19 16:09:50 fanf2 Exp $ # $FreeBSD$ set -e -basename=$(basename $0) +unifdef="$(dirname "$0")/unifdef" +if [ ! -e "$unifdef" ] +then + unifdef=unifdef +fi +# export to the final shell command +export unifdef + +basename=$(basename "$0") tmp=$(mktemp -d "${TMPDIR:-/tmp}/$basename.XXXXXXXXXX") || exit 2 trap 'rm -r "$tmp" || exit 1' EXIT export LC_ALL=C # list of all controlling macros -unifdef -s "$@" | sort | uniq >"$tmp/ctrl" +"$unifdef" -s "$@" | sort | uniq >"$tmp/ctrl" # list of all macro definitions cpp -dM "$@" | sort | sed 's/^#define //' >"$tmp/hashdefs" # list of defined macro names @@ -49,7 +58,7 @@ comm -12 "$tmp/ctrl" "$tmp/alldef" >"$tm # and converts them to unifdef command-line arguments sed 's|.*|s/^&\\(([^)]*)\\)\\{0,1\\} /-D&=/p|' <"$tmp/def" >"$tmp/script" # create the final unifdef command -{ echo unifdef -k \\ +{ echo '"$unifdef" -k \' # convert the controlling undefined macros to -U arguments sed 's/.*/-U& \\/' <"$tmp/undef" # convert the controlling defined macros to quoted -D arguments From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 18:45:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7C68106566C; Tue, 19 Jan 2010 18:45:29 +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 B6B188FC18; Tue, 19 Jan 2010 18:45:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JIjTUR075573; Tue, 19 Jan 2010 18:45:29 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JIjTXR075570; Tue, 19 Jan 2010 18:45:29 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001191845.o0JIjTXR075570@svn.freebsd.org> From: Xin LI Date: Tue, 19 Jan 2010 18:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202640 - head/contrib/netcat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 18:45:29 -0000 Author: delphij Date: Tue Jan 19 18:45:29 2010 New Revision: 202640 URL: http://svn.freebsd.org/changeset/base/202640 Log: Update to 4.6. Note: the -V option from OpenBSD is implemented using setfib(2) on FreeBSD. MFC after: 2 weeks Modified: head/contrib/netcat/nc.1 head/contrib/netcat/netcat.c Directory Properties: head/contrib/netcat/ (props changed) Modified: head/contrib/netcat/nc.1 ============================================================================== --- head/contrib/netcat/nc.1 Tue Jan 19 18:42:09 2010 (r202639) +++ head/contrib/netcat/nc.1 Tue Jan 19 18:45:29 2010 (r202640) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.48 2008/09/19 13:24:41 sobrado Exp $ +.\" $OpenBSD: nc.1,v 1.50 2009/06/05 06:47:12 jmc Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6 2008 +.Dd June 5 2009 .Dt NC 1 .Os .Sh NAME @@ -46,6 +46,7 @@ .Op Fl p Ar source_port .Op Fl s Ar source_ip_address .Op Fl T Ar ToS +.Op Fl V Ar fib .Op Fl w Ar timeout .Op Fl X Ar proxy_protocol .Oo Xo @@ -208,6 +209,9 @@ to script telnet sessions. Specifies to use Unix Domain Sockets. .It Fl u Use UDP instead of the default option of TCP. +.It Fl V Ar fib +Set the routing table (FIB). +The default is 0. .It Fl v Have .Nm @@ -449,6 +453,7 @@ if the proxy requires it: .Ex -std .Sh SEE ALSO .Xr cat 1 , +.Xr setfib 1 , .Xr ssh 1 , .Xr tcp 4 .Sh AUTHORS Modified: head/contrib/netcat/netcat.c ============================================================================== --- head/contrib/netcat/netcat.c Tue Jan 19 18:42:09 2010 (r202639) +++ head/contrib/netcat/netcat.c Tue Jan 19 18:45:29 2010 (r202640) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.92 2008/09/19 13:24:41 sobrado Exp $ */ +/* $OpenBSD: netcat.c,v 1.93 2009/06/05 00:18:10 claudio Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -94,6 +95,7 @@ int Iflag; /* TCP receive buffer siz int Oflag; /* TCP send buffer size */ int Sflag; /* TCP MD5 signature option */ int Tflag = -1; /* IP Type of Service */ +u_int rdomain; int timeout = -1; int family = AF_UNSPEC; @@ -124,6 +126,8 @@ int main(int argc, char *argv[]) { int ch, s, ret, socksv, ipsec_count; + int numfibs; + size_t intsize = sizeof(int); char *host, *uport; struct addrinfo hints; struct servent *sv; @@ -137,6 +141,7 @@ main(int argc, char *argv[]) { NULL, 0, NULL, 0 } }; + rdomain = 0; ret = 1; ipsec_count = 0; s = 0; @@ -146,7 +151,7 @@ main(int argc, char *argv[]) sv = NULL; while ((ch = getopt_long(argc, argv, - "46e:DEdhi:jklnoI:O:P:p:rSs:tT:Uuvw:X:x:z", + "46DdEe:hI:i:jklnO:oP:p:rSs:tT:UuV:vw:X:x:z", longopts, NULL)) != -1) { switch (ch) { case '4': @@ -229,6 +234,14 @@ main(int argc, char *argv[]) case 'u': uflag = 1; break; + case 'V': + if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) + errx(1, "Multiple FIBS not supported"); + rdomain = (unsigned int)strtonum(optarg, 0, + numfibs - 1, &errstr); + if (errstr) + errx(1, "FIB %s: %s", errstr, optarg); + break; case 'v': vflag = 1; break; @@ -550,6 +563,11 @@ remote_connect(const char *host, const c add_ipsec_policy(s, ipsec_policy[1]); #endif + if (rdomain) { + if (setfib(rdomain) == -1) + err(1, "setfib"); + } + /* Bind to a local port or source address if specified. */ if (sflag || pflag) { struct addrinfo ahints, *ares; @@ -620,6 +638,11 @@ local_listen(char *host, char *port, str res0->ai_protocol)) < 0) continue; + if (rdomain) { + if (setfib(rdomain) == -1) + err(1, "setfib"); + } + ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); if (ret == -1) err(1, NULL); @@ -930,6 +953,7 @@ help(void) \t-t Answer TELNET negotiation\n\ \t-U Use UNIX domain socket\n\ \t-u UDP mode\n\ + \t-V fib Specify alternate routing table (FIB)\n\ \t-v Verbose\n\ \t-w secs\t Timeout for connects and final net reads\n\ \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\ @@ -974,8 +998,8 @@ usage(int ret) "usage: nc [-46DdhklnorStUuvz] [-I length] [-i interval] [-O length]\n" #endif "\t [-P proxy_username] [-p source_port] [-s source_ip_address] [-T ToS]\n" - "\t [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] [hostname]\n" - "\t [port]\n"); + "\t [-V fib] [-w timeout] [-X proxy_protocol]\n" + "\t [-x proxy_address[:port]] [hostname] [port]\n"); if (ret) exit(1); } From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 19:53:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19ABF106568D; Tue, 19 Jan 2010 19:53:06 +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 08C368FC14; Tue, 19 Jan 2010 19:53:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JJr5YH090622; Tue, 19 Jan 2010 19:53:05 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JJr5Ko090620; Tue, 19 Jan 2010 19:53:05 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001191953.o0JJr5Ko090620@svn.freebsd.org> From: Ed Schouten Date: Tue, 19 Jan 2010 19:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202643 - head/usr.bin/last X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 19:53:06 -0000 Author: ed Date: Tue Jan 19 19:53:05 2010 New Revision: 202643 URL: http://svn.freebsd.org/changeset/base/202643 Log: Make last(1) display the full log file. I must have misread when I ported the original last(1) source code. Instead of only processing the last 1024 entries, it reads them in in chucks of 1024 entries at a time. Unfortunately we cannot walk through the log file in reverse order, which means we have to allocate a piece of memory to hold all the entries. Call realloc() for each 128 entries we read. Reported by: Andrzej Tobola Modified: head/usr.bin/last/last.c Modified: head/usr.bin/last/last.c ============================================================================== --- head/usr.bin/last/last.c Tue Jan 19 19:51:54 2010 (r202642) +++ head/usr.bin/last/last.c Tue Jan 19 19:53:05 2010 (r202643) @@ -196,8 +196,6 @@ main(int argc, char *argv[]) exit(0); } -#define MAXUTXENTRIES 1024 - /* * wtmp -- * read through the wtmp file @@ -205,9 +203,9 @@ main(int argc, char *argv[]) void wtmp(void) { - struct utmpx buf[MAXUTXENTRIES]; + struct utmpx *buf = NULL; struct utmpx *ut; - static unsigned int first = 0, amount = 0; + static unsigned int amount = 0; time_t t; char ct[80]; struct tm *tm; @@ -219,11 +217,12 @@ wtmp(void) if (setutxdb(UTXDB_LOG, file) != 0) err(1, "%s", file); while ((ut = getutxent()) != NULL) { - memcpy(&buf[(first + amount) % MAXUTXENTRIES], ut, sizeof *ut); - if (amount == MAXUTXENTRIES) - first++; - else - amount++; + if (amount % 128 == 0) { + buf = realloc(buf, (amount + 128) * sizeof *ut); + if (buf == NULL) + err(1, "realloc"); + } + memcpy(&buf[amount++], ut, sizeof *ut); if (t > ut->ut_tv.tv_sec) t = ut->ut_tv.tv_sec; } @@ -231,7 +230,7 @@ wtmp(void) /* Display them in reverse order. */ while (amount > 0) - doentry(&buf[(first + amount--) % MAXUTXENTRIES]); + doentry(&buf[--amount]); tm = localtime(&t); (void) strftime(ct, sizeof(ct), "\nwtmp begins %+\n", tm); From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 20:35:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B527106566B; Tue, 19 Jan 2010 20:35:44 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5D48FC15; Tue, 19 Jan 2010 20:35:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JKZiYK000509; Tue, 19 Jan 2010 20:35:44 GMT (envelope-from fanf@svn.freebsd.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JKZi31000507; Tue, 19 Jan 2010 20:35:44 GMT (envelope-from fanf@svn.freebsd.org) Message-Id: <201001192035.o0JKZi31000507@svn.freebsd.org> From: Tony Finch Date: Tue, 19 Jan 2010 20:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202649 - head/usr.bin/unifdef X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 20:35:44 -0000 Author: fanf Date: Tue Jan 19 20:35:44 2010 New Revision: 202649 URL: http://svn.freebsd.org/changeset/base/202649 Log: Fix portability to 64 bit platforms. printf("%.*s",i,s) expects an int not a ptrdiff_t Thanks to bf1783 (at) googlemail.com for the bug report. Modified: head/usr.bin/unifdef/unifdef.c Modified: head/usr.bin/unifdef/unifdef.c ============================================================================== --- head/usr.bin/unifdef/unifdef.c Tue Jan 19 20:19:52 2010 (r202648) +++ head/usr.bin/unifdef/unifdef.c Tue Jan 19 20:35:44 2010 (r202649) @@ -334,7 +334,7 @@ main(int argc, char *argv[]) if (dirsep != NULL) snprintf(tempname, sizeof(tempname), "%.*s/" TEMPLATE, - dirsep - ofilename, ofilename); + (int)(dirsep - ofilename), ofilename); else strlcpy(tempname, TEMPLATE, sizeof(tempname)); ofd = mkstemp(tempname); From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 20:36:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 908CB106566C; Tue, 19 Jan 2010 20:36:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C2BC8FC13; Tue, 19 Jan 2010 20:36:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JKaFpn000650; Tue, 19 Jan 2010 20:36:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JKaFmQ000648; Tue, 19 Jan 2010 20:36:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201001192036.o0JKaFmQ000648@svn.freebsd.org> From: John Baldwin Date: Tue, 19 Jan 2010 20:36: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: r202650 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 20:36:15 -0000 Author: jhb Date: Tue Jan 19 20:36:15 2010 New Revision: 202650 URL: http://svn.freebsd.org/changeset/base/202650 Log: Sort NDHASGIANT.9 link properly. Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Jan 19 20:35:44 2010 (r202649) +++ head/share/man/man9/Makefile Tue Jan 19 20:36:15 2010 (r202650) @@ -903,8 +903,8 @@ MLINKS+=mutex.9 mtx_assert.9 \ mutex.9 mtx_unlock_spin.9 \ mutex.9 mtx_unlock_spin_flags.9 MLINKS+=namei.9 NDFREE.9 \ - namei.9 NDINIT.9 \ - namei.9 NDHASGIANT.9 + namei.9 NDHASGIANT.9 \ + namei.9 NDINIT.9 MLINKS+=pbuf.9 getpbuf.9 \ pbuf.9 relpbuf.9 \ pbuf.9 trypbuf.9 From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 22:44:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1044A106566C; Tue, 19 Jan 2010 22:44:30 +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 F2D348FC15; Tue, 19 Jan 2010 22:44:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JMiTXc029298; Tue, 19 Jan 2010 22:44:29 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JMiTFl029296; Tue, 19 Jan 2010 22:44:29 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201001192244.o0JMiTFl029296@svn.freebsd.org> From: Christian Brueffer Date: Tue, 19 Jan 2010 22:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202659 - head/release/doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 22:44:30 -0000 Author: brueffer Date: Tue Jan 19 22:44:29 2010 New Revision: 202659 URL: http://svn.freebsd.org/changeset/base/202659 Log: We don't support isdn devices anymore (since May 2008). PR: 142970 Submitted by: Matthias Meyser MFC after: 1 week Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Jan 19 22:09:45 2010 (r202658) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Tue Jan 19 22:44:29 2010 (r202659) @@ -979,138 +979,6 @@ &hwlist.cm; - - ISDN Interfaces - - [&arch.i386;] AcerISDN P10 ISA PnP (experimental) - - [&arch.i386;] Asuscom ISDNlink 128K ISA - - [&arch.i386;] ASUSCOM P-IN100-ST-D (and other Winbond - W6692-based cards) - - [&arch.i386;] AVM - - - - A1 - - - - B1 ISA (tested with V2.0) - - - - B1 PCI (tested with V4.0) - - - - Fritz!Card classic - - - - Fritz!Card PnP - - - - Fritz!Card PCI - - - - Fritz!Card PCI, Version 2 - - - - T1 - - - - [&arch.i386;] Creatix - - - - ISDN-S0 - - - - ISDN-S0 P&P - - - - [&arch.i386;] Compaq Microcom 610 ISDN (Compaq series - PSB2222I) ISA PnP - - [&arch.i386;] Dr. Neuhaus Niccy Go@ and compatibles - - [&arch.i386;] Dynalink IS64PPH and IS64PPH+ - - [&arch.i386;] Eicon Diehl DIVA 2.0 and 2.02 - - [&arch.i386;] ELSA - - - - ELSA PCC-16 - - - - QuickStep 1000pro ISA - - - - MicroLink ISDN/PCI - - - - QuickStep 1000pro PCI - - - - [&arch.i386;] ITK ix1 Micro ( < V.3, non-PnP version - ) - - [&arch.i386;] Sedlbauer Win Speed - - [&arch.i386;] Siemens I-Surf 2.0 - - [&arch.i386;] TELEINT ISDN SPEED No.1 - (experimental) - - [&arch.i386;] Teles - - - - S0/8 - - - - S0/16 - - - - S0/16.3 - - - - S0/16.3 PnP - - - - 16.3c ISA PnP (experimental) - - - - Teles PCI-TJ - - - - [&arch.i386;] Traverse Technologies NETjet-S PCI - - [&arch.i386;] USRobotics Sportster ISDN TA intern - - [&arch.i386;] Winbond W6692 based PCI cards - - Serial Interfaces From owner-svn-src-head@FreeBSD.ORG Tue Jan 19 23:07:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 604D91065679; Tue, 19 Jan 2010 23:07:12 +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 4FCBC8FC13; Tue, 19 Jan 2010 23:07:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JN7Ce3034321; Tue, 19 Jan 2010 23:07:12 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JN7CKu034318; Tue, 19 Jan 2010 23:07:12 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001192307.o0JN7CKu034318@svn.freebsd.org> From: Ed Schouten Date: Tue, 19 Jan 2010 23:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202661 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 23:07:12 -0000 Author: ed Date: Tue Jan 19 23:07:12 2010 New Revision: 202661 URL: http://svn.freebsd.org/changeset/base/202661 Log: Revert r202447 by re-exposing the old uname(3) function. It makes hardly any sense to expose a symbol which should only be provided for binary compatibility, but it seems we don't have a lot of choice here. There are many autoconf scripts out there that try to create a binary that links against the old symbol to see whether uname(3) is present. These scripts fail to detect uname(3) now. It should be noted that the behaviour we implement is not against the standards: | The following shall be declared as a function and may also be defined | as a macro: | | int uname(struct utsname *); Modified: head/lib/libc/gen/Symbol.map head/lib/libc/gen/uname.c Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Tue Jan 19 23:03:08 2010 (r202660) +++ head/lib/libc/gen/Symbol.map Tue Jan 19 23:07:12 2010 (r202661) @@ -296,6 +296,7 @@ FBSD_1.0 { tcflow; ualarm; ulimit; + uname; unvis; strunvis; strunvisx; Modified: head/lib/libc/gen/uname.c ============================================================================== --- head/lib/libc/gen/uname.c Tue Jan 19 23:03:08 2010 (r202660) +++ head/lib/libc/gen/uname.c Tue Jan 19 23:07:12 2010 (r202661) @@ -33,15 +33,15 @@ static char sccsid[] = "From: @(#)uname. #include __FBSDID("$FreeBSD$"); +#define uname wrapped_uname #include #include #include #include +#undef uname int -__uname(struct utsname *name) +uname(struct utsname *name) { return __xuname(32, name); } - -__sym_compat(uname, __uname, FBSD_1.0); From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 00:23:26 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 403621065676; Wed, 20 Jan 2010 00:23:26 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id F24318FC14; Wed, 20 Jan 2010 00:23:25 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id o0K0NKo4032268; Tue, 19 Jan 2010 19:23:20 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id o0K0NJjd032267; Tue, 19 Jan 2010 19:23:19 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Tue, 19 Jan 2010 19:23:19 -0500 From: David Schultz To: Ed Schouten Message-ID: <20100120002319.GA31669@zim.MIT.EDU> Mail-Followup-To: Ed Schouten , Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201001191531.o0JFVI6n029716@svn.freebsd.org> <4B55DE3E.6050504@freebsd.org> <20100119163709.GW64905@hoeg.nl> <4B55E577.10105@freebsd.org> <20100119170400.GY64905@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100119170400.GY64905@hoeg.nl> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Andriy Gapon Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 00:23:26 -0000 __gnu89_inline was the only way to write a program with non-static inline functions that would compile and link both with older versions of gcc, and with newer versions of gcc in C99 mode. This is because gcc in 8.x (as well as Clang and gcc 4.3+ from ports) use C99 inline semantics in the c99 and gnu99 modes, whereas gcc in 7.x and earlier use the incompatible GNU semantics regardless of what mode you asked for. A small number of ports might use it, but more likely they just use --std=gnu89 or --std=gnu99 depending on which standard they were written to. I'm not sure whether __gnu89_inline ought to be removed from cdefs.h just yet, but if nobody uses it or cares about it, then I'm happy to burn this bridge. From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 00:36:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8556F106566B; Wed, 20 Jan 2010 00:36:07 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (lefty.soaustin.net [66.135.55.46]) by mx1.freebsd.org (Postfix) with ESMTP id 688A68FC08; Wed, 20 Jan 2010 00:36:07 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id B8FA98C092; Tue, 19 Jan 2010 18:17:40 -0600 (CST) Date: Tue, 19 Jan 2010 18:17:40 -0600 From: Mark Linimon To: Ed Schouten Message-ID: <20100120001740.GB27564@lonesome.com> References: <201001192307.o0JN7CKu034318@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001192307.o0JN7CKu034318@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202661 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 00:36:07 -0000 Thank you. mcl From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 01:07:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DEA91065679; Wed, 20 Jan 2010 01:07:39 +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 0D4388FC16; Wed, 20 Jan 2010 01:07:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K17clu061028; Wed, 20 Jan 2010 01:07:38 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K17cGj061025; Wed, 20 Jan 2010 01:07:38 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001200107.o0K17cGj061025@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 01:07:38 +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: r202668 - head/usr.sbin/newsyslog X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 01:07:39 -0000 Author: delphij Date: Wed Jan 20 01:07:38 2010 New Revision: 202668 URL: http://svn.freebsd.org/changeset/base/202668 Log: Add a new option, -P, which reverts newsyslog(8) to the old behavior, which stops to proceed further, as it is possible that processes which fails to create PID file get screwed by rotation. Requested by: stas MFC after: 2 weeks X-MFC with: r200806 Modified: head/usr.sbin/newsyslog/newsyslog.8 head/usr.sbin/newsyslog/newsyslog.c Modified: head/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.8 Wed Jan 20 00:54:51 2010 (r202667) +++ head/usr.sbin/newsyslog/newsyslog.8 Wed Jan 20 01:07:38 2010 (r202668) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd February 24, 2005 +.Dd January 19, 2010 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -25,7 +25,7 @@ .Nd maintain system log files to manageable sizes .Sh SYNOPSIS .Nm -.Op Fl CFNnrsv +.Op Fl CFNPnrsv .Op Fl R Ar tagname .Op Fl a Ar directory .Op Fl d Ar directory @@ -169,6 +169,10 @@ This option is intended to be used with or .Fl CC options when creating log files is the only objective. +.It Fl P +Prevent further action if we should send signal but the +.Dq pidfile +is empty or does not exist. .It Fl R Ar tagname Specify that .Nm Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Wed Jan 20 00:54:51 2010 (r202667) +++ head/usr.sbin/newsyslog/newsyslog.c Wed Jan 20 01:07:38 2010 (r202668) @@ -167,6 +167,7 @@ int needroot = 1; /* Root privs are nec int noaction = 0; /* Don't do anything, just show it */ int norotate = 0; /* Don't rotate */ int nosignal; /* Do not send any signals */ +int enforcepid = 0; /* If PID file does not exist or empty, do nothing */ int force = 0; /* Force the trim no matter what */ int rotatereq = 0; /* -R = Always rotate the file(s) as given */ /* on the command (this also requires */ @@ -580,7 +581,7 @@ parse_args(int argc, char **argv) *p = '\0'; /* Parse command line options. */ - while ((ch = getopt(argc, argv, "a:d:f:nrsvCD:FNR:")) != -1) + while ((ch = getopt(argc, argv, "a:d:f:nrsvCD:FNPR:")) != -1) switch (ch) { case 'a': archtodir++; @@ -624,6 +625,9 @@ parse_args(int argc, char **argv) case 'N': norotate++; break; + case 'P': + enforcepid++; + break; case 'R': rotatereq++; requestor = strdup(optarg); @@ -1779,7 +1783,7 @@ set_swpid(struct sigwork_entry *swork, c f = fopen(ent->pid_file, "r"); if (f == NULL) { - if (errno == ENOENT) { + if (errno == ENOENT && enforcepid == 0) { /* * Warn if the PID file doesn't exist, but do * not consider it an error. Most likely it @@ -1801,7 +1805,7 @@ set_swpid(struct sigwork_entry *swork, c * has terminated, so it should be safe to rotate any * log files that the process would have been using. */ - if (feof(f)) { + if (feof(f) && enforcepid == 0) { swork->sw_pidok = 1; warnx("pid file is empty: %s", ent->pid_file); } else From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 03:40:44 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09EA31065679; Wed, 20 Jan 2010 03:40:44 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECF5C8FC12; Wed, 20 Jan 2010 03:40:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K3ehcK095009; Wed, 20 Jan 2010 03:40:43 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K3ehsG095007; Wed, 20 Jan 2010 03:40:43 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001200340.o0K3ehsG095007@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 20 Jan 2010 03:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202671 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 03:40:44 -0000 Author: np Date: Wed Jan 20 03:40:43 2010 New Revision: 202671 URL: http://svn.freebsd.org/changeset/base/202671 Log: Fix for a cxgb(4) panic. cxgb_ioctl can be called by the IP and IPv6 layers with non-sleepable locks held. Don't (potentially) sleep in those situations. Modified: head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- head/sys/dev/cxgb/cxgb_adapter.h Wed Jan 20 01:14:54 2010 (r202670) +++ head/sys/dev/cxgb/cxgb_adapter.h Wed Jan 20 03:40:43 2010 (r202671) @@ -136,7 +136,6 @@ enum { }; #define IS_DOOMED(p) (p->flags & DOOMED) #define SET_DOOMED(p) do {p->flags |= DOOMED;} while (0) -#define DOOMED(p) (p->flags & DOOMED) #define IS_BUSY(sc) (sc->flags & CXGB_BUSY) #define SET_BUSY(sc) do {sc->flags |= CXGB_BUSY;} while (0) #define CLR_BUSY(sc) do {sc->flags &= ~CXGB_BUSY;} while (0) Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Wed Jan 20 01:14:54 2010 (r202670) +++ head/sys/dev/cxgb/cxgb_main.c Wed Jan 20 03:40:43 2010 (r202671) @@ -84,11 +84,9 @@ __FBSDID("$FreeBSD$"); static int cxgb_setup_interrupts(adapter_t *); static void cxgb_teardown_interrupts(adapter_t *); -static int cxgb_begin_op(struct port_info *, const char *); -static int cxgb_begin_detach(struct port_info *); -static int cxgb_end_op(struct port_info *); static void cxgb_init(void *); -static int cxgb_init_synchronized(struct port_info *); +static int cxgb_init_locked(struct port_info *); +static int cxgb_uninit_locked(struct port_info *); static int cxgb_uninit_synchronized(struct port_info *); static int cxgb_ioctl(struct ifnet *, unsigned long, caddr_t); static int cxgb_media_change(struct ifnet *); @@ -1109,7 +1107,14 @@ cxgb_port_detach(device_t dev) p = device_get_softc(dev); sc = p->adapter; - cxgb_begin_detach(p); + /* Tell cxgb_ioctl and if_init that the port is going away */ + ADAPTER_LOCK(sc); + SET_DOOMED(p); + wakeup(&sc->flags); + while (IS_BUSY(sc)) + mtx_sleep(&sc->flags, &sc->lock, 0, "cxgbdtch", 0); + SET_BUSY(sc); + ADAPTER_UNLOCK(sc); if (p->port_cdev != NULL) destroy_dev(p->port_cdev); @@ -1129,7 +1134,10 @@ cxgb_port_detach(device_t dev) if_free(p->ifp); p->ifp = NULL; - cxgb_end_op(p); + ADAPTER_LOCK(sc); + CLR_BUSY(sc); + wakeup_one(&sc->flags); + ADAPTER_UNLOCK(sc); return (0); } @@ -1684,12 +1692,13 @@ cxgb_up(struct adapter *sc) { int err = 0; - ADAPTER_LOCK_ASSERT_NOTOWNED(sc); KASSERT(sc->open_device_map == 0, ("%s: device(s) already open (%x)", __func__, sc->open_device_map)); if ((sc->flags & FULL_INIT_DONE) == 0) { + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); + if ((sc->flags & FW_UPTODATE) == 0) if ((err = upgrade_fw(sc))) goto out; @@ -1751,8 +1760,6 @@ out: static void cxgb_down(struct adapter *sc) { - ADAPTER_LOCK_ASSERT_NOTOWNED(sc); - t3_sge_stop(sc); t3_intr_disable(sc); } @@ -1763,8 +1770,6 @@ offload_open(struct port_info *pi) struct adapter *sc = pi->adapter; struct t3cdev *tdev = &sc->tdev; - ADAPTER_LOCK_ASSERT_NOTOWNED(sc); - setbit(&sc->open_device_map, OFFLOAD_DEVMAP_BIT); t3_tp_set_offload_mode(sc, 1); @@ -1799,120 +1804,55 @@ offload_close(struct t3cdev *tdev) } /* - * Begin a synchronized operation. If this call succeeds, it is guaranteed that - * no one will remove the port or its ifp from underneath the caller. Caller is - * also granted exclusive access to open_device_map. - * - * operation here means init, uninit, detach, and ioctl service. - * - * May fail. - * EINTR (ctrl-c pressed during ifconfig for example). - * ENXIO (port is about to detach - due to kldunload for example). + * if_init for cxgb ports. */ -int -cxgb_begin_op(struct port_info *p, const char *wmsg) +static void +cxgb_init(void *arg) { - int rc = 0; + struct port_info *p = arg; struct adapter *sc = p->adapter; ADAPTER_LOCK(sc); + cxgb_init_locked(p); /* releases adapter lock */ + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); +} + +static int +cxgb_init_locked(struct port_info *p) +{ + struct adapter *sc = p->adapter; + struct ifnet *ifp = p->ifp; + struct cmac *mac = &p->mac; + int i, rc = 0, may_sleep = 0; + + ADAPTER_LOCK_ASSERT_OWNED(sc); while (!IS_DOOMED(p) && IS_BUSY(sc)) { - if (mtx_sleep(&sc->flags, &sc->lock, PCATCH, wmsg, 0)) { + if (mtx_sleep(&sc->flags, &sc->lock, PCATCH, "cxgbinit", 0)) { rc = EINTR; goto done; } } - - if (IS_DOOMED(p)) + if (IS_DOOMED(p)) { rc = ENXIO; - else if (!IS_BUSY(sc)) - SET_BUSY(sc); - else { - KASSERT(0, ("%s: port %d, p->flags = %x , sc->flags = %x", - __func__, p->port_id, p->flags, sc->flags)); - rc = EDOOFUS; + goto done; } - -done: - ADAPTER_UNLOCK(sc); - return (rc); -} - -/* - * End a synchronized operation. Read comment block above cxgb_begin_op. - */ -int -cxgb_end_op(struct port_info *p) -{ - struct adapter *sc = p->adapter; - - ADAPTER_LOCK(sc); - KASSERT(IS_BUSY(sc), ("%s: not busy.", __func__)); - CLR_BUSY(sc); - wakeup_one(&sc->flags); - ADAPTER_UNLOCK(sc); - - return (0); -} - -/* - * Prepare for port detachment. Detach is a special kind of synchronized - * operation. Also read comment before cxgb_begin_op. - */ -static int -cxgb_begin_detach(struct port_info *p) -{ - struct adapter *sc = p->adapter; + KASSERT(!IS_BUSY(sc), ("%s: controller busy.", __func__)); /* - * Inform those waiting for this port that it is going to be destroyed - * and they should not continue further. (They'll return with ENXIO). + * The code that runs during one-time adapter initialization can sleep + * so it's important not to hold any locks across it. */ - ADAPTER_LOCK(sc); - SET_DOOMED(p); - wakeup(&sc->flags); - ADAPTER_UNLOCK(sc); + may_sleep = sc->flags & FULL_INIT_DONE ? 0 : 1; - /* - * Wait for in-progress operations. - */ - ADAPTER_LOCK(sc); - while (IS_BUSY(sc)) { - mtx_sleep(&sc->flags, &sc->lock, 0, "cxgbdtch", 0); + if (may_sleep) { + SET_BUSY(sc); + ADAPTER_UNLOCK(sc); } - SET_BUSY(sc); - ADAPTER_UNLOCK(sc); - - return (0); -} - -/* - * if_init for cxgb ports. - */ -static void -cxgb_init(void *arg) -{ - struct port_info *p = arg; - - if (cxgb_begin_op(p, "cxgbinit")) - return; - - cxgb_init_synchronized(p); - cxgb_end_op(p); -} - -static int -cxgb_init_synchronized(struct port_info *p) -{ - struct adapter *sc = p->adapter; - struct ifnet *ifp = p->ifp; - struct cmac *mac = &p->mac; - int i, rc; if (sc->open_device_map == 0) { if ((rc = cxgb_up(sc)) != 0) - return (rc); + goto done; if (is_offload(sc) && !ofld_disable && offload_open(p)) log(LOG_WARNING, @@ -1920,6 +1860,11 @@ cxgb_init_synchronized(struct port_info } PORT_LOCK(p); + if (isset(&sc->open_device_map, p->port_id) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) { + PORT_UNLOCK(p); + goto done; + } t3_port_intr_enable(sc, p->port_id); if (!mac->multiport) t3_mac_init(mac); @@ -1943,7 +1888,48 @@ cxgb_init_synchronized(struct port_info /* all ok */ setbit(&sc->open_device_map, p->port_id); - return (0); +done: + if (may_sleep) { + ADAPTER_LOCK(sc); + KASSERT(IS_BUSY(sc), ("%s: controller not busy.", __func__)); + CLR_BUSY(sc); + wakeup_one(&sc->flags); + } + ADAPTER_UNLOCK(sc); + return (rc); +} + +static int +cxgb_uninit_locked(struct port_info *p) +{ + struct adapter *sc = p->adapter; + int rc; + + ADAPTER_LOCK_ASSERT_OWNED(sc); + + while (!IS_DOOMED(p) && IS_BUSY(sc)) { + if (mtx_sleep(&sc->flags, &sc->lock, PCATCH, "cxgbunin", 0)) { + rc = EINTR; + goto done; + } + } + if (IS_DOOMED(p)) { + rc = ENXIO; + goto done; + } + KASSERT(!IS_BUSY(sc), ("%s: controller busy.", __func__)); + SET_BUSY(sc); + ADAPTER_UNLOCK(sc); + + rc = cxgb_uninit_synchronized(p); + + ADAPTER_LOCK(sc); + KASSERT(IS_BUSY(sc), ("%s: controller not busy.", __func__)); + CLR_BUSY(sc); + wakeup_one(&sc->flags); +done: + ADAPTER_UNLOCK(sc); + return (rc); } /* @@ -1956,6 +1942,11 @@ cxgb_uninit_synchronized(struct port_inf struct ifnet *ifp = pi->ifp; /* + * taskqueue_drain may cause a deadlock if the adapter lock is held. + */ + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); + + /* * Clear this port's bit from the open device map, and then drain all * the tasks that can access/manipulate this port's port_info or ifp. * We disable this port's interrupts here and so the the slow/ext @@ -2032,19 +2023,21 @@ static int cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) { struct port_info *p = ifp->if_softc; + struct adapter *sc = p->adapter; struct ifreq *ifr = (struct ifreq *)data; - int flags, error = 0, mtu, handle_unsynchronized = 0; + int flags, error = 0, mtu; uint32_t mask; - if ((error = cxgb_begin_op(p, "cxgbioct")) != 0) - return (error); - - /* - * Only commands that should be handled within begin-op/end-op are - * serviced in this switch statement. See handle_unsynchronized. - */ switch (command) { case SIOCSIFMTU: + ADAPTER_LOCK(sc); + error = IS_DOOMED(p) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0); + if (error) { +fail: + ADAPTER_UNLOCK(sc); + return (error); + } + mtu = ifr->ifr_mtu; if ((mtu < ETHERMIN) || (mtu > ETHERMTU_JUMBO)) { error = EINVAL; @@ -2054,35 +2047,57 @@ cxgb_ioctl(struct ifnet *ifp, unsigned l cxgb_update_mac_settings(p); PORT_UNLOCK(p); } - + ADAPTER_UNLOCK(sc); break; case SIOCSIFFLAGS: + ADAPTER_LOCK(sc); + if (IS_DOOMED(p)) { + error = ENXIO; + goto fail; + } if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { flags = p->if_flags; if (((ifp->if_flags ^ flags) & IFF_PROMISC) || ((ifp->if_flags ^ flags) & IFF_ALLMULTI)) { + if (IS_BUSY(sc)) { + error = EBUSY; + goto fail; + } PORT_LOCK(p); cxgb_update_mac_settings(p); PORT_UNLOCK(p); } + ADAPTER_UNLOCK(sc); } else - error = cxgb_init_synchronized(p); + error = cxgb_init_locked(p); p->if_flags = ifp->if_flags; } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) - error = cxgb_uninit_synchronized(p); - + error = cxgb_uninit_locked(p); + + ADAPTER_LOCK_ASSERT_NOTOWNED(sc); break; case SIOCADDMULTI: case SIOCDELMULTI: + ADAPTER_LOCK(sc); + error = IS_DOOMED(p) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0); + if (error) + goto fail; + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { PORT_LOCK(p); cxgb_update_mac_settings(p); PORT_UNLOCK(p); } + ADAPTER_UNLOCK(sc); break; case SIOCSIFCAP: + ADAPTER_LOCK(sc); + error = IS_DOOMED(p) ? ENXIO : (IS_BUSY(sc) ? EBUSY : 0); + if (error) + goto fail; + mask = ifr->ifr_reqcap ^ ifp->if_capenable; if (mask & IFCAP_TXCSUM) { if (IFCAP_TXCSUM & ifp->if_capenable) { @@ -2132,34 +2147,20 @@ cxgb_ioctl(struct ifnet *ifp, unsigned l PORT_UNLOCK(p); } } - if (mask & IFCAP_VLAN_HWCSUM) { + if (mask & IFCAP_VLAN_HWCSUM) ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; - } #ifdef VLAN_CAPABILITIES VLAN_CAPABILITIES(ifp); #endif + ADAPTER_UNLOCK(sc); break; - default: - handle_unsynchronized = 1; + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + error = ifmedia_ioctl(ifp, ifr, &p->media, command); break; - } - - /* - * We don't want to call anything outside the driver while inside a - * begin-op/end-op block. If it calls us back (eg. ether_ioctl may - * call cxgb_init) we may deadlock if the state is already marked busy. - * - * XXX: this probably opens a small race window with kldunload... - */ - cxgb_end_op(p); - - /* The IS_DOOMED check is racy, we're clutching at straws here */ - if (handle_unsynchronized && !IS_DOOMED(p)) { - if (command == SIOCSIFMEDIA || command == SIOCGIFMEDIA) - error = ifmedia_ioctl(ifp, ifr, &p->media, command); - else - error = ether_ioctl(ifp, command, data); + default: + error = ether_ioctl(ifp, command, data); } return (error); From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 05:45:56 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32472106566B; Wed, 20 Jan 2010 05:45:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id A20718FC14; Wed, 20 Jan 2010 05:45:55 +0000 (UTC) Received: from c220-239-227-214.carlnfd1.nsw.optusnet.com.au (c220-239-227-214.carlnfd1.nsw.optusnet.com.au [220.239.227.214]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0K5jpMu000503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Jan 2010 16:45:52 +1100 Date: Wed, 20 Jan 2010 16:45:51 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Ed Schouten In-Reply-To: <201001192307.o0JN7CKu034318@svn.freebsd.org> Message-ID: <20100120163243.A68431@delplex.bde.org> References: <201001192307.o0JN7CKu034318@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: r202661 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 05:45:56 -0000 On Tue, 19 Jan 2010, Ed Schouten wrote: > Author: ed > Date: Tue Jan 19 23:07:12 2010 > New Revision: 202661 > URL: http://svn.freebsd.org/changeset/base/202661 > > Log: > Revert r202447 by re-exposing the old uname(3) function. > > It makes hardly any sense to expose a symbol which should only be > provided for binary compatibility, but it seems we don't have a lot of > choice here. There are many autoconf scripts out there that try to > create a binary that links against the old symbol to see whether > uname(3) is present. These scripts fail to detect uname(3) now. > > It should be noted that the behaviour we implement is not against the > standards: Of course it is against standards. This is implicit for most functions, and the part of the standard that you quoted says it explicitly for uname(): > | The following shall be declared as a function and may also be defined ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ > | as a macro: > | > | int uname(struct utsname *); Examples of use of the function when it is also defined as a macro: /* Avoid any macro definition of the function when calling it. */ (uname)(namep); /* Take the address of uname in an obfuscated way. */ foo(uname); /* Take the address of uname in an unobfuscated way. */ foo(&uname); /* Try to debug uname. */ (gdb) b uname Function "uname" not defined... (gdb) #^#^^^@* someone defined uname as a macro :-(. #undef uname /* Now uname is not defined as a macro, though it may have been. */ uname(namep); Bruce From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 07:04:11 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B77B106566B; Wed, 20 Jan 2010 07:04:11 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id C30B88FC08; Wed, 20 Jan 2010 07:04:10 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id DA91D1CE54; Wed, 20 Jan 2010 08:04:09 +0100 (CET) Date: Wed, 20 Jan 2010 08:04:09 +0100 From: Ed Schouten To: Bruce Evans Message-ID: <20100120070409.GJ64905@hoeg.nl> References: <201001192307.o0JN7CKu034318@svn.freebsd.org> <20100120163243.A68431@delplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ab67L9H6qvgO+k5w" Content-Disposition: inline In-Reply-To: <20100120163243.A68431@delplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202661 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 07:04:11 -0000 --ab67L9H6qvgO+k5w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Bruce Evans wrote: > Of course it is against standards. This is implicit for most functions, > and the part of the standard that you quoted says it explicitly for > uname(): >=20 > > | The following shall be declared as a function and may also be defined > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ > > | as a macro: > > | > > | int uname(struct utsname *); >=20 > Examples of use of the function when it is also defined as a macro: >=20 > It turned out I slightly misinterpreted the sentence. It should declared as a function *and* may also be defined as a macro. When I read this at first, I interpreted the word "and" as an "or", which in my mind makes sense when you try to keep things simple. But yes, if uname wouldn't be provided as a real function, there are many constructs that could of course break. The most confusing part about this, is that the uname function we provide in libc doesn't match the one in , which uses 128 bytes instead of 32. Fortunately it's not possible to #undef the inline function, but it still sounds quite scary to me. --=20 Ed Schouten WWW: http://80386.nl/ --ab67L9H6qvgO+k5w Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktWqukACgkQ52SDGA2eCwVPhgCcCNfSxAbD8K/4tEGKtFMOnqss AhEAn2WYvmLQLnzyJQGgZcR9JRBuQ37Q =oFLc -----END PGP SIGNATURE----- --ab67L9H6qvgO+k5w-- From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 07:08:46 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91B351065670; Wed, 20 Jan 2010 07:08:46 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 0A5F08FC13; Wed, 20 Jan 2010 07:08:45 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0K78hX9046016; Wed, 20 Jan 2010 10:08:43 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1263971324; bh=EGShhDyr6nFFK38DjVFXSG35ZXPPbgxErZ8/s+KKRU4=; l=1340; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=GHfd2kb61ORTP1p2Q/kCwOrHfrUq0yWM+Y1lG3DG5OR2KcEafQqnAmv01qquUF359 xg9BNlHAx3w7rCbnnnMNJrMQSx8NkftSdW/AbiauPAAHIkEJpbUEaTYkONc0quxleC ORmwEbApi1E45Qbnp4sFJbHDNxc6QHkHPe5RoJnI= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0K78h43046015; Wed, 20 Jan 2010 10:08:43 +0300 (MSK) (envelope-from ache) Date: Wed, 20 Jan 2010 10:08:43 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20100120070843.GA45937@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100120012639.B67517@delplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r202572 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 07:08:46 -0000 On Wed, Jan 20, 2010 at 01:42:08AM +1100, Bruce Evans wrote: > The comment was correct. It says that POSIX requires strcoll() for > alphasort(), not for opendir(). Since opendir() is not alphasort(), > and it wants plain ASCII sorting to support union file systems, it > intentionally doesn't use either alphasort() or strcoll(). Yes, the comment _alone_ was correct, but its place - isn't. Along with function name containing _alphasort part it makes impression that opendir() uses this type of sort too. BTW, we already have the same correct comment but in the proper place in the scandir.c > Was correct, but it could have been clearer by saying ", so opendir() > uses this comparison function instead of alphasort()". "So", what? The two mentioned things are unrelated and can't be concatenated by "so". > I forget what the old name was. Having alphasort in the name here was > wrong 3 layers deep, since this is not alphasort(), and alphasort() is not > an alpha sorting function -- it is a lexicographically-on-the-whole- > character-set comparison function. Yes. > Correct modulo the name. What name you suggest, opendir_compar()? > New bug in a comment in scandir(): now has an extra blank line, due to > partial removal. Ok, will remove it a bit later. -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 07:27:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FDAE106566B; Wed, 20 Jan 2010 07:27:57 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3ECD88FC13; Wed, 20 Jan 2010 07:27:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K7RvVf045241; Wed, 20 Jan 2010 07:27:57 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K7Rvrf045239; Wed, 20 Jan 2010 07:27:57 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001200727.o0K7Rvrf045239@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 20 Jan 2010 07:27:57 +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: r202677 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 07:27:57 -0000 Author: ache Date: Wed Jan 20 07:27:56 2010 New Revision: 202677 URL: http://svn.freebsd.org/changeset/base/202677 Log: Style: remove extra empty line in the comment. Pointed by: bde Modified: head/lib/libc/gen/scandir.c Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Wed Jan 20 06:30:40 2010 (r202676) +++ head/lib/libc/gen/scandir.c Wed Jan 20 07:27:56 2010 (r202677) @@ -126,7 +126,6 @@ fail: /* * Alphabetic order comparison routine for those who want it. - * * POSIX 2008 requires the alphasort() to use strcoll(). */ int From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 07:28:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2550D1065740; Wed, 20 Jan 2010 07:28:15 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 146748FC19; Wed, 20 Jan 2010 07:28:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K7SEFs045349; Wed, 20 Jan 2010 07:28:14 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K7SE4S045347; Wed, 20 Jan 2010 07:28:14 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001200728.o0K7SE4S045347@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 20 Jan 2010 07:28: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: r202678 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 07:28:15 -0000 Author: np Date: Wed Jan 20 07:28:14 2010 New Revision: 202678 URL: http://svn.freebsd.org/changeset/base/202678 Log: Complain if freelist queue sizes are significantly less than desired. MFC after: 1 day Modified: head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Jan 20 07:27:56 2010 (r202677) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Jan 20 07:28:14 2010 (r202678) @@ -541,8 +541,12 @@ t3_sge_prep(adapter_t *adap, struct sge_ jumbo_q_size = min(nmbjumbo4/(3*nqsets), JUMBO_Q_SIZE); #endif while (!powerof2(jumbo_q_size)) - jumbo_q_size--; - + jumbo_q_size--; + + if (fl_q_size < (FL_Q_SIZE / 4) || jumbo_q_size < (JUMBO_Q_SIZE / 2)) + device_printf(adap->dev, + "Insufficient clusters and/or jumbo buffers.\n"); + /* XXX Does ETHER_ALIGN need to be accounted for here? */ p->max_pkt_size = adap->sge.qs[0].fl[1].buf_size - sizeof(struct cpl_rx_data); From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 07:36:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41590106566B; Wed, 20 Jan 2010 07:36:30 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3090F8FC12; Wed, 20 Jan 2010 07:36:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K7aUsX047249; Wed, 20 Jan 2010 07:36:30 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K7aUag047247; Wed, 20 Jan 2010 07:36:30 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001200736.o0K7aUag047247@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 20 Jan 2010 07:36:30 +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: r202679 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 07:36:30 -0000 Author: ache Date: Wed Jan 20 07:36:29 2010 New Revision: 202679 URL: http://svn.freebsd.org/changeset/base/202679 Log: Style: rename internal function to opendir_compar() Pointed by: bde Modified: head/lib/libc/gen/opendir.c Modified: head/lib/libc/gen/opendir.c ============================================================================== --- head/lib/libc/gen/opendir.c Wed Jan 20 07:28:14 2010 (r202678) +++ head/lib/libc/gen/opendir.c Wed Jan 20 07:36:29 2010 (r202679) @@ -93,7 +93,7 @@ __opendir2(const char *name, int flags) } static int -opendir_sort(const void *p1, const void *p2) +opendir_compar(const void *p1, const void *p2) { return (strcmp((*(const struct dirent **)p1)->d_name, @@ -249,7 +249,7 @@ __opendir_common(int fd, const char *nam * This sort must be stable. */ mergesort(dpv, n, sizeof(*dpv), - opendir_sort); + opendir_compar); dpv[n] = NULL; xp = NULL; From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 07:41:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C0A71065670; Wed, 20 Jan 2010 07:41:00 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 5237D8FC13; Wed, 20 Jan 2010 07:41:00 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C0CF61CE23; Wed, 20 Jan 2010 08:40:59 +0100 (CET) Date: Wed, 20 Jan 2010 08:40:59 +0100 From: Ed Schouten To: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100120074059.GM64905@hoeg.nl> References: <20100120002319.GA31669@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DeYurzQ2E3CmYRTV" Content-Disposition: inline In-Reply-To: <20100120002319.GA31669@zim.MIT.EDU> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r202628 - in head: . sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 07:41:00 -0000 --DeYurzQ2E3CmYRTV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * David Schultz wrote: > A small number of ports might use it, but more likely they just use > --std=3Dgnu89 or --std=3Dgnu99 depending on which standard they were > written to. I'm not sure whether __gnu89_inline ought to be removed > from cdefs.h just yet, but if nobody uses it or cares about it, then > I'm happy to burn this bridge. I guess it's very unlikely that this may cause any serious breakage. __gnu89_inline has only been part of one release, namely 8.0. --=20 Ed Schouten WWW: http://80386.nl/ --DeYurzQ2E3CmYRTV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktWs4sACgkQ52SDGA2eCwWAlACdFpmxGZegIrJfZB0dwg8io8kp UtMAn3Jm1cR/B2ffo+ZpdS99DvbbRWtF =rdTT -----END PGP SIGNATURE----- --DeYurzQ2E3CmYRTV-- From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 08:43:34 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7F1D106568D; Wed, 20 Jan 2010 08:43:34 +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 80DAD8FC24; Wed, 20 Jan 2010 08:43:34 +0000 (UTC) Received: from besplex.bde.org (c220-239-227-214.carlnfd1.nsw.optusnet.com.au [220.239.227.214]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0K8hTmQ021109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Jan 2010 19:43:32 +1100 Date: Wed, 20 Jan 2010 19:43:29 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov In-Reply-To: <20100120070843.GA45937@nagual.pp.ru> Message-ID: <20100120191752.Q2120@besplex.bde.org> References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> 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, Bruce Evans Subject: Re: svn commit: r202572 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 08:43:35 -0000 On Wed, 20 Jan 2010, Andrey Chernov wrote: > On Wed, Jan 20, 2010 at 01:42:08AM +1100, Bruce Evans wrote: >> The comment was correct. It says that POSIX requires strcoll() for >> alphasort(), not for opendir(). Since opendir() is not alphasort(), >> and it wants plain ASCII sorting to support union file systems, it >> intentionally doesn't use either alphasort() or strcoll(). > > Yes, the comment _alone_ was correct, but its place - isn't. Along with > function name containing _alphasort part it makes impression that > opendir() uses this type of sort too. No, it is a comment about opendir()'s comparison function. It has nothing to do with scandir(), and the only thing that it has to do with alphasort() is that it must be different for the reasons described. > BTW, we already have the same correct comment but in the proper place in > the scandir.c That one is quite different. It describes why alphasort() (now) uses strcoll(). It is because POSIX says so. This comment is relatively useless. It obviously uses strcoll(), and it is a POSIX interface so this would be surprising only if it conflicted with POSIX. The comment is there mainly for historical reasons, and history belongs in the man page more than here. BTW, I don't remember any man page updates for this. The man page still only says that alphasort() can be used to give alphabetical sorting in scandir(). >> Was correct, but it could have been clearer by saying ", so opendir() >> uses this comparison function instead of alphasort()". > > "So", what? The two mentioned things are unrelated and can't be > concatenated by "so". They are related. >> I forget what the old name was. Having alphasort in the name here was >> wrong 3 layers deep, since this is not alphasort(), and alphasort() is not >> an alpha sorting function -- it is a lexicographically-on-the-whole- >> character-set comparison function. > > Yes. > >> Correct modulo the name. > > What name you suggest, opendir_compar()? OK. >> New bug in a comment in scandir(): now has an extra blank line, due to >> partial removal. > > Ok, will remove it a bit later. I can't see this now (some illusion from my mailer or $TERMCAP misformatting the patch?), but now I see an extra "the" in it: "requires the alphasort() to use strcoll()" should be either "requires that alphasort() uses strcoll()" (preferred) or "requires alphasort() to use strcoll()" (probably intended, but not too passive). I thought that you removed this line completely. The previous line is even less useful. Bruce From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 09:29:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97983106566B; Wed, 20 Jan 2010 09:29:07 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87AC38FC13; Wed, 20 Jan 2010 09:29:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0K9T7WJ072169; Wed, 20 Jan 2010 09:29:07 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0K9T7m0072167; Wed, 20 Jan 2010 09:29:07 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201001200929.o0K9T7m0072167@svn.freebsd.org> From: Hiroki Sato Date: Wed, 20 Jan 2010 09:29: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: r202686 - head/usr.sbin/ypserv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 09:29:07 -0000 Author: hrs Date: Wed Jan 20 09:29:07 2010 New Revision: 202686 URL: http://svn.freebsd.org/changeset/base/202686 Log: Try a privileged port for binding whenever possible because the ypbind daemon requires the ypserv daemon is running on a privileged port. Reported by: Andrzej Tobola Modified: head/usr.sbin/ypserv/yp_main.c Modified: head/usr.sbin/ypserv/yp_main.c ============================================================================== --- head/usr.sbin/ypserv/yp_main.c Wed Jan 20 09:26:28 2010 (r202685) +++ head/usr.sbin/ypserv/yp_main.c Wed Jan 20 09:29:07 2010 (r202686) @@ -303,13 +303,18 @@ create_service(const int sock, const str freeaddrinfo(res0); return -1; } - if (bind(s, res->ai_addr, - res->ai_addrlen) == -1) { - _msgout("cannot bind %s socket: %s", - nconf->nc_netid, strerror(errno)); - freeaddrinfo(res0); - close(sock); - return -1; + if (bindresvport_sa(s, res->ai_addr) == -1) { + if ((errno != EPERM) || + (bind(s, res->ai_addr, + res->ai_addrlen) == -1)) { + _msgout("cannot bind " + "%s socket: %s", + nconf->nc_netid, + strerror(errno)); + freeaddrinfo(res0); + close(sock); + return -1; + } } if (nconf->nc_semantics != NC_TPI_CLTS) listen(s, SOMAXCONN); From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 09:46:33 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F23F106566C; Wed, 20 Jan 2010 09:46:33 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id F12948FC15; Wed, 20 Jan 2010 09:46:32 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0K9kU34053414; Wed, 20 Jan 2010 12:46:30 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1263980790; bh=TO51WibxmPIRQFA0xFt8/aR7ntoxCYpjy2hTdDmvzhY=; l=1947; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=dMq3VGFBtJxA5AvEWvFvR2Mo8DJ+bLHa4XTdcH9puLWeLPfJ7XxYuI3rrctzBhIt7 Kr3pMGg74hVrZtykZkSi88BQfjVpqBAwVsMdp1KEt2g9TnJvEcm8Ed9D66TitL0I3Z daPPAx+lAztKdzgXvObnMyz53alXI23os/Imtbb0= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0K9kTMH053413; Wed, 20 Jan 2010 12:46:30 +0300 (MSK) (envelope-from ache) Date: Wed, 20 Jan 2010 12:46:28 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20100120094627.GA53020@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100120191752.Q2120@besplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202572 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 09:46:33 -0000 On Wed, Jan 20, 2010 at 07:43:29PM +1100, Bruce Evans wrote: > No, it is a comment about opendir()'s comparison function. It has nothing > to do with scandir(), and the only thing that it has to do with alphasort() > is that it must be different for the reasons described. Then the comment was plain wrong (not misplaced), so removing it becomes right again because the comment states: "opendir()'s comparison function" according to POSIX 2008 and XSI 7 should use strcoll(). But there is nothing said about opendir() & strcoll() relation in the mentioned standards. The only word I found is that opendir() returns "ordered" sequence, but nowhere mentioned ordered by what criteria, so perhaps they mean "stable": "The type DIR, which is defined in the header, represents a directory stream, which is an ordered sequence of all the directory entries in a particular directory." > page more than here. BTW, I don't remember any man page updates for > this. The man page still only says that alphasort() can be used to > give alphabetical sorting in scandir(). Alphabetically already means sorted according to collate, otherwhise it is called binary. Perhaps manpage should refer strcoll() directly. > I can't see this now (some illusion from my mailer or $TERMCAP > misformatting the patch?), but now I see an extra "the" in it: > > "requires the alphasort() to use strcoll()" > > should be either > > "requires that alphasort() uses strcoll()" > > (preferred) or > > "requires alphasort() to use strcoll()" > > (probably intended, but not too passive). I thought that you removed > this line completely. The previous line is even less useful. I don't add extra "the" there) What do you want, clarify please: 1) Remove whole comment. 2) Remove only first line and correct second to "that". 3) Just correct second to "that". -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 10:33:13 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCFF91065693; Wed, 20 Jan 2010 10:33:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 5529E8FC08; Wed, 20 Jan 2010 10:33:12 +0000 (UTC) Received: from besplex.bde.org (c220-239-227-214.carlnfd1.nsw.optusnet.com.au [220.239.227.214]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0KAX8im020073 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Jan 2010 21:33:10 +1100 Date: Wed, 20 Jan 2010 21:33:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov In-Reply-To: <20100120094627.GA53020@nagual.pp.ru> Message-ID: <20100120211722.S2451@besplex.bde.org> References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> <20100120094627.GA53020@nagual.pp.ru> 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, Bruce Evans Subject: Re: svn commit: r202572 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 10:33:13 -0000 On Wed, 20 Jan 2010, Andrey Chernov wrote: > On Wed, Jan 20, 2010 at 07:43:29PM +1100, Bruce Evans wrote: >> No, it is a comment about opendir()'s comparison function. It has nothing >> to do with scandir(), and the only thing that it has to do with alphasort() >> is that it must be different for the reasons described. > > Then the comment was plain wrong (not misplaced), so removing it becomes > right again because the comment states: "opendir()'s comparison function" > according to POSIX 2008 and XSI 7 should use strcoll(). No. It never mentioned opendir() or even scandir(). It only mentioned the relevant things. Here it is: 1.25 (delphij 16-Apr-08): /* 1.27 (kib 05-Jan-10): * POSIX 2008 and XSI 7 require alphasort() to call strcoll() for 1.27 (kib 05-Jan-10): * directory entries ordering. Use local copy that uses strcmp(). 1.27 (kib 05-Jan-10): */ > But there is > nothing said about opendir() & strcoll() relation in the mentioned > standards. The only word I found is that opendir() returns "ordered" > sequence, but nowhere mentioned ordered by what criteria, so perhaps they > mean "stable": As I said before, sorting in opendir() has nothing to do with POSIX! It is an implementation detail for union file systems/mounts. >> page more than here. BTW, I don't remember any man page updates for >> this. The man page still only says that alphasort() can be used to >> give alphabetical sorting in scandir(). > > Alphabetically already means sorted according to collate, otherwhise it is > called binary. Perhaps manpage should refer strcoll() directly. Yes it should, like POSIX does. It should also give the FreeBSD extension of POSIX. POSIX says: "If the strcoll() function fails, then the return value of alphasort() is unspecified.", but this makes alphasort() unusable since a qsort() comparison function must return a specified value. > >> I can't see this now (some illusion from my mailer or $TERMCAP >> misformatting the patch?), but now I see an extra "the" in it: >> >> "requires the alphasort() to use strcoll()" >> >> should be either >> >> "requires that alphasort() uses strcoll()" >> >> (preferred) or >> >> "requires alphasort() to use strcoll()" >> >> (probably intended, but not too passive). I thought that you removed >> this line completely. The previous line is even less useful. > > I don't add extra "the" there) What do you want, clarify please: > 1) Remove whole comment. > 2) Remove only first line and correct second to "that". > 3) Just correct second to "that". Correct the second line to "that ... uses". Bruce From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 11:55:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C70561065672; Wed, 20 Jan 2010 11:55:14 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5EBB8FC0C; Wed, 20 Jan 2010 11:55:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KBtEel092860; Wed, 20 Jan 2010 11:55:14 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KBtEIw092858; Wed, 20 Jan 2010 11:55:14 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001201155.o0KBtEIw092858@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 20 Jan 2010 11:55: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: r202691 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 11:55:14 -0000 Author: ache Date: Wed Jan 20 11:55:14 2010 New Revision: 202691 URL: http://svn.freebsd.org/changeset/base/202691 Log: For alphasort() add reference to strcoll(3) Modified: head/lib/libc/gen/scandir.3 Modified: head/lib/libc/gen/scandir.3 ============================================================================== --- head/lib/libc/gen/scandir.3 Wed Jan 20 10:21:04 2010 (r202690) +++ head/lib/libc/gen/scandir.3 Wed Jan 20 11:55:14 2010 (r202691) @@ -81,7 +81,8 @@ The function is a routine which can be used for the .Fa compar -argument to sort the array alphabetically. +argument to sort the array alphabetically using +.Xr strcoll 3 . .Pp The memory allocated for the array can be deallocated with .Xr free 3 , @@ -94,7 +95,8 @@ cannot allocate enough memory to hold al .Xr directory 3 , .Xr malloc 3 , .Xr qsort 3 , -.Xr dir 5 +.Xr dir 5 , +.Xr strcoll 3 .Sh HISTORY The .Fn scandir From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 11:58:04 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B38FC106568B; Wed, 20 Jan 2010 11:58:04 +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 A35618FC0C; Wed, 20 Jan 2010 11:58:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KBw4qF093526; Wed, 20 Jan 2010 11:58:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KBw4oW093523; Wed, 20 Jan 2010 11:58:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001201158.o0KBw4oW093523@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 20 Jan 2010 11:58: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: r202692 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 11:58:04 -0000 Author: kib Date: Wed Jan 20 11:58:04 2010 New Revision: 202692 URL: http://svn.freebsd.org/changeset/base/202692 Log: When traced process is about to receive the signal, the process is stopped and debugger may modify or drop the signal. After the changes to keep process-targeted signals on the process sigqueue, another thread may note the old signal on the queue and act before the thread removes changed or dropped signal from the process queue. Since process is traced, it usually gets stopped. Or, if the same signal is delivered while process was stopped, the thread may erronously remove it, intending to remove the original signal. Remove the signal from the queue before notifying the debugger. Restore the siginfo to the head of sigqueue when signal is allowed to be delivered to the debugee, using newly introduced KSI_HEAD ksiginfo_t flag. This preserves required order of delivery. Always restore the unchanged signal on the curthread sigqueue, not to the process queue, since the thread is about to get it anyway, because sigmask cannot be changed. Handle failure of reinserting the siginfo into the queue by falling back to sq_kill method, calling sigqueue_add with NULL ksi. If debugger changed the signal to be delivered, use sigqueue_add() with NULL ksi instead of only setting sq_signals bit. Reported by: Gardner Bell Analyzed and first version of fix by: Tijl Coosemans PR: 142757 Reviewed by: davidxu MFC after: 2 weeks Modified: head/sys/kern/kern_sig.c head/sys/sys/signalvar.h Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Wed Jan 20 11:55:14 2010 (r202691) +++ head/sys/kern/kern_sig.c Wed Jan 20 11:58:04 2010 (r202692) @@ -357,7 +357,10 @@ sigqueue_add(sigqueue_t *sq, int signo, /* directly insert the ksi, don't copy it */ if (si->ksi_flags & KSI_INS) { - TAILQ_INSERT_TAIL(&sq->sq_list, si, ksi_link); + if (si->ksi_flags & KSI_HEAD) + TAILQ_INSERT_HEAD(&sq->sq_list, si, ksi_link); + else + TAILQ_INSERT_TAIL(&sq->sq_list, si, ksi_link); si->ksi_sigq = sq; goto out_set_bit; } @@ -378,7 +381,10 @@ sigqueue_add(sigqueue_t *sq, int signo, p->p_pendingcnt++; ksiginfo_copy(si, ksi); ksi->ksi_signo = signo; - TAILQ_INSERT_TAIL(&sq->sq_list, ksi, ksi_link); + if (si->ksi_flags & KSI_HEAD) + TAILQ_INSERT_HEAD(&sq->sq_list, ksi, ksi_link); + else + TAILQ_INSERT_TAIL(&sq->sq_list, ksi, ksi_link); ksi->ksi_sigq = sq; } @@ -2492,6 +2498,7 @@ issignal(struct thread *td, int stop_all struct sigacts *ps; struct sigqueue *queue; sigset_t sigpending; + ksiginfo_t ksi; int sig, prop, newsig; p = td->td_proc; @@ -2529,24 +2536,22 @@ issignal(struct thread *td, int stop_all if (p->p_flag & P_TRACED && (p->p_flag & P_PPWAIT) == 0) { /* * If traced, always stop. + * Remove old signal from queue before the stop. + * XXX shrug off debugger, it causes siginfo to + * be thrown away. */ + queue = &td->td_sigqueue; + ksi.ksi_signo = 0; + if (sigqueue_get(queue, sig, &ksi) == 0) { + queue = &p->p_sigqueue; + sigqueue_get(queue, sig, &ksi); + } + mtx_unlock(&ps->ps_mtx); newsig = ptracestop(td, sig); mtx_lock(&ps->ps_mtx); if (sig != newsig) { - ksiginfo_t ksi; - - queue = &td->td_sigqueue; - /* - * clear old signal. - * XXX shrug off debugger, it causes siginfo to - * be thrown away. - */ - if (sigqueue_get(queue, sig, &ksi) == 0) { - queue = &p->p_sigqueue; - sigqueue_get(queue, sig, &ksi); - } /* * If parent wants us to take the signal, @@ -2561,10 +2566,20 @@ issignal(struct thread *td, int stop_all * Put the new signal into td_sigqueue. If the * signal is being masked, look for other signals. */ - SIGADDSET(queue->sq_signals, sig); + sigqueue_add(queue, sig, NULL); if (SIGISMEMBER(td->td_sigmask, sig)) continue; signotify(td); + } else { + if (ksi.ksi_signo != 0) { + ksi.ksi_flags |= KSI_HEAD; + if (sigqueue_add(&td->td_sigqueue, sig, + &ksi) != 0) + ksi.ksi_signo = 0; + } + if (ksi.ksi_signo == 0) + sigqueue_add(&td->td_sigqueue, sig, + NULL); } /* Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Wed Jan 20 11:55:14 2010 (r202691) +++ head/sys/sys/signalvar.h Wed Jan 20 11:58:04 2010 (r202692) @@ -234,6 +234,7 @@ typedef struct ksiginfo { #define KSI_EXT 0x02 /* Externally managed ksi. */ #define KSI_INS 0x04 /* Directly insert ksi, not the copy */ #define KSI_SIGQ 0x08 /* Generated by sigqueue, might ret EGAIN. */ +#define KSI_HEAD 0x10 /* Insert into head, not tail. */ #define KSI_COPYMASK (KSI_TRAP|KSI_SIGQ) #define KSI_ONQ(ksi) ((ksi)->ksi_sigq != NULL) From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 11:59:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0818F106568F; Wed, 20 Jan 2010 11:59:47 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECD8E8FC15; Wed, 20 Jan 2010 11:59:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KBxkHF093922; Wed, 20 Jan 2010 11:59:46 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KBxk6v093920; Wed, 20 Jan 2010 11:59:46 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001201159.o0KBxk6v093920@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 20 Jan 2010 11:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202693 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 11:59:47 -0000 Author: ache Date: Wed Jan 20 11:59:46 2010 New Revision: 202693 URL: http://svn.freebsd.org/changeset/base/202693 Log: Style: reword comment. Submitted by: bde Modified: head/lib/libc/gen/scandir.c Modified: head/lib/libc/gen/scandir.c ============================================================================== --- head/lib/libc/gen/scandir.c Wed Jan 20 11:58:04 2010 (r202692) +++ head/lib/libc/gen/scandir.c Wed Jan 20 11:59:46 2010 (r202693) @@ -126,7 +126,7 @@ fail: /* * Alphabetic order comparison routine for those who want it. - * POSIX 2008 requires the alphasort() to use strcoll(). + * POSIX 2008 requires that alphasort() uses strcoll(). */ int alphasort(const struct dirent **d1, const struct dirent **d2) From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 12:18:33 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EF8C106566B; Wed, 20 Jan 2010 12:18:33 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 7A4988FC28; Wed, 20 Jan 2010 12:18:32 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0KCITru055680; Wed, 20 Jan 2010 15:18:29 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1263989909; bh=soIkJbpzY+jfEwe5JnvRhgatMNy/dFCo9f/MQbGLbiw=; l=1297; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=uKAeSA3LHQx5O9edRVciXFIzdmgZqRjHQisa371pea0XmjGlcJMjyvctOfmfhHGeI KAd7Dl/6JJU/sHzn+iythbtdgySdrsGU38QI+q7pLCUD4x1IW4cG5PKZBYA3xERySh xso+l7NgGUAg+Ql+DxGV++bYOiloQ4St1GuQH5LQ= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0KCISaE055679; Wed, 20 Jan 2010 15:18:28 +0300 (MSK) (envelope-from ache) Date: Wed, 20 Jan 2010 15:18:28 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20100120121827.GA55236@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> <20100120094627.GA53020@nagual.pp.ru> <20100120211722.S2451@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100120211722.S2451@besplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202572 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 12:18:33 -0000 On Wed, Jan 20, 2010 at 09:33:08PM +1100, Bruce Evans wrote: > > But there is > > nothing said about opendir() & strcoll() relation in the mentioned > > standards. The only word I found is that opendir() returns "ordered" > > sequence, but nowhere mentioned ordered by what criteria, so perhaps they > > mean "stable": > > As I said before, sorting in opendir() has nothing to do with POSIX! It > is an implementation detail for union file systems/mounts. Moreover, even sorting itself is not required here. We sort just to remove dups. > It should also give the FreeBSD > extension of POSIX. POSIX says: "If the strcoll() function fails, > then the return value of alphasort() is unspecified.", but this makes > alphasort() unusable since a qsort() comparison function must return > a specified value. To be used in practice, strcoll() should never fails, doing fallback to strcmp() instead, not only in that, but in lots of other cases too (it may set errno like EILSEQ, but not fails). The next important thing is to return 0 only for true binary equals, additionaly ranking (f.e. by strcmp()) anything inside classes of equality to stabilize result. I hope our strcoll() will be kept in that state after implementing UCA too. -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 13:31:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4EF71065670; Wed, 20 Jan 2010 13:31:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94F4F8FC0A; Wed, 20 Jan 2010 13:31:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KDVCgL014069; Wed, 20 Jan 2010 13:31:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KDVCM1014061; Wed, 20 Jan 2010 13:31:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001201331.o0KDVCM1014061@svn.freebsd.org> From: Alexander Motin Date: Wed, 20 Jan 2010 13:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202694 - head/sbin/camcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 13:31:12 -0000 Author: mav Date: Wed Jan 20 13:31:12 2010 New Revision: 202694 URL: http://svn.freebsd.org/changeset/base/202694 Log: - Add -v argument to `camcontrol identify` command. It makes camcontrol print full identify data block. - Improve identify result view and add TRIM support. Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Wed Jan 20 11:59:46 2010 (r202693) +++ head/sbin/camcontrol/camcontrol.8 Wed Jan 20 13:31:12 2010 (r202694) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2009 +.Dd January 20, 2010 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -62,6 +62,7 @@ .Ic identify .Op device id .Op generic args +.Op Fl v .Nm .Ic reportluns .Op device id Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Wed Jan 20 11:59:46 2010 (r202693) +++ head/sbin/camcontrol/camcontrol.c Wed Jan 20 13:31:12 2010 (r202694) @@ -1166,8 +1166,6 @@ atacapprint(struct ata_params *parm) } printf("\n"); - printf("overlap%ssupported\n", - parm->capabilities1 & ATA_SUPPORT_OVERLAP ? " " : " not "); if (parm->media_rotation_rate == 1) { printf("media RPM non-rotating\n"); } else if (parm->media_rotation_rate >= 0x0401 && @@ -1187,20 +1185,26 @@ atacapprint(struct ata_params *parm) printf("flush cache %s %s\n", parm->support.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no", parm->enabled.command2 & ATA_SUPPORT_FLUSHCACHE ? "yes" : "no"); + printf("overlap %s\n", + parm->capabilities1 & ATA_SUPPORT_OVERLAP ? "yes" : "no"); + printf("Tagged Command Queuing (TCQ) %s %s", + parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", + parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no"); + if (parm->support.command2 & ATA_SUPPORT_QUEUED) { + printf(" %d tags\n", + ATA_QUEUE_LEN(parm->queue) + 1); + } else + printf("\n"); if (parm->satacapabilities && parm->satacapabilities != 0xffff) { - printf("Native Command Queuing (NCQ) %s " - " %d/0x%02X\n", + printf("Native Command Queuing (NCQ) %s ", parm->satacapabilities & ATA_SUPPORT_NCQ ? - "yes" : "no", - (parm->satacapabilities & ATA_SUPPORT_NCQ) ? - ATA_QUEUE_LEN(parm->queue) : 0, - (parm->satacapabilities & ATA_SUPPORT_NCQ) ? - ATA_QUEUE_LEN(parm->queue) : 0); + "yes" : "no"); + if (parm->satacapabilities & ATA_SUPPORT_NCQ) { + printf(" %d tags\n", + ATA_QUEUE_LEN(parm->queue) + 1); + } else + printf("\n"); } - printf("Tagged Command Queuing (TCQ) %s %s %d/0x%02X\n", - parm->support.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", - parm->enabled.command2 & ATA_SUPPORT_QUEUED ? "yes" : "no", - ATA_QUEUE_LEN(parm->queue), ATA_QUEUE_LEN(parm->queue)); printf("SMART %s %s\n", parm->support.command1 & ATA_SUPPORT_SMART ? "yes" : "no", parm->enabled.command1 & ATA_SUPPORT_SMART ? "yes" : "no"); @@ -1241,6 +1245,8 @@ atacapprint(struct ata_params *parm) printf("free-fall %s %s\n", parm->support2 & ATA_SUPPORT_FREEFALL ? "yes" : "no", parm->enabled2 & ATA_SUPPORT_FREEFALL ? "yes" : "no"); + printf("data set management (TRIM) %s\n", + parm->support_dsm & ATA_SUPPORT_DSM_TRIM ? "yes" : "no"); } @@ -1327,8 +1333,18 @@ ataidentify(struct cam_device *device, i for (i = 0; i < sizeof(struct ata_params) / 2; i++) ptr[i] = le16toh(ptr[i]); + if (arglist & CAM_ARG_VERBOSE) { + fprintf(stdout, "%s%d: Raw identify data:\n", + device->device_name, device->dev_unit_num); + for (i = 0; i < sizeof(struct ata_params) / 2; i++) { + if ((i % 8) == 0) + fprintf(stdout, " %3d: ", i); + fprintf(stdout, "%04x ", (uint16_t)ptr[i]); + if ((i % 8) == 7) + fprintf(stdout, "\n"); + } + } ident_buf = (struct ata_params *)ptr; - if (strncmp(ident_buf->model, "FX", 2) && strncmp(ident_buf->model, "NEC", 3) && strncmp(ident_buf->model, "Pioneer", 7) && @@ -2286,6 +2302,7 @@ scsicmd(struct cam_device *device, int a error = 1; goto scsicmd_bailout; } + bzero(data_ptr, data_bytes); /* * If the user supplied "-" instead of a format, he * wants the data to be read from stdin. @@ -4305,7 +4322,7 @@ usage(int verbose) " camcontrol periphlist [dev_id][-n dev_name] [-u unit]\n" " camcontrol tur [dev_id][generic args]\n" " camcontrol inquiry [dev_id][generic args] [-D] [-S] [-R]\n" -" camcontrol identify [dev_id][generic args]\n" +" camcontrol identify [dev_id][generic args] [-v]\n" " camcontrol reportluns [dev_id][generic args] [-c] [-l] [-r report]\n" " camcontrol readcap [dev_id][generic args] [-b] [-h] [-H] [-N]\n" " [-q] [-s]\n" From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 14:17:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5021F106566C; Wed, 20 Jan 2010 14:17:42 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 403158FC08; Wed, 20 Jan 2010 14:17:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KEHgwv025187; Wed, 20 Jan 2010 14:17:42 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KEHgLM025185; Wed, 20 Jan 2010 14:17:42 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001201417.o0KEHgLM025185@svn.freebsd.org> From: Neel Natu Date: Wed, 20 Jan 2010 14:17:42 +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: r202697 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 14:17:42 -0000 Author: neel Date: Wed Jan 20 14:17:41 2010 New Revision: 202697 URL: http://svn.freebsd.org/changeset/base/202697 Log: Make sure that interrupts are enabled when thread0 is running. Approved by: imp (mentor) Modified: head/sys/mips/mips/machdep.c Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Wed Jan 20 13:50:30 2010 (r202696) +++ head/sys/mips/mips/machdep.c Wed Jan 20 14:17:41 2010 (r202697) @@ -351,7 +351,9 @@ mips_vector_init(void) * Mask all interrupts. Each interrupt will be enabled * when handler is installed for it */ - set_intr_mask (ALL_INT_MASK); + set_intr_mask(ALL_INT_MASK); + enableintr(); + /* Clear BEV in SR so we start handling our own exceptions */ mips_cp0_status_write(mips_cp0_status_read() & ~SR_BOOT_EXC_VEC); From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 14:21:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A50061065694; Wed, 20 Jan 2010 14:21:28 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B67E8FC15; Wed, 20 Jan 2010 14:21:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KELSg9026265; Wed, 20 Jan 2010 14:21:28 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KELSeN026261; Wed, 20 Jan 2010 14:21:28 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001201421.o0KELSeN026261@svn.freebsd.org> From: Neel Natu Date: Wed, 20 Jan 2010 14:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202698 - in head/sys/mips: include mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 14:21:28 -0000 Author: neel Date: Wed Jan 20 14:21:28 2010 New Revision: 202698 URL: http://svn.freebsd.org/changeset/base/202698 Log: Get rid of unused function MipsTLBInvalidException(). Approved by: imp (mentor) Modified: head/sys/mips/include/trap.h head/sys/mips/mips/db_trace.c head/sys/mips/mips/exception.S Modified: head/sys/mips/include/trap.h ============================================================================== --- head/sys/mips/include/trap.h Wed Jan 20 14:17:41 2010 (r202697) +++ head/sys/mips/include/trap.h Wed Jan 20 14:21:28 2010 (r202698) @@ -112,7 +112,6 @@ void MipsFPTrap(u_int, u_int, u_int); void MipsKernGenException(void); void MipsKernIntr(void); void MipsKernTLBInvalidException(void); -void MipsTLBInvalidException(void); void MipsTLBMissException(void); void MipsUserGenException(void); void MipsUserIntr(void); Modified: head/sys/mips/mips/db_trace.c ============================================================================== --- head/sys/mips/mips/db_trace.c Wed Jan 20 14:17:41 2010 (r202697) +++ head/sys/mips/mips/db_trace.c Wed Jan 20 14:21:28 2010 (r202698) @@ -162,11 +162,8 @@ loop: subr = (uintptr_t)MipsUserGenException; else if (pcBetween(MipsKernIntr, MipsUserIntr)) subr = (uintptr_t)MipsKernIntr; - else if (pcBetween(MipsUserIntr, MipsTLBInvalidException)) + else if (pcBetween(MipsUserIntr, MipsKernTLBInvalidException)) subr = (uintptr_t)MipsUserIntr; - else if (pcBetween(MipsTLBInvalidException, - MipsKernTLBInvalidException)) - subr = (uintptr_t)MipsTLBInvalidException; else if (pcBetween(MipsKernTLBInvalidException, MipsUserTLBInvalidException)) subr = (uintptr_t)MipsKernTLBInvalidException; Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Wed Jan 20 14:17:41 2010 (r202697) +++ head/sys/mips/mips/exception.S Wed Jan 20 14:21:28 2010 (r202698) @@ -830,35 +830,6 @@ NNON_LEAF(MipsUserIntr, STAND_FRAME_SIZE .set at END(MipsUserIntr) -/*---------------------------------------------------------------------------- - * - * MipsTLBInvalidException -- - * - * Handle a TLB invalid exception. - * The BaddVAddr, Context, and EntryHi registers contain the failed - * virtual address. - * - * Results: - * None. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------------- - */ -NLEAF(MipsTLBInvalidException) - .set noat - mfc0 k0, COP_0_STATUS_REG - nop - and k0, k0, SR_KSU_USER - bne k0, zero, _C_LABEL(MipsUserTLBInvalidException) - nop - .set at -END(MipsTLBInvalidException) -/* - * Fall through ... - */ - NLEAF(MipsKernTLBInvalidException) .set noat mfc0 k0, COP_0_BAD_VADDR # get the fault address From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 14:29:55 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88F3F1065676; Wed, 20 Jan 2010 14:29:55 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 791588FC1A; Wed, 20 Jan 2010 14:29:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KETtNZ028635; Wed, 20 Jan 2010 14:29:55 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KETtBD028633; Wed, 20 Jan 2010 14:29:55 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001201429.o0KETtBD028633@svn.freebsd.org> From: Rui Paulo Date: Wed, 20 Jan 2010 14:29:55 +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: r202699 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 14:29:55 -0000 Author: rpaulo Date: Wed Jan 20 14:29:55 2010 New Revision: 202699 URL: http://svn.freebsd.org/changeset/base/202699 Log: Make ata_getrev() an optional method by implementing ata_null_getrev(). This fixes a bogus '???' boot message on Cambria boards with a CompactFlash card. Reviewed by: mav Modified: head/sys/dev/ata/ata_if.m Modified: head/sys/dev/ata/ata_if.m ============================================================================== --- head/sys/dev/ata/ata_if.m Wed Jan 20 14:21:28 2010 (r202698) +++ head/sys/dev/ata/ata_if.m Wed Jan 20 14:29:55 2010 (r202699) @@ -71,10 +71,17 @@ METHOD int setmode { int mode; } DEFAULT ata_null_setmode; +CODE { + static int ata_null_getrev(device_t dev, int target) + { + return (0); + } +}; + METHOD int getrev { device_t dev; int target; -}; +} DEFAULT ata_null_getrev; METHOD void reset { device_t channel; From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 16:50:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB81C1065679; Wed, 20 Jan 2010 16:50:14 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A8C78FC1B; Wed, 20 Jan 2010 16:50:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KGoEtS060230; Wed, 20 Jan 2010 16:50:14 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KGoE1N060228; Wed, 20 Jan 2010 16:50:14 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201001201650.o0KGoE1N060228@svn.freebsd.org> From: Hiroki Sato Date: Wed, 20 Jan 2010 16:50: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: r202707 - head/usr.sbin/ypserv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 16:50:14 -0000 Author: hrs Date: Wed Jan 20 16:50:13 2010 New Revision: 202707 URL: http://svn.freebsd.org/changeset/base/202707 Log: Simply ignore unsupported protocols listed in /etc/netconfig and abort only if no transport is available. This fixes (INET && !INET6) and (!INET && INET6) case, for example. Modified: head/usr.sbin/ypserv/yp_main.c Modified: head/usr.sbin/ypserv/yp_main.c ============================================================================== --- head/usr.sbin/ypserv/yp_main.c Wed Jan 20 16:28:39 2010 (r202706) +++ head/usr.sbin/ypserv/yp_main.c Wed Jan 20 16:50:13 2010 (r202707) @@ -450,6 +450,7 @@ main(int argc, char *argv[]) { int ch; int error; + int ntrans; void *nc_handle; struct netconfig *nconf; @@ -527,12 +528,13 @@ main(int argc, char *argv[]) /* * Create RPC service for each transport. */ + ntrans = 0; while((nconf = getnetconfig(nc_handle))) { if ((nconf->nc_flag & NC_VISIBLE)) { if (__rpc_nconf2sockinfo(nconf, &si) == 0) { - _msgout("cannot get information for %s", - nconf->nc_netid); - exit(1); + _msgout("cannot get information for %s. " + "Ignored.", nconf->nc_netid); + continue; } if (_rpcpmstart) { if (si.si_socktype != _rpcfdtype || @@ -545,12 +547,16 @@ main(int argc, char *argv[]) endnetconfig(nc_handle); exit(1); } + ntrans++; } } endnetconfig(nc_handle); while(!(SLIST_EMPTY(&ble_head))) SLIST_REMOVE_HEAD(&ble_head, ble_next); - + if (ntrans == 0) { + _msgout("no transport is available. Aborted."); + exit(1); + } if (_rpcpmstart) { (void) signal(SIGALRM, (SIG_PF) closedown); (void) alarm(_RPCSVC_CLOSEDOWN/2); From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 16:56:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37C611065695; Wed, 20 Jan 2010 16:56:21 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D7D08FC1F; Wed, 20 Jan 2010 16:56:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KGuKDi061600; Wed, 20 Jan 2010 16:56:20 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KGuKKG061597; Wed, 20 Jan 2010 16:56:20 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001201656.o0KGuKKG061597@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 20 Jan 2010 16:56: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: r202708 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 16:56:21 -0000 Author: jh Date: Wed Jan 20 16:56:20 2010 New Revision: 202708 URL: http://svn.freebsd.org/changeset/base/202708 Log: - Change the type of nodes_max to u_int and use "%u" format string to convert its value. [1] - Set default tm_nodes_max to min(pages + 3, UINT32_MAX). It's more reasonable than the old four nodes per page (with page size 4096) because non-empty regular files always use at least one page. This fixes possible overflow in the calculation. [2] - Don't allow more than tm_nodes_max nodes allocated in tmpfs_alloc_node(). PR: kern/138367 Suggested by: bde [1], Gleb Kurtsou [2] Approved by: trasz (mentor) Modified: head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vfsops.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Wed Jan 20 16:50:13 2010 (r202707) +++ head/sys/fs/tmpfs/tmpfs_subr.c Wed Jan 20 16:56:20 2010 (r202708) @@ -93,7 +93,7 @@ tmpfs_alloc_node(struct tmpfs_mount *tmp MPASS(IFF(type == VLNK, target != NULL)); MPASS(IFF(type == VBLK || type == VCHR, rdev != VNOVAL)); - if (tmp->tm_nodes_inuse > tmp->tm_nodes_max) + if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max) return (ENOSPC); nnode = (struct tmpfs_node *)uma_zalloc_arg( Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 20 16:50:13 2010 (r202707) +++ head/sys/fs/tmpfs/tmpfs_vfsops.c Wed Jan 20 16:56:20 2010 (r202708) @@ -182,10 +182,10 @@ tmpfs_mount(struct mount *mp) struct tmpfs_mount *tmp; struct tmpfs_node *root; size_t pages, mem_size; - ino_t nodes; + uint32_t nodes; int error; /* Size counters. */ - ino_t nodes_max; + u_int nodes_max; u_quad_t size_max; /* Root node attributes. */ @@ -223,7 +223,7 @@ tmpfs_mount(struct mount *mp) if (mp->mnt_cred->cr_ruid != 0 || vfs_scanopt(mp->mnt_optnew, "mode", "%ho", &root_mode) != 1) root_mode = va.va_mode; - if (vfs_scanopt(mp->mnt_optnew, "inodes", "%d", &nodes_max) != 1) + if (vfs_scanopt(mp->mnt_optnew, "inodes", "%u", &nodes_max) != 1) nodes_max = 0; if (vfs_scanopt(mp->mnt_optnew, "size", "%qu", &size_max) != 1) size_max = 0; @@ -245,9 +245,12 @@ tmpfs_mount(struct mount *mp) pages = howmany(size_max, PAGE_SIZE); MPASS(pages > 0); - if (nodes_max <= 3) - nodes = 3 + pages * PAGE_SIZE / 1024; - else + if (nodes_max <= 3) { + if (pages > UINT32_MAX - 3) + nodes = UINT32_MAX; + else + nodes = pages + 3; + } else nodes = nodes_max; MPASS(nodes >= 3); From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 17:34:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76CA21065676; Wed, 20 Jan 2010 17:34:59 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ew0-f211.google.com (mail-ew0-f211.google.com [209.85.219.211]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9248FC1E; Wed, 20 Jan 2010 17:34:58 +0000 (UTC) Received: by ewy3 with SMTP id 3so1814843ewy.13 for ; Wed, 20 Jan 2010 09:34:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=wb9Lsmktah9/oDCXTxHnRJALbqHx6fLU56hFjhexu9Q=; b=frDtmMyCablpcSyf2ljbgY5LJmMf4fvnAIkYs4lh92Klj5Swy17Cqah1bO1IhVhV1K ipXq3R0ptN9Es/HMwdsW6FL249VP0U0dkmU0aOvUc2UeAl95OacSBU8LJlv31XVmSBvI Hf8+HuGR5QSAK6NCQ76+blmRxNy4a44wzOzjk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=IhAadjFezX75fOIHCQN9pqNMBjZ7ZKLgKuqq9mQQeD1g6E6kAVyuQLrN5GrFxv5S4X BpBQLvfq+0v9QCIGpCHkBu88pdE5aIwpa/ZzVpiqJET38+AhIetXKl4247MBWx3+NmRI 0RQXqWxli1dkAhVIkCaXWDiC8qswe7Dl88/gs= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.162.142 with SMTP id y14mr85592wek.192.1264008897205; Wed, 20 Jan 2010 09:34:57 -0800 (PST) In-Reply-To: <201001201656.o0KGuKKG061597@svn.freebsd.org> References: <201001201656.o0KGuKKG061597@svn.freebsd.org> From: Ivan Voras Date: Wed, 20 Jan 2010 18:34:37 +0100 X-Google-Sender-Auth: d194db9473a8eb03 Message-ID: <9bbcef731001200934n67f7c009sb39a6fe238ac4a8@mail.gmail.com> To: Jaakko Heinonen Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202708 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 17:34:59 -0000 2010/1/20 Jaakko Heinonen : > Author: jh > Date: Wed Jan 20 16:56:20 2010 > New Revision: 202708 > URL: http://svn.freebsd.org/changeset/base/202708 > Modified: > =C2=A0head/sys/fs/tmpfs/tmpfs_subr.c > =C2=A0head/sys/fs/tmpfs/tmpfs_vfsops.c Any chance of downgrading the "considered highly experimental" status message of tmpfs to something less scary? Like "will probably not set your hamster on fire"? :) I admit I haven't used it for any really demanding work but it looks ok enough for /tmp on some busy systems. From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 17:51:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39028106568B; Wed, 20 Jan 2010 17:51:09 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smtp-out2.tiscali.nl (smtp-out2.tiscali.nl [195.241.79.177]) by mx1.freebsd.org (Postfix) with ESMTP id E35F48FC1A; Wed, 20 Jan 2010 17:51:08 +0000 (UTC) Received: from [212.123.145.58] (helo=sjakie.klop.ws) by smtp-out2.tiscali.nl with esmtp (Exim) (envelope-from ) id 1NXehv-00069i-N2; Wed, 20 Jan 2010 18:51:07 +0100 Received: from 212-123-145-58.ip.telfort.nl (localhost [127.0.0.1]) by sjakie.klop.ws (Postfix) with ESMTP id 10093C62B; Wed, 20 Jan 2010 18:50:59 +0100 (CET) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Ivan Voras" , "Jaakko Heinonen" References: <201001201656.o0KGuKKG061597@svn.freebsd.org> <9bbcef731001200934n67f7c009sb39a6fe238ac4a8@mail.gmail.com> Date: Wed, 20 Jan 2010 18:50:58 +0100 MIME-Version: 1.0 From: "Ronald Klop" Message-ID: In-Reply-To: <9bbcef731001200934n67f7c009sb39a6fe238ac4a8@mail.gmail.com> User-Agent: Opera Mail/10.10 (FreeBSD) Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202708 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 17:51:09 -0000 On Wed, 20 Jan 2010 18:34:37 +0100, Ivan Voras wrote= : > 2010/1/20 Jaakko Heinonen : >> Author: jh >> Date: Wed Jan 20 16:56:20 2010 >> New Revision: 202708 >> URL: http://svn.freebsd.org/changeset/base/202708 > >> Modified: >> head/sys/fs/tmpfs/tmpfs_subr.c >> head/sys/fs/tmpfs/tmpfs_vfsops.c > > Any chance of downgrading the "considered highly experimental" status > message of tmpfs to something less scary? Like "will probably not set > your hamster on fire"? :) > > I admit I haven't used it for any really demanding work but it looks > ok enough for /tmp on some busy systems. And since this list is shrinking. http://www.freebsd.org/cgi/query-pr-summary.cgi?category=3D&severity=3D&p= riority=3D&class=3D&state=3D&sort=3Dnone&text=3Dtmpfs&responsible=3D&mult= itext=3D&originator=3D&release=3D Ronald. From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 18:22:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E82C106568F; Wed, 20 Jan 2010 18:22:56 +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 8D43B8FC0C; Wed, 20 Jan 2010 18:22:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KIMubx080686; Wed, 20 Jan 2010 18:22:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KIMufx080684; Wed, 20 Jan 2010 18:22:56 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001201822.o0KIMufx080684@svn.freebsd.org> From: Xin LI Date: Wed, 20 Jan 2010 18:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202709 - head/usr.sbin/burncd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 18:22:56 -0000 Author: delphij Date: Wed Jan 20 18:22:56 2010 New Revision: 202709 URL: http://svn.freebsd.org/changeset/base/202709 Log: Give the right value when complaining it being wrong. Reported by: danfe MFC after: 3 days Modified: head/usr.sbin/burncd/burncd.c Modified: head/usr.sbin/burncd/burncd.c ============================================================================== --- head/usr.sbin/burncd/burncd.c Wed Jan 20 16:56:20 2010 (r202708) +++ head/usr.sbin/burncd/burncd.c Wed Jan 20 18:22:56 2010 (r202709) @@ -151,7 +151,7 @@ main(int argc, char **argv) else speed = atoi(env_speed) * 177; if (speed <= 0) - errx(EX_USAGE, "Invalid speed: %s", optarg); + errx(EX_USAGE, "Invalid speed: %s", env_speed); if (argc == 0) usage(); From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 20:33:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCE1D1065672; Wed, 20 Jan 2010 20:33:10 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB5608FC1A; Wed, 20 Jan 2010 20:33:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KKXAhl010284; Wed, 20 Jan 2010 20:33:10 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KKXAHc010281; Wed, 20 Jan 2010 20:33:10 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201001202033.o0KKXAHc010281@svn.freebsd.org> From: David Christensen Date: Wed, 20 Jan 2010 20:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202717 - head/sys/dev/bce X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 20:33:11 -0000 Author: davidch Date: Wed Jan 20 20:33:10 2010 New Revision: 202717 URL: http://svn.freebsd.org/changeset/base/202717 Log: - Added a workaround for NC-SI management firmware that would allow frames to be accepted while the driver is resetting the hardware. This failure is generally observed when broadcast frames are received during driver load and will generate "Unable to write CTX memory" errors. - Small changes to driver flags display. Modified: head/sys/dev/bce/if_bce.c head/sys/dev/bce/if_bcereg.h Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Wed Jan 20 19:20:31 2010 (r202716) +++ head/sys/dev/bce/if_bce.c Wed Jan 20 20:33:10 2010 (r202717) @@ -371,6 +371,9 @@ static void bce_release_resources (struc static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); +static void bce_start_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_halt_cpu (struct bce_softc *, struct cpu_reg *); +static void bce_start_rxp_cpu (struct bce_softc *); static void bce_init_rxp_cpu (struct bce_softc *); static void bce_init_txp_cpu (struct bce_softc *); static void bce_init_tpat_cpu (struct bce_softc *); @@ -603,9 +606,10 @@ bce_print_adapter_info(struct bce_softc printf("B/C (%s); Flags (", sc->bce_bc_ver); #ifdef BCE_JUMBO_HDRSPLIT - printf("SPLT "); + printf("SPLT"); i++; #endif + if (sc->bce_flags & BCE_USING_MSI_FLAG) { if (i > 0) printf("|"); printf("MSI"); i++; @@ -613,7 +617,7 @@ bce_print_adapter_info(struct bce_softc if (sc->bce_flags & BCE_USING_MSIX_FLAG) { if (i > 0) printf("|"); - printf("MSI-X "); i++; + printf("MSI-X"); i++; } if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) { @@ -2976,6 +2980,7 @@ bce_dma_map_addr(void *arg, bus_dma_segm /* |PG Buffers | none | none | none | none | */ /* |TX Buffers | none | none | none | none | */ /* |Chain Pages(1) | 4KiB | 4KiB | 4KiB | 4KiB | */ +/* |Context Memory | | | | | */ /* +-----------------+----------+----------+----------+----------+ */ /* */ /* (1) Must align with CPU page size (BCM_PAGE_SZIE). */ @@ -3665,15 +3670,10 @@ bce_load_cpu_fw(struct bce_softc *sc, st struct fw_info *fw) { u32 offset; - u32 val; DBENTER(BCE_VERBOSE_RESET); - /* Halt the CPU. */ - val = REG_RD_IND(sc, cpu_reg->mode); - val |= cpu_reg->mode_value_halt; - REG_WR_IND(sc, cpu_reg->mode, val); - REG_WR_IND(sc, cpu_reg->state, cpu_reg->state_value_clear); + bce_halt_cpu(sc, cpu_reg); /* Load the Text area. */ offset = cpu_reg->spad_base + (fw->text_addr - cpu_reg->mips_view_base); @@ -3726,9 +3726,28 @@ bce_load_cpu_fw(struct bce_softc *sc, st } } - /* Clear the pre-fetch instruction. */ - REG_WR_IND(sc, cpu_reg->inst, 0); - REG_WR_IND(sc, cpu_reg->pc, fw->start_addr); + /* Clear the pre-fetch instruction and set the FW start address. */ + REG_WR_IND(sc, cpu_reg->inst, 0); + REG_WR_IND(sc, cpu_reg->pc, fw->start_addr); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ +/* Starts the RISC processor. */ +/* */ +/* Assumes the CPU starting address has already been set. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_start_cpu(struct bce_softc *sc, struct cpu_reg *cpu_reg) +{ + u32 val; + + DBENTER(BCE_VERBOSE_RESET); /* Start the CPU. */ val = REG_RD_IND(sc, cpu_reg->mode); @@ -3741,6 +3760,62 @@ bce_load_cpu_fw(struct bce_softc *sc, st /****************************************************************************/ +/* Halts the RISC processor. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_halt_cpu(struct bce_softc *sc, struct cpu_reg *cpu_reg) +{ + u32 val; + + DBENTER(BCE_VERBOSE_RESET); + + /* Halt the CPU. */ + val = REG_RD_IND(sc, cpu_reg->mode); + val |= cpu_reg->mode_value_halt; + REG_WR_IND(sc, cpu_reg->mode, val); + REG_WR_IND(sc, cpu_reg->state, cpu_reg->state_value_clear); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ +/* Initialize the RX CPU. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_start_rxp_cpu(struct bce_softc *sc) +{ + struct cpu_reg cpu_reg; + + DBENTER(BCE_VERBOSE_RESET); + + cpu_reg.mode = BCE_RXP_CPU_MODE; + cpu_reg.mode_value_halt = BCE_RXP_CPU_MODE_SOFT_HALT; + cpu_reg.mode_value_sstep = BCE_RXP_CPU_MODE_STEP_ENA; + cpu_reg.state = BCE_RXP_CPU_STATE; + cpu_reg.state_value_clear = 0xffffff; + cpu_reg.gpr0 = BCE_RXP_CPU_REG_FILE; + cpu_reg.evmask = BCE_RXP_CPU_EVENT_MASK; + cpu_reg.pc = BCE_RXP_CPU_PROGRAM_COUNTER; + cpu_reg.inst = BCE_RXP_CPU_INSTRUCTION; + cpu_reg.bp = BCE_RXP_CPU_HW_BREAKPOINT; + cpu_reg.spad_base = BCE_RXP_SCRATCH; + cpu_reg.mips_view_base = 0x8000000; + + DBPRINT(sc, BCE_INFO_RESET, "Starting RX firmware.\n"); + bce_start_cpu(sc, &cpu_reg); + + DBEXIT(BCE_VERBOSE_RESET); +} + + +/****************************************************************************/ /* Initialize the RX CPU. */ /* */ /* Returns: */ @@ -3833,6 +3908,8 @@ bce_init_rxp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading RX firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + /* Delay RXP start until initialization is complete. */ + DBEXIT(BCE_VERBOSE_RESET); } @@ -3929,6 +4006,7 @@ bce_init_txp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading TX firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4026,6 +4104,7 @@ bce_init_tpat_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading TPAT firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4123,6 +4202,7 @@ bce_init_cp_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading CP firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4220,6 +4300,7 @@ bce_init_com_cpu(struct bce_softc *sc) DBPRINT(sc, BCE_INFO_RESET, "Loading COM firmware.\n"); bce_load_cpu_fw(sc, &cpu_reg, &fw); + bce_start_cpu(sc, &cpu_reg); DBEXIT(BCE_VERBOSE_RESET); } @@ -4665,6 +4746,12 @@ bce_chipinit(struct bce_softc *sc) /* Initialize the on-boards CPUs */ bce_init_cpus(sc); + /* Enable management frames (NC-SI) to flow to the MCP. */ + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + val = REG_RD(sc, BCE_RPM_MGMT_PKT_CTRL) | BCE_RPM_MGMT_PKT_CTRL_MGMT_EN; + REG_WR(sc, BCE_RPM_MGMT_PKT_CTRL, val); + } + /* Prepare NVRAM for access. */ if (bce_init_nvram(sc)) { rc = ENODEV; @@ -4845,6 +4932,15 @@ bce_blockinit(struct bce_softc *sc) /* Enable link state change interrupt generation. */ REG_WR(sc, BCE_HC_ATTN_BITS_ENABLE, STATUS_ATTN_BITS_LINK_STATE); + /* Enable the RXP. */ + bce_start_rxp_cpu(sc); + + /* Disable management frames (NC-SI) from flowing to the MCP. */ + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) { + val = REG_RD(sc, BCE_RPM_MGMT_PKT_CTRL) & ~BCE_RPM_MGMT_PKT_CTRL_MGMT_EN; + REG_WR(sc, BCE_RPM_MGMT_PKT_CTRL, val); + } + /* Enable all remaining blocks in the MAC. */ if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) @@ -5851,22 +5947,29 @@ bce_rx_intr(struct bce_softc *sc) DBRUN(sc->debug_rx_mbuf_alloc--); sc->free_rx_bd++; - /* - * Frames received on the NetXteme II are prepended with an - * l2_fhdr structure which provides status information about - * the received frame (including VLAN tags and checksum info). - * The frames are also automatically adjusted to align the IP - * header (i.e. two null bytes are inserted before the Ethernet - * header). As a result the data DMA'd by the controller into - * the mbuf is as follows: - * - * +---------+-----+---------------------+-----+ - * | l2_fhdr | pad | packet data | FCS | - * +---------+-----+---------------------+-----+ - * - * The l2_fhdr needs to be checked and skipped and the FCS needs - * to be stripped before sending the packet up the stack. - */ + if(m0 == NULL) { + DBPRINT(sc, BCE_EXTREME_RECV, "%s(): Oops! Empty mbuf pointer " + "found in sc->rx_mbuf_ptr[0x%04X]!\n", + __FUNCTION__, sw_rx_cons_idx); + goto bce_rx_int_next_rx; + } + + /* + * Frames received on the NetXteme II are prepended with an + * l2_fhdr structure which provides status information about + * the received frame (including VLAN tags and checksum info). + * The frames are also automatically adjusted to align the IP + * header (i.e. two null bytes are inserted before the Ethernet + * header). As a result the data DMA'd by the controller into + * the mbuf is as follows: + * + * +---------+-----+---------------------+-----+ + * | l2_fhdr | pad | packet data | FCS | + * +---------+-----+---------------------+-----+ + * + * The l2_fhdr needs to be checked and skipped and the FCS needs + * to be stripped before sending the packet up the stack. + */ l2fhdr = mtod(m0, struct l2_fhdr *); /* Get the packet data + FCS length and the status. */ @@ -6387,6 +6490,7 @@ bce_init_locked(struct bce_softc *sc) bce_ifmedia_upd_locked(ifp); + /* Let the OS know the driver is up and running. */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -10038,9 +10142,9 @@ bce_dump_bc_state(struct bce_softc *sc) BCE_PRINTF("0x%08X - (0x%06X) state\n", val, BCE_BC_STATE); - val = bce_shmem_rd(sc, BCE_BC_CONDITION); + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); BCE_PRINTF("0x%08X - (0x%06X) condition\n", - val, BCE_BC_CONDITION); + val, BCE_BC_STATE_CONDITION); val = bce_shmem_rd(sc, BCE_BC_STATE_DEBUG_CMD); BCE_PRINTF("0x%08X - (0x%06X) debug_cmd\n", Modified: head/sys/dev/bce/if_bcereg.h ============================================================================== --- head/sys/dev/bce/if_bcereg.h Wed Jan 20 19:20:31 2010 (r202716) +++ head/sys/dev/bce/if_bcereg.h Wed Jan 20 20:33:10 2010 (r202717) @@ -3715,6 +3715,10 @@ struct l2_fhdr { #define BCE_RPM_CONFIG_SORT_VECT_VAL (0xfL<<4) #define BCE_RPM_CONFIG_IGNORE_VLAN (1L<<31) +#define BCE_RPM_MGMT_PKT_CTRL 0x0000180c +#define BCE_RPM_MGMT_PKT_CTRL_MGMT_DISCARD_EN (1L<<30) +#define BCE_RPM_MGMT_PKT_CTRL_MGMT_EN (1L<<31) + #define BCE_RPM_VLAN_MATCH0 0x00001810 #define BCE_RPM_VLAN_MATCH0_RPM_VLAN_MTCH0_VALUE (0xfffL<<0) From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 21:12:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 672801065695; Wed, 20 Jan 2010 21:12:30 +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 577868FC08; Wed, 20 Jan 2010 21:12:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KLCUHD019225; Wed, 20 Jan 2010 21:12:30 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KLCUQp019223; Wed, 20 Jan 2010 21:12:30 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001202112.o0KLCUQp019223@svn.freebsd.org> From: Ed Schouten Date: Wed, 20 Jan 2010 21:12:30 +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: r202718 - head/usr.bin/getent X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 21:12:30 -0000 Author: ed Date: Wed Jan 20 21:12:30 2010 New Revision: 202718 URL: http://svn.freebsd.org/changeset/base/202718 Log: Also print UNIX timestamps in getent utmpx output. Modified: head/usr.bin/getent/getent.c Modified: head/usr.bin/getent/getent.c ============================================================================== --- head/usr.bin/getent/getent.c Wed Jan 20 20:33:10 2010 (r202717) +++ head/usr.bin/getent/getent.c Wed Jan 20 21:12:30 2010 (r202718) @@ -55,8 +55,9 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include +#include #include #include #include @@ -583,7 +584,9 @@ utmpxprint(const struct utmpx *ut) if (ut->ut_type == EMPTY) return; - printf("[%.24s] ", ctime(&ut->ut_tv.tv_sec)); + printf("[%jd.%06u -- %.24s] ", + (intmax_t)ut->ut_tv.tv_sec, (unsigned int)ut->ut_tv.tv_usec, + ctime(&ut->ut_tv.tv_sec)); switch (ut->ut_type) { case BOOT_TIME: From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 21:30:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3EF31065693; Wed, 20 Jan 2010 21:30:52 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0D2C8FC15; Wed, 20 Jan 2010 21:30:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KLUqRA023417; Wed, 20 Jan 2010 21:30:52 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KLUqxq023409; Wed, 20 Jan 2010 21:30:52 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201001202130.o0KLUqxq023409@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 20 Jan 2010 21:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202719 - in head: . gnu/usr.bin usr.bin usr.bin/bc usr.bin/bc/USD.doc usr.bin/dc usr.bin/dc/USD.doc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 21:30:53 -0000 Author: gabor (doc,ports committer) Date: Wed Jan 20 21:30:52 2010 New Revision: 202719 URL: http://svn.freebsd.org/changeset/base/202719 Log: Replace GNU bc/dc with BSDL versions ported from OpenBSD. They have a good compatibility level with the GNU counterparts and have shown to be mature enough. For now, the GNU versions aren't removed from the tree, just detached from the build. Sponsored by: Google Summer of Code 2008 Portbuild run by: erwin Approved by: delphij Added: head/usr.bin/bc/ head/usr.bin/bc/Makefile (contents, props changed) head/usr.bin/bc/USD.doc/ head/usr.bin/bc/USD.doc/Makefile (contents, props changed) head/usr.bin/bc/USD.doc/bc (contents, props changed) head/usr.bin/bc/bc.1 (contents, props changed) head/usr.bin/bc/bc.library (contents, props changed) head/usr.bin/bc/bc.y (contents, props changed) head/usr.bin/bc/extern.h (contents, props changed) head/usr.bin/bc/pathnames.h (contents, props changed) head/usr.bin/bc/scan.l (contents, props changed) head/usr.bin/dc/ head/usr.bin/dc/Makefile (contents, props changed) head/usr.bin/dc/USD.doc/ head/usr.bin/dc/USD.doc/Makefile (contents, props changed) head/usr.bin/dc/USD.doc/dc (contents, props changed) head/usr.bin/dc/bcode.c (contents, props changed) head/usr.bin/dc/bcode.h (contents, props changed) head/usr.bin/dc/dc.1 (contents, props changed) head/usr.bin/dc/dc.c (contents, props changed) head/usr.bin/dc/extern.h (contents, props changed) head/usr.bin/dc/inout.c (contents, props changed) head/usr.bin/dc/mem.c (contents, props changed) head/usr.bin/dc/stack.c (contents, props changed) Modified: head/ObsoleteFiles.inc head/gnu/usr.bin/Makefile head/usr.bin/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jan 20 21:12:30 2010 (r202718) +++ head/ObsoleteFiles.inc Wed Jan 20 21:30:52 2010 (r202719) @@ -14,6 +14,13 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100120: replacing GNU bc/dc with BSDL versions +OLD_FILES+=usr/share/examples/bc/ckbook.b +OLD_FILES+=usr/share/examples/bc/pi.b +OLD_FILES+=usr/share/examples/bc/primes.b +OLD_FILES+=usr/share/examples/bc/twins.b +OLD_FILES+=usr/share/info/dc.info.gz +OLD_DIRS+=usr/share/examples/bc # 20100114: removal of ttyslot(3) OLD_FILES+=usr/share/man/man3/ttyslot.3.gz # 20100113: remove utmp.h, replace it by utmpx.h Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Wed Jan 20 21:12:30 2010 (r202718) +++ head/gnu/usr.bin/Makefile Wed Jan 20 21:30:52 2010 (r202719) @@ -2,12 +2,10 @@ .include -SUBDIR= bc \ - ${_binutils} \ +SUBDIR= ${_binutils} \ ${_cc} \ ${_cpio} \ ${_cvs} \ - dc \ dialog \ diff \ diff3 \ Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Wed Jan 20 21:12:30 2010 (r202718) +++ head/usr.bin/Makefile Wed Jan 20 21:30:52 2010 (r202719) @@ -18,6 +18,7 @@ SUBDIR= alias \ awk \ banner \ basename \ + bc \ ${_biff} \ ${_bluetooth} \ brandelf \ @@ -49,6 +50,7 @@ SUBDIR= alias \ ${_csup} \ ${_ctags} \ cut \ + dc \ ${_dig} \ dirname \ du \ Added: head/usr.bin/bc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bc/Makefile Wed Jan 20 21:30:52 2010 (r202719) @@ -0,0 +1,17 @@ +# $FreeBSD$ +# $OpenBSD: Makefile,v 1.4 2006/06/30 19:02:28 otto Exp $ + +PROG= bc +SRCS= bc.y scan.l +CFLAGS+= -I. -I${.CURDIR} +WARNS?= 6 +#SUBDIR+= USD.doc + +FILES+= bc.library +FILESDIR= ${SHAREDIR}/misc + +#beforeinstall: +# install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/bc.library \ +# ${DESTDIR}/usr/share/misc + +.include Added: head/usr.bin/bc/USD.doc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bc/USD.doc/Makefile Wed Jan 20 21:30:52 2010 (r202719) @@ -0,0 +1,13 @@ +# $FreeBSD$ +# $OpenBSD: Makefile,v 1.3 2004/02/01 15:18:01 jmc Exp $ + +DOC= bc +DIR= usd/06.bc +SRCS= bc +MACROS= -ms +BINDIR= /usr/share/doc/papers + +paper.txt: ${SRCS} + ${ROFF} -Tascii ${SRCS} > ${.TARGET} + +.include Added: head/usr.bin/bc/USD.doc/bc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bc/USD.doc/bc Wed Jan 20 21:30:52 2010 (r202719) @@ -0,0 +1,1241 @@ +.\" $FreeBSD$ +.\" $OpenBSD: bc,v 1.9 2004/07/09 10:23:05 jmc Exp $ +.\" +.\" Copyright (C) Caldera International Inc. 2001-2002. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code and documentation 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 or owned by Caldera +.\" International, Inc. +.\" 4. Neither the name of Caldera International, Inc. nor the names of other +.\" contributors may be used to endorse or promote products derived from +.\" this software without specific prior written permission. +.\" +.\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA +.\" INTERNATIONAL, 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 CALDERA INTERNATIONAL, INC. 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. +.\" +.\" @(#)bc 6.2 (Berkeley) 4/17/91 +.\" +.if n \{\ +.po 5n +.ll 70n +.\} +.EH 'USD:6-%''BC \- An Arbitrary Precision Desk-Calculator Language' +.OH 'BC \- An Arbitrary Precision Desk-Calculator Language''USD:6-%' +.\".RP +.TL +BC \- An Arbitrary Precision Desk-Calculator Language +.AU +Lorinda Cherry +.AU +Robert Morris +.AI +.\" .MH +.AB +BC is a language and a compiler for doing arbitrary precision arithmetic +on the PDP-11 under the +.UX +time-sharing +system. The output of the compiler is interpreted and executed by +a collection of routines which can input, output, and do +arithmetic on indefinitely large integers and on scaled fixed-point +numbers. +.PP +These routines are themselves based on a dynamic storage allocator. +Overflow does not occur until all available core storage +is exhausted. +.PP +The language has a complete control structure as well as immediate-mode +operation. Functions can be defined and saved for later execution. +.PP +Two five hundred-digit numbers can be multiplied to give a +thousand digit result in about ten seconds. +.PP +A small collection of library functions is also available, +including sin, cos, arctan, log, exponential, and Bessel functions of +integer order. +.PP +Some of the uses of this compiler are +.IP \- +to do computation with large integers, +.IP \- +to do computation accurate to many decimal places, +.IP \- +conversion of numbers from one base to another base. +.AE +.PP +.SH +Introduction +.PP +BC is a language and a compiler for doing arbitrary precision +arithmetic on the +.UX +time-sharing system [1]. +The compiler was written to make conveniently available a +collection of routines (called DC [5]) which are capable of doing +arithmetic on integers of arbitrary size. The compiler +is by no means intended to provide a complete programming +language. +It is a minimal language facility. +.PP +There is a scaling provision that permits the +use of decimal point notation. +Provision is made for input and output in bases other than +decimal. Numbers can be converted from decimal to octal by +simply setting the output base to equal 8. +.PP +The actual limit on the number of digits that can +be handled depends on the amount of storage available on the machine. +Manipulation of numbers with many hundreds of digits +is possible even on the smallest versions of +.UX . +.PP +The syntax of BC has been deliberately selected to agree +substantially with the C language [2]. Those who +are familiar with C will find few surprises in this language. +.SH +Simple Computations with Integers +.PP +The simplest kind of statement is an arithmetic expression +on a line by itself. +For instance, if you type in the line: +.DS +.ft B +142857 + 285714 +.ft P +.DE +the program responds immediately with the line +.DS +.ft B +428571 +.ft P +.DE +The operators \-, *, /, %, and ^ can also be used; they +indicate subtraction, multiplication, division, remaindering, and +exponentiation, respectively. Division of integers produces an +integer result truncated toward zero. +Division by zero produces an error +comment. +.PP +Any term in an expression may be prefixed by a minus sign to +indicate that it is to be negated (the `unary' minus sign). +The expression +.DS +.ft B +7+\-3 +.ft P +.DE +is interpreted to mean that \-3 is to be added to 7. +.PP +More complex expressions with several operators and with +parentheses are interpreted just as in +Fortran, with ^ having the greatest binding +power, then * and % and /, and finally + and \-. +Contents of parentheses are evaluated before material +outside the parentheses. +Exponentiations are +performed from right to left and the other operators +from left to right. +The two expressions +.DS +.ft B +a^b^c and a^(b^c) +.ft P +.DE +are equivalent, as are the two expressions +.DS +.ft B +a*b*c and (a*b)*c +.ft P +.DE +BC shares with Fortran and C the undesirable convention that +.DS +\fBa/b*c\fP is equivalent to \fB(a/b)*c\fP +.ft P +.DE +.PP +Internal storage registers to hold numbers have single lower-case +letter names. The value of an expression can be assigned to +a register in the usual way. The statement +.DS +.ft B +x = x + 3 +.ft P +.DE +has the effect of increasing by three the value of the contents of the +register named x. +When, as in this case, the outermost operator is an =, the +assignment is performed but the result is not printed. +Only 26 of these named storage registers are available. +.PP +There is a built-in square root function whose +result is truncated to an integer (but see scaling below). +The lines +.DS +.ft B +x = sqrt(191) +x +.ft P +.DE +produce the printed result +.DS +.ft B +13 +.ft P +.DE +.SH +Bases +.PP +There are special internal quantities, called `ibase' and `obase'. +The contents of `ibase', initially set to 10, +determines the base used for interpreting numbers read in. +For example, the lines +.DS +.ft B +ibase = 8 +11 +.ft P +.DE +will produce the output line +.DS +.ft B +9 +.ft P +.DE +and you are all set up to do octal to decimal conversions. +Beware, however of trying to change the input base back +to decimal by typing +.DS +.ft B +ibase = 10 +.ft P +.DE +Because the number 10 is interpreted as octal, this statement will +have no effect. +For those who deal in hexadecimal notation, +the characters A\-F are permitted in numbers +(no matter what base is in effect) +and are +interpreted as digits having values 10\-15 respectively. +The statement +.DS +.ft B +ibase = A +.ft P +.DE +will change you back to decimal input base no matter what the +current input base is. +Negative and large positive input bases are +permitted but useless. +No mechanism has been provided for the input of arbitrary +numbers in bases less than 1 and greater than 16. +.PP +The contents of `obase', initially set to 10, are used as the base for output +numbers. The lines +.DS +.ft B +obase = 16 +1000 +.ft P +.DE +will produce the output line +.DS +.ft B +3E8 +.ft P +.DE +which is to be interpreted as a 3-digit hexadecimal number. +Very large output bases are permitted, and they are sometimes useful. +For example, large numbers can be output in groups of five digits +by setting `obase' to 100000. +Strange (i.e. 1, 0, or negative) output bases are +handled appropriately. +.PP +Very large numbers are split across lines with 70 characters per line. +Lines which are continued end with \\. +Decimal output conversion is practically instantaneous, but output +of very large numbers (i.e., more than 100 digits) with other bases +is rather slow. +Non-decimal output conversion of +a one hundred digit number takes about +three seconds. +.PP +It is best to remember that `ibase' and `obase' have no effect +whatever on the course of internal computation or +on the evaluation of expressions, but only affect input and +output conversion, respectively. +.SH +Scaling +.PP +A third special internal quantity called `scale' is +used to determine the scale of calculated +quantities. +Numbers may have +up to a specific number of decimal digits after the decimal point. +This fractional part is retained in further computations. +We refer to the number of digits after the decimal point of +a number as its scale. +The current implementation allows scales to be as large as can be +represented by a 32-bit unsigned number minus one. +This is a non-portable extension. +The original implementation allowed for a maximum scale of 99. +.PP +When two scaled numbers are combined by +means of one of the arithmetic operations, the result +has a scale determined by the following rules. For +addition and subtraction, the scale of the result is the larger +of the scales of the two operands. In this case, +there is never any truncation of the result. +For multiplications, the scale of the result is never +less than the maximum of the two scales of the operands, +never more than the sum of the scales of the operands +and, subject to those two restrictions, +the scale of the result is set equal to the contents of the internal +quantity `scale'. +The scale of a quotient is the contents of the internal +quantity `scale'. The scale of a remainder is +the sum of the scales of the quotient and the divisor. +The result of an exponentiation is scaled as if +the implied multiplications were performed. +An exponent must be an integer. +The scale of a square root is set to the maximum of the scale +of the argument and the contents of `scale'. +.PP +All of the internal operations are actually carried out in terms +of integers, with digits being discarded when necessary. +In every case where digits are discarded, truncation and +not rounding is performed. +.PP +The contents of +`scale' must be no greater than +4294967294 and no less than 0. It is initially set to 0. +.PP +The internal quantities `scale', `ibase', and `obase' can be +used in expressions just like other variables. +The line +.DS +.ft B +scale = scale + 1 +.ft P +.DE +increases the value of `scale' by one, and the line +.DS +.ft B +scale +.ft P +.DE +causes the current value of `scale' to be printed. +.PP +The value of `scale' retains its meaning as a +number of decimal digits to be retained in internal +computation even when `ibase' or `obase' are not equal to 10. +The internal computations (which are still conducted in decimal, +regardless of the bases) are performed to the specified number +of decimal digits, never hexadecimal or octal or any +other kind of digits. +.SH +Functions +.PP +The name of a function is a single lower-case letter. +Function names are permitted to collide with simple +variable names. +Twenty-six different defined functions are permitted +in addition to the twenty-six variable names. +The line +.DS +.ft B + define a(x){ +.ft P +.DE +begins the definition of a function with one argument. +This line must be followed by one or more statements, +which make up the body of the function, ending +with a right brace }. +Return of control from a function occurs when a return +statement is executed or when the end of the function is reached. +The return statement can take either +of the two forms +.DS +.ft B +return +return(x) +.ft P +.DE +In the first case, the value of the function is 0, and in +the second, the value of the expression in parentheses. +.PP +Variables used in the function can be declared as automatic +by a statement of the form +.DS +.ft B +auto x,y,z +.ft P +.DE +There can be only one `auto' statement in a function and it must +be the first statement in the definition. +These automatic variables are allocated space and initialized +to zero on entry to the function and thrown away on return. The +values of any variables with the same names outside the function +are not disturbed. +Functions may be called recursively and the automatic variables +at each level of call are protected. +The parameters named in a function definition are treated in +the same way as the automatic variables of that function +with the single exception that they are given a value +on entry to the function. +An example of a function definition is +.DS +.ft B + define a(x,y){ + auto z + z = x*y + return(z) + } +.ft P +.DE +The value of this function, when called, will be the +product of its +two arguments. +.PP +A function is called by the appearance of its name +followed by a string of arguments enclosed in +parentheses and separated by commas. +The result +is unpredictable if the wrong number of arguments is used. +.PP +Functions with no arguments are defined and called using +parentheses with nothing between them: b(). +.PP +If the function +.ft I +a +.ft +above has been defined, then the line +.DS +.ft B +a(7,3.14) +.ft P +.DE +would cause the result 21.98 to be printed and the line +.DS +.ft B +x = a(a(3,4),5) +.ft P +.DE +would cause the value of x to become 60. +.SH +Subscripted Variables +.PP +A single lower-case letter variable name +followed by an expression in brackets is called a subscripted +variable (an array element). +The variable name is called the array name and the expression +in brackets is called the subscript. +Only one-dimensional arrays are +permitted. The names of arrays are permitted to +collide with the names of simple variables and function names. +Any fractional +part of a subscript is discarded before use. +Subscripts must be greater than or equal to zero and +less than or equal to 2047. +.PP +Subscripted variables may be freely used in expressions, in +function calls, and in return statements. +.PP +An array name may be used as an argument to a function, +or may be declared as automatic in +a function definition by the use of empty brackets: +.DS +.ft B +f(a[\|]) +define f(a[\|]) +auto a[\|] +.ft P +.DE +When an array name is so used, the whole contents of the array +are copied for the use of the function, and thrown away on exit +from the function. +Array names which refer to whole arrays cannot be used +in any other contexts. +.SH +Control Statements +.PP +The `if', the `while', and the `for' statements +may be used to alter the flow within programs or to cause iteration. +The range of each of them is a statement or +a compound statement consisting of a collection of +statements enclosed in braces. +They are written in the following way +.DS +.ft B +if(relation) statement +if(relation) statement else statement +while(relation) statement +for(expression1; relation; expression2) statement +.ft P +.DE +or +.DS +.ft B +if(relation) {statements} +if(relation) {statements} else {statements} +while(relation) {statements} +for(expression1; relation; expression2) {statements} +.ft P +.DE +.PP +A relation in one of the control statements is an expression of the form +.DS +.ft B +x>y +.ft P +.DE +where two expressions are related by one of the six relational +operators `<', `>', `<=', `>=', `==', or `!='. +The relation `==' +stands for `equal to' and `!=' stands for `not equal to'. +The meaning of the remaining relational operators is +clear. +.PP +BEWARE of using `=' instead of `==' in a relational. Unfortunately, +both of them are legal, so you will not get a diagnostic +message, but `=' really will not do a comparison. +.PP +The `if' statement causes execution of its range +if and only if the relation is true. +Then control passes to the next statement in sequence. +If an `else' branch is present, the statements in this branch are +executed if the relation is false. +The `else' keyword is a non-portable extension. +.PP +The `while' statement causes execution of its range +repeatedly as long as the relation +is true. The relation is tested before each execution +of its range and if the relation +is false, control passes to the next statement beyond the range +of the while. +.PP +The `for' statement begins +by executing `expression1'. Then the relation is tested +and, if true, the statements in the range of the `for' are executed. +Then `expression2' is executed. The relation is tested, and so on. +The typical use of the `for' statement is for a controlled iteration, +as in the statement +.DS +.ft B +for(i=1; i<=10; i=i+1) i +.ft P +.DE +which will print the integers from 1 to 10. +Here are some examples of the use of the control statements. +.DS +.ft B +define f(n){ +auto i, x +x=1 +for(i=1; i<=n; i=i+1) x=x*i +return(x) +} +.ft P +.DE +The line +.DS +.ft B + f(a) +.ft P +.DE +will print +.ft I +a +.ft +factorial if +.ft I +a +.ft +is a positive integer. +Here is the definition of a function which will +compute values of the binomial coefficient +(m and n are assumed to be positive integers). +.DS +.ft B +define b(n,m){ +auto x, j +x=1 +for(j=1; j<=m; j=j+1) x=x*(n\-j+1)/j +return(x) +} +.ft P +.DE +The following function computes values of the exponential function +by summing the appropriate series +without regard for possible truncation errors: +.DS +.ft B +scale = 20 +define e(x){ + auto a, b, c, d, n + a = 1 + b = 1 + c = 1 + d = 0 + n = 1 + while(1==1){ + a = a*x + b = b*n + c = c + a/b + n = n + 1 + if(c==d) return(c) + d = c + } +} +.ft P +.DE +.SH +Some Details +.PP +There are some language features that every user should know +about even if he will not use them. +.PP +Normally statements are typed one to a line. It is also permissible +to type several statements on a line separated by semicolons. +.PP +If an assignment statement is parenthesized, it then has +a value and it can be used anywhere that an expression can. +For example, the line +.DS +.ft B +(x=y+17) +.ft P +.DE +not only makes the indicated assignment, but also prints the +resulting value. +.PP +Here is an example of a use of the value of an +assignment statement even when it is not parenthesized. +.DS +.ft B +x = a[i=i+1] +.ft P +.DE +causes a value to be assigned to x and also increments i +before it is used as a subscript. +.PP +The following constructs work in BC in exactly the same manner +as they do in the C language. Consult the appendix or the +C manuals [2] for their exact workings. +.DS +.ft B +.ta 2i +x=y=z is the same as x=(y=z) +x += y x = x+y +x \-= y x = x\-y +x *= y x = x*y +x /= y x = x/y +x %= y x = x%y +x ^= y x = x^y +x++ (x=x+1)\-1 +x\-\- (x=x\-1)+1 +++x x = x+1 +\-\-x x = x\-1 +.ft P +.DE +Even if you don't intend to use the constructs, +if you type one inadvertently, something correct but unexpected +may happen. +.SH +Three Important Things +.PP +1. To exit a BC program, type `quit'. +.PP +2. There is a comment convention identical to that of C and +of PL/I. Comments begin with `/*' and end with `*/'. +As a non-portable extension, comments may also start with a `#' and end with +a newline. +The newline is not part of the comment. +.PP +3. There is a library of math functions which may be obtained by +typing at command level +.DS +.ft B +bc \-l +.ft P +.DE +This command will load a set of library functions +which, at the time of writing, consists of sine (named `s'), +cosine (`c'), arctangent (`a'), natural logarithm (`l'), +exponential (`e') and Bessel functions of integer order (`j(n,x)'). Doubtless more functions will be added +in time. +The library sets the scale to 20. You can reset it to something +else if you like. +The design of these mathematical library routines +is discussed elsewhere [3]. +.PP +If you type +.DS +.ft B +bc file ... +.ft P +.DE +BC will read and execute the named file or files before accepting +commands from the keyboard. In this way, you may load your +favorite programs and function definitions. +.SH +Acknowledgement +.PP +The compiler is written in YACC [4]; its original +version was written by S. C. Johnson. +.SH +References +.IP [1] +K. Thompson and D. M. Ritchie, +.ft I +UNIX Programmer's Manual, +.ft +Bell Laboratories, +1978. +.IP [2] +B. W. Kernighan and +D. M. Ritchie, +.ft I +The C Programming Language, +.ft +Prentice-Hall, 1978. +.IP [3] +R. Morris, +.ft I +A Library of Reference Standard Mathematical Subroutines, +.ft +Bell Laboratories internal memorandum, 1975. +.IP [4] +S. C. Johnson, +.ft I +YACC \(em Yet Another Compiler-Compiler. +.ft +Bell Laboratories Computing Science Technical Report #32, 1978. +.IP [5] +R. Morris and L. L. Cherry, +.ft I +DC \- An Interactive Desk Calculator. +.ft +.LP +.bp +.ft B +.DS C +Appendix +.DE +.ft +.NH +Notation +.PP +In the following pages syntactic categories are in \fIitalics\fP; +literals are in \fBbold\fP; material in brackets [\|] is optional. +.NH +Tokens +.PP +Tokens consist of keywords, identifiers, constants, operators, +and separators. +Token separators may be blanks, tabs or comments. +Newline characters or semicolons separate statements. +.NH 2 +Comments +.PP +Comments are introduced by the characters /* and terminated by +*/. +As a non-portable extension, comments may also start with a # and +end with a newline. +The newline is not part of the comment. +.NH 2 +Identifiers +.PP +There are three kinds of identifiers \- ordinary identifiers, array identifiers +and function identifiers. +All three types consist of single lower-case letters. +Array identifiers are followed by square brackets, possibly +enclosing an expression describing a subscript. +Arrays are singly dimensioned and may contain up to 2048 +elements. +Indexing begins at zero so an array may be indexed from 0 to 2047. +Subscripts are truncated to integers. +Function identifiers are followed by parentheses, possibly enclosing arguments. +The three types of identifiers do not conflict; +a program can have a variable named \fBx\fP, +an array named \fBx\fP and a function named \fBx\fP, all of which are separate and +distinct. +.NH 2 +Keywords +.PP +The following are reserved keywords: +.ft B +.ta .5i 1.0i +.nf + ibase if + obase break + scale define + sqrt auto + length return + while quit + for continue + else last + print +.fi +.ft +.NH 2 +Constants +.PP +Constants consist of arbitrarily long numbers +with an optional decimal point. +The hexadecimal digits \fBA\fP\-\fBF\fP are also recognized as digits with +values 10\-15, respectively. +.NH 1 +Expressions +.PP +The value of an expression is printed unless the main +operator is an assignment. +The value printed is assigned to the special variable \fBlast\fP. +A single dot may be used as a synonym for \fBlast\fP. +This is a non-portable extension. +Precedence is the same as the order +of presentation here, with highest appearing first. +Left or right associativity, where applicable, is +discussed with each operator. +.bp +.NH 2 +Primitive expressions +.NH 3 +Named expressions +.PP +Named expressions are +places where values are stored. +Simply stated, +named expressions are legal on the left +side of an assignment. +The value of a named expression is the value stored in the place named. +.NH 4 +\fIidentifiers\fR +.PP +Simple identifiers are named expressions. +They have an initial value of zero. +.NH 4 +\fIarray-name\fP\|[\|\fIexpression\fP\|] +.PP +Array elements are named expressions. +They have an initial value of zero. +.NH 4 +\fBscale\fR, \fBibase\fR and \fBobase\fR +.PP +The internal registers +\fBscale\fP, \fBibase\fP and \fBobase\fP are all named expressions. +\fBscale\fP is the number of digits after the decimal point to be +retained in arithmetic operations. +\fBscale\fR has an initial value of zero. +\fBibase\fP and \fBobase\fP are the input and output number +radix respectively. +Both \fBibase\fR and \fBobase\fR have initial values of 10. +.NH 3 +Function calls +.NH 4 +\fIfunction-name\fB\|(\fR[\fIexpression\fR\|[\fB,\|\fIexpression\|\fR.\|.\|.\|]\|]\fB) +.PP +A function call consists of a function name followed by parentheses +containing a comma-separated list of +expressions, which are the function arguments. +A whole array passed as an argument is specified by the +array name followed by empty square brackets. +All function arguments are passed by +value. +As a result, changes made to the formal parameters have +no effect on the actual arguments. +If the function terminates by executing a return +statement, the value of the function is +the value of the expression in the parentheses of the return +statement or is zero if no expression is provided +or if there is no return statement. +.NH 4 +sqrt\|(\|\fIexpression\fP\|) +.PP +The result is the square root of the expression. +The result is truncated in the least significant decimal place. +The scale of the result is +the scale of the expression or the +value of +.ft B +scale, +.ft +whichever is larger. +.NH 4 +length\|(\|\fIexpression\fP\|) +.PP +The result is the total number of significant decimal digits in the expression. +The scale of the result is zero. +.NH 4 +scale\|(\|\fIexpression\fP\|) +.PP +The result is the scale of the expression. +The scale of the result is zero. +.NH 3 +Constants +.PP +Constants are primitive expressions. +.NH 3 +Parentheses +.PP +An expression surrounded by parentheses is +a primitive expression. +The parentheses are used to alter the +normal precedence. +.NH 2 +Unary operators +.PP +The unary operators +bind right to left. +.NH 3 +\-\|\fIexpression\fP *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 22:26:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 042CC106566C; Wed, 20 Jan 2010 22:26:37 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E904C8FC1D; Wed, 20 Jan 2010 22:26:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KMQaU0036006; Wed, 20 Jan 2010 22:26:36 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KMQas9036004; Wed, 20 Jan 2010 22:26:36 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201001202226.o0KMQas9036004@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 20 Jan 2010 22:26:36 +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: r202721 - head/lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 22:26:37 -0000 Author: pjd Date: Wed Jan 20 22:26:36 2010 New Revision: 202721 URL: http://svn.freebsd.org/changeset/base/202721 Log: The waitpid(2) function needs neither sys/time.h nor sys/resource.h. Modified: head/lib/libc/sys/wait.2 Modified: head/lib/libc/sys/wait.2 ============================================================================== --- head/lib/libc/sys/wait.2 Wed Jan 20 22:18:57 2010 (r202720) +++ head/lib/libc/sys/wait.2 Wed Jan 20 22:26:36 2010 (r202721) @@ -44,10 +44,10 @@ .In sys/wait.h .Ft pid_t .Fn wait "int *status" -.In sys/time.h -.In sys/resource.h .Ft pid_t .Fn waitpid "pid_t wpid" "int *status" "int options" +.In sys/time.h +.In sys/resource.h .Ft pid_t .Fn wait3 "int *status" "int options" "struct rusage *rusage" .Ft pid_t From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 22:36:24 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 497D51065670; Wed, 20 Jan 2010 22:36:24 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 113298FC1F; Wed, 20 Jan 2010 22:36:24 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 567491CE54; Wed, 20 Jan 2010 23:36:23 +0100 (CET) Date: Wed, 20 Jan 2010 23:36:23 +0100 From: Ed Schouten To: Gabor Kovesdan Message-ID: <20100120223623.GI77705@hoeg.nl> References: <201001202130.o0KLUqxq023409@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="boAH8PqvUi1v1f55" Content-Disposition: inline In-Reply-To: <201001202130.o0KLUqxq023409@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202719 - in head: . gnu/usr.bin usr.bin usr.bin/bc usr.bin/bc/USD.doc usr.bin/dc usr.bin/dc/USD.doc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 22:36:24 -0000 --boAH8PqvUi1v1f55 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Gabor, First of all, very nice job! * Gabor Kovesdan wrote: > Modified: head/ObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/ObsoleteFiles.inc Wed Jan 20 21:12:30 2010 (r202718) > +++ head/ObsoleteFiles.inc Wed Jan 20 21:30:52 2010 (r202719) > @@ -14,6 +14,13 @@ > # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS l= ast. > # > =20 > +# 20100120: replacing GNU bc/dc with BSDL versions > +OLD_FILES+=3Dusr/share/examples/bc/ckbook.b > +OLD_FILES+=3Dusr/share/examples/bc/pi.b > +OLD_FILES+=3Dusr/share/examples/bc/primes.b > +OLD_FILES+=3Dusr/share/examples/bc/twins.b > +OLD_FILES+=3Dusr/share/info/dc.info.gz > +OLD_DIRS+=3Dusr/share/examples/bc > # 20100114: removal of ttyslot(3) > OLD_FILES+=3Dusr/share/man/man3/ttyslot.3.gz > # 20100113: remove utmp.h, replace it by utmpx.h Not that I care about these example files, but why have they been removed? Are they GPL licensed as well? --=20 Ed Schouten WWW: http://80386.nl/ --boAH8PqvUi1v1f55 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktXhWcACgkQ52SDGA2eCwVrQQCcDLrjpOxa51lV21a8eVeG/cdR Lr4Ani2KKk2WBANBTV8T9iPFS202IndV =KhfD -----END PGP SIGNATURE----- --boAH8PqvUi1v1f55-- From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 22:39:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E44D61065670; Wed, 20 Jan 2010 22:39:37 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 997B78FC1B; Wed, 20 Jan 2010 22:39:37 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 9C18A14DA30E; Wed, 20 Jan 2010 23:39:36 +0100 (CET) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fDoZvgezuN22; Wed, 20 Jan 2010 23:39:27 +0100 (CET) Received: from [192.168.1.105] (catv-89-132-179-104.catv.broadband.hu [89.132.179.104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 29EDB14DA2FD; Wed, 20 Jan 2010 23:39:27 +0100 (CET) Message-ID: <4B57861D.6040507@FreeBSD.org> Date: Wed, 20 Jan 2010 23:39:25 +0100 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; es-ES; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Ed Schouten References: <201001202130.o0KLUqxq023409@svn.freebsd.org> <20100120223623.GI77705@hoeg.nl> In-Reply-To: <20100120223623.GI77705@hoeg.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202719 - in head: . gnu/usr.bin usr.bin usr.bin/bc usr.bin/bc/USD.doc usr.bin/dc usr.bin/dc/USD.doc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 22:39:38 -0000 El 2010. 01. 20. 23:36, Ed Schouten escribió: >> >> +# 20100120: replacing GNU bc/dc with BSDL versions >> +OLD_FILES+=usr/share/examples/bc/ckbook.b >> +OLD_FILES+=usr/share/examples/bc/pi.b >> +OLD_FILES+=usr/share/examples/bc/primes.b >> +OLD_FILES+=usr/share/examples/bc/twins.b >> +OLD_FILES+=usr/share/info/dc.info.gz >> +OLD_DIRS+=usr/share/examples/bc >> # 20100114: removal of ttyslot(3) >> OLD_FILES+=usr/share/man/man3/ttyslot.3.gz >> # 20100113: remove utmp.h, replace it by utmpx.h >> > Not that I care about these example files, but why have they been > removed? Are they GPL licensed as well? > Most probably, yes. They are part of the GNU bc distribution and there is no implicit license information inside the files or the Examples directory, which imo means the same license apply to these files. -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org From owner-svn-src-head@FreeBSD.ORG Wed Jan 20 22:46:00 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 252A1106566B; Wed, 20 Jan 2010 22:46:00 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 161D98FC0C; Wed, 20 Jan 2010 22:46:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0KMjxrn040395; Wed, 20 Jan 2010 22:45:59 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0KMjx68040393; Wed, 20 Jan 2010 22:45:59 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201001202245.o0KMjx68040393@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 20 Jan 2010 22:45: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: r202722 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 22:46:00 -0000 Author: gabor (doc,ports committer) Date: Wed Jan 20 22:45:59 2010 New Revision: 202722 URL: http://svn.freebsd.org/changeset/base/202722 Log: - Bump __FreeBSD_version for BSDL bc/dc import to deprecate GNU bc/dc Approved by: delphij Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Jan 20 22:26:36 2010 (r202721) +++ head/sys/sys/param.h Wed Jan 20 22:45:59 2010 (r202722) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900007 /* Master, propagated to newvers */ +#define __FreeBSD_version 900008 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 00:15:59 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0507106568F; Thu, 21 Jan 2010 00:15:59 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C01C38FC14; Thu, 21 Jan 2010 00:15:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0FxBl060333; Thu, 21 Jan 2010 00:15:59 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L0Fxm2060330; Thu, 21 Jan 2010 00:15:59 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201001210015.o0L0Fxm2060330@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Thu, 21 Jan 2010 00:15: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: r202723 - head/sys/mips/atheros X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 00:15:59 -0000 Author: gonzo Date: Thu Jan 21 00:15:59 2010 New Revision: 202723 URL: http://svn.freebsd.org/changeset/base/202723 Log: - Remove unnecessary register writes in activate_device and deactivate_device - Save state before attaching driver and restore it when detaching - Clear CLK bit after last bit of byte has been sent over the bus providing falling edge for last byte in transfer - Fix several places where CS0 was always assumed - Add $FreeBSD$ to ar71xxreg.h Modified: head/sys/mips/atheros/ar71xx_spi.c head/sys/mips/atheros/ar71xxreg.h Modified: head/sys/mips/atheros/ar71xx_spi.c ============================================================================== --- head/sys/mips/atheros/ar71xx_spi.c Wed Jan 20 22:45:59 2010 (r202722) +++ head/sys/mips/atheros/ar71xx_spi.c Thu Jan 21 00:15:59 2010 (r202723) @@ -77,7 +77,7 @@ __FBSDID("$FreeBSD$"); struct ar71xx_spi_softc { device_t sc_dev; struct resource *sc_mem_res; - uint32_t sc_reg_ioctrl; + uint32_t sc_reg_ctrl; }; static int @@ -102,12 +102,11 @@ ar71xx_spi_attach(device_t dev) return (ENXIO); } - sc->sc_reg_ioctrl = SPI_READ(sc, AR71XX_SPI_IO_CTRL); - SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, SPI_IO_CTRL_CS0 | SPI_IO_CTRL_CS1 | - SPI_IO_CTRL_CS2); - SPI_WRITE(sc, AR71XX_SPI_CTRL, sc->sc_reg_ioctrl); - SPI_WRITE(sc, AR71XX_SPI_FS, 0); + SPI_WRITE(sc, AR71XX_SPI_FS, 1); + sc->sc_reg_ctrl = SPI_READ(sc, AR71XX_SPI_CTRL); + SPI_WRITE(sc, AR71XX_SPI_CTRL, 0x43); + SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, SPI_IO_CTRL_CSMASK); device_add_child(dev, "spibus", 0); return (bus_generic_attach(dev)); @@ -116,14 +115,12 @@ ar71xx_spi_attach(device_t dev) static void ar71xx_spi_chip_activate(struct ar71xx_spi_softc *sc, int cs) { - uint32_t ioctrl = SPI_IO_CTRL_CS0 |SPI_IO_CTRL_CS1 | SPI_IO_CTRL_CS2; + uint32_t ioctrl = SPI_IO_CTRL_CSMASK; /* * Put respective CSx to low */ ioctrl &= ~(SPI_IO_CTRL_CS0 << cs); - SPI_WRITE(sc, AR71XX_SPI_FS, 1); - SPI_WRITE(sc, AR71XX_SPI_CTRL, 0x43); SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, ioctrl); } @@ -133,18 +130,19 @@ ar71xx_spi_chip_deactivate(struct ar71xx /* * Put all CSx to high */ - SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, SPI_IO_CTRL_CS0 | SPI_IO_CTRL_CS1 | - SPI_IO_CTRL_CS2); - SPI_WRITE(sc, AR71XX_SPI_CTRL, sc->sc_reg_ioctrl); - SPI_WRITE(sc, AR71XX_SPI_FS, 0); + SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, SPI_IO_CTRL_CSMASK); } static uint8_t -ar71xx_spi_txrx(struct ar71xx_spi_softc *sc, uint8_t data) +ar71xx_spi_txrx(struct ar71xx_spi_softc *sc, int cs, uint8_t data) { int bit; /* CS0 */ - uint32_t ioctrl = SPI_IO_CTRL_CS1 | SPI_IO_CTRL_CS2; + uint32_t ioctrl = SPI_IO_CTRL_CSMASK; + /* + * low-level for selected CS + */ + ioctrl &= ~(SPI_IO_CTRL_CS0 << cs); uint32_t iod, rds; for (bit = 7; bit >=0; bit--) { @@ -156,6 +154,10 @@ ar71xx_spi_txrx(struct ar71xx_spi_softc SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, iod | SPI_IO_CTRL_CLK); } + /* + * Provide falling edge for connected device by clear clock bit. + */ + SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, iod); rds = SPI_READ(sc, AR71XX_SPI_RDS); return (rds & 0xff); @@ -184,7 +186,7 @@ ar71xx_spi_transfer(device_t dev, device buf_out = (uint8_t *)cmd->tx_cmd; buf_in = (uint8_t *)cmd->rx_cmd; for (i = 0; i < cmd->tx_cmd_sz; i++) - buf_in[i] = ar71xx_spi_txrx(sc, buf_out[i]); + buf_in[i] = ar71xx_spi_txrx(sc, devi->cs, buf_out[i]); /* * Receive/transmit data (depends on command) @@ -192,7 +194,7 @@ ar71xx_spi_transfer(device_t dev, device buf_out = (uint8_t *)cmd->tx_data; buf_in = (uint8_t *)cmd->rx_data; for (i = 0; i < cmd->tx_data_sz; i++) - buf_in[i] = ar71xx_spi_txrx(sc, buf_out[i]); + buf_in[i] = ar71xx_spi_txrx(sc, devi->cs, buf_out[i]); ar71xx_spi_chip_deactivate(sc, devi->cs); @@ -202,8 +204,15 @@ ar71xx_spi_transfer(device_t dev, device static int ar71xx_spi_detach(device_t dev) { + struct ar71xx_spi_softc *sc = device_get_softc(dev); - return (EBUSY); /* XXX */ + SPI_WRITE(sc, AR71XX_SPI_CTRL, sc->sc_reg_ctrl); + SPI_WRITE(sc, AR71XX_SPI_FS, 0); + + if (sc->sc_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + + return (0); } static device_method_t ar71xx_spi_methods[] = { Modified: head/sys/mips/atheros/ar71xxreg.h ============================================================================== --- head/sys/mips/atheros/ar71xxreg.h Wed Jan 20 22:45:59 2010 (r202722) +++ head/sys/mips/atheros/ar71xxreg.h Thu Jan 21 00:15:59 2010 (r202723) @@ -23,6 +23,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + +/* $FreeBSD$ */ + #ifndef _AR71XX_REG_H_ #define _AR71XX_REG_H_ @@ -422,6 +425,7 @@ #define SPI_IO_CTRL_CS2 (1 << 18) #define SPI_IO_CTRL_CS1 (1 << 17) #define SPI_IO_CTRL_CS0 (1 << 16) +#define SPI_IO_CTRL_CSMASK (7 << 16) #define SPI_IO_CTRL_CLK (1 << 8) #define SPI_IO_CTRL_DO 1 #define AR71XX_SPI_RDS 0x0C From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 01:43:23 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1F12106566B; Thu, 21 Jan 2010 01:43:23 +0000 (UTC) (envelope-from wkoszek@freebsd.czest.pl) Received: from freebsd.czest.pl (l95h.icis.pcz.pl [212.87.224.105]) by mx1.freebsd.org (Postfix) with ESMTP id 4639F8FC1A; Thu, 21 Jan 2010 01:43:22 +0000 (UTC) Received: from freebsd.czest.pl (l95h.icis.pcz.pl [212.87.224.105]) by freebsd.czest.pl (8.14.2/8.14.2) with ESMTP id o0L1ttbK083629; Thu, 21 Jan 2010 02:55:55 +0100 (CET) (envelope-from wkoszek@freebsd.czest.pl) Received: (from wkoszek@localhost) by freebsd.czest.pl (8.14.2/8.14.2/Submit) id o0L1ttMV083628; Thu, 21 Jan 2010 02:55:55 +0100 (CET) (envelope-from wkoszek) Date: Thu, 21 Jan 2010 02:55:55 +0100 From: "Wojciech A. Koszek" To: Alexander Leidinger Message-ID: <20100121015554.GI1990@FreeBSD.org> Mail-Followup-To: Alexander Leidinger , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201001182246.o0IMk6dw000346@svn.freebsd.org> <20100119091500.17856jhlpl7mjsow@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <20100119091500.17856jhlpl7mjsow@webmail.leidinger.net> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-3.0 (freebsd.czest.pl [212.87.224.105]); Thu, 21 Jan 2010 02:55:55 +0100 (CET) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202598 - head/sys/compat/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 01:43:23 -0000 On Tue, Jan 19, 2010 at 09:15:00AM +0100, Alexander Leidinger wrote: > Quoting "Wojciech A. Koszek" (from Mon, 18 Jan 2010 > 22:46:06 +0000 (UTC)): > >> Author: wkoszek >> Date: Mon Jan 18 22:46:06 2010 >> New Revision: 202598 >> URL: http://svn.freebsd.org/changeset/base/202598 >> >> Log: >> Let us to use our libusb(3) in Linuxolator. >> >> With this change, Linux binaries can work with our libusb(3) when >> it's compiled against our header files on GNU/Linux system -- this >> solves the problem with differences between /dev layouts. >> >> With ported libusb(3), I am able to use my USB JTAG cable with Linux >> binaries that support it. > > The commit log is IMHO omitting the info if you checked (or not) that there > is no linux ioctl in this range. It would also be nice if the comment in > linux_ioctl.h tells to check that there is no clash with a linux ioctl when > the min/max is changed. Sorry for delay. I have tested it against ioctl() calls submitted by ported libusb(3). Apparently, all ioctl() requests in my execution path didn't hit our emulator, thus I was getting warnings about unsupported ioctl(). Thus, I reserved a range for them. However, it looks like conflict exists with Linux *SND* stuff. I believe the easiest solution would be based on picking "untypable" values for commands: #define BSDEMUL_USB_REQUEST _IOWR(3, 1, struct usb_ctl_request) And putting them into linux_ioctl.h just like any other ioctl(). Simple mapping would be provided for those calls to our native USB stack. grep(1) says 3 or 4 passed as a ioctl() should be fine, since none of those seem to be used in Linux. I could bring the same macros to ported libusb(3) easily, so that we'd be using something that Linuxolator can finally understand in a unique way. Does is sound like an acceptable solution? -- Wojciech A. Koszek wkoszek@FreeBSD.org http://FreeBSD.czest.pl/~wkoszek/ From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 02:21:32 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38322106566C; Thu, 21 Jan 2010 02:21:32 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27E8F8FC16; Thu, 21 Jan 2010 02:21:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L2LW1l088541; Thu, 21 Jan 2010 02:21:32 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L2LWHE088539; Thu, 21 Jan 2010 02:21:32 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001210221.o0L2LWHE088539@svn.freebsd.org> From: Neel Natu Date: Thu, 21 Jan 2010 02:21: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: r202732 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 02:21:32 -0000 Author: neel Date: Thu Jan 21 02:21:31 2010 New Revision: 202732 URL: http://svn.freebsd.org/changeset/base/202732 Log: Get rid of redundant setting of interrupt enable bit when restoring the status register from the PCB. Remove a couple of misleading comments while I am here. The comments are misleading because they imply that interrupts will be enabled after the status register is restored from the PCB. This is not the case because the processor is at the exception level (SR_EXL is set). Approved by: imp (mentor) Modified: head/sys/mips/mips/exception.S Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Thu Jan 21 00:54:22 2010 (r202731) +++ head/sys/mips/mips/exception.S Thu Jan 21 02:21:31 2010 (r202732) @@ -581,16 +581,10 @@ NNON_LEAF(MipsUserGenException, STAND_FR #ifdef TARGET_OCTEON and k0, k0, ~(MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) #endif - or k0, k0, (MIPS_SR_INT_IE) .set noat RESTORE_U_PCB_REG(AT, AST, k1) -/* - * The restoration of the user SR must be done only after - * k1 is no longer needed. Otherwise, k1 will get clobbered after - * interrupts are enabled. - */ - mtc0 k0, COP_0_STATUS_REG # still exeption level + mtc0 k0, COP_0_STATUS_REG # still exception level ITLBNOPFIX sync eret @@ -814,15 +808,9 @@ NNON_LEAF(MipsUserIntr, STAND_FRAME_SIZE #ifdef TARGET_OCTEON and k0, k0, ~(MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) #endif - or k0, k0, (MIPS_SR_INT_IE|SR_EXL) .set noat RESTORE_U_PCB_REG(AT, AST, k1) -/* - * The restoration of the user SR must be done only after - * k1 is no longer needed. Otherwise, k1 will get clobbered after - * interrupts are enabled. - */ mtc0 k0, COP_0_STATUS_REG # SR with EXL set. ITLBNOPFIX sync From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 03:49:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 622C8106566C; Thu, 21 Jan 2010 03:49:18 +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 515AA8FC14; Thu, 21 Jan 2010 03:49:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L3nI1p008349; Thu, 21 Jan 2010 03:49:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L3nIBc008347; Thu, 21 Jan 2010 03:49:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201001210349.o0L3nIBc008347@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 21 Jan 2010 03:49:18 +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: r202734 - head/usr.sbin/extattr X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 03:49:18 -0000 Author: nwhitehorn Date: Thu Jan 21 03:49:18 2010 New Revision: 202734 URL: http://svn.freebsd.org/changeset/base/202734 Log: Fix a bug when printing attributes from multiple files: buflen could be longer than the length of the current attribute if the buffer were reused and previously longer, so bits of the previous, longer attribute would be written. Fix this by using the actual attribute length. Modified: head/usr.sbin/extattr/rmextattr.c Modified: head/usr.sbin/extattr/rmextattr.c ============================================================================== --- head/usr.sbin/extattr/rmextattr.c Thu Jan 21 03:06:52 2010 (r202733) +++ head/usr.sbin/extattr/rmextattr.c Thu Jan 21 03:49:18 2010 (r202734) @@ -269,7 +269,7 @@ main(int argc, char *argv[]) printf("\n"); continue; } else { - fwrite(buf, buflen, 1, stdout); + fwrite(buf, error, 1, stdout); printf("\n"); continue; } From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 04:17:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FE7B1065672; Thu, 21 Jan 2010 04:17:08 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail1.asahi-net.or.jp (mail1.asahi-net.or.jp [202.224.39.197]) by mx1.freebsd.org (Postfix) with ESMTP id CD6BF8FC28; Thu, 21 Jan 2010 04:17:07 +0000 (UTC) Received: from pavillion-dv6425us.home (pool-96-242-173-67.nwrknj.fios.verizon.net [96.242.173.67]) by mail1.asahi-net.or.jp (Postfix) with ESMTP id E506568950; Thu, 21 Jan 2010 13:17:03 +0900 (JST) Date: Wed, 20 Jan 2010 23:17:12 -0500 From: Yoshihiro Ota To: "Ronald Klop" Message-Id: <20100120231712.91132fd0.ota@j.email.ne.jp> In-Reply-To: References: <201001201656.o0KGuKKG061597@svn.freebsd.org> <9bbcef731001200934n67f7c009sb39a6fe238ac4a8@mail.gmail.com> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.5; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Jaakko Heinonen , src-committers@freebsd.org, svn-src-all@freebsd.org, ota@j.email.ne.jp, Ivan Voras , svn-src-head@freebsd.org Subject: Re: svn commit: r202708 - head/sys/fs/tmpfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 04:17:08 -0000 On Wed, 20 Jan 2010 18:50:58 +0100 "Ronald Klop" wrote: > On Wed, 20 Jan 2010 18:34:37 +0100, Ivan Voras wrote: > > > 2010/1/20 Jaakko Heinonen : > >> Author: jh > >> Date: Wed Jan 20 16:56:20 2010 > >> New Revision: 202708 > >> URL: http://svn.freebsd.org/changeset/base/202708 > > > >> Modified: > >> head/sys/fs/tmpfs/tmpfs_subr.c > >> head/sys/fs/tmpfs/tmpfs_vfsops.c > > > > Any chance of downgrading the "considered highly experimental" status > > message of tmpfs to something less scary? Like "will probably not set > > your hamster on fire"? :) > > > > I admit I haven't used it for any really demanding work but it looks > > ok enough for /tmp on some busy systems. > > And since this list is shrinking. > http://www.freebsd.org/cgi/query-pr-summary.cgi?category=&severity=&priority=&class=&state=&sort=none&text=tmpfs&responsible=&multitext=&originator=&release= > > Ronald. I've been using it for all ports build since tmpfs appeared on FreeBSD. Most of times, it is okay although I had to fix a couple of bumps. There seems to be some corner cases as I see PRs come in. Speaking of bugs, tmpfs may have problems if you do "mv a a" where both source and target are the same; file may disappear due to some bug with rename.2. I tested with Linux and Solaris and "mv" prevented problems with some of these archs. But I forgot most of results and didn't have time since then. Hiro From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 05:26:00 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED5171065670; Thu, 21 Jan 2010 05:26:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 7F1688FC16; Thu, 21 Jan 2010 05:25:59 +0000 (UTC) Received: from besplex.bde.org (c220-239-227-214.carlnfd1.nsw.optusnet.com.au [220.239.227.214]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0L5PrvH031647 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Jan 2010 16:25:55 +1100 Date: Thu, 21 Jan 2010 16:25:53 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov In-Reply-To: <20100120121827.GA55236@nagual.pp.ru> Message-ID: <20100121155841.H1512@besplex.bde.org> References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> <20100120094627.GA53020@nagual.pp.ru> <20100120211722.S2451@besplex.bde.org> <20100120121827.GA55236@nagual.pp.ru> 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, Bruce Evans Subject: Re: svn commit: r202572 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 05:26:01 -0000 On Wed, 20 Jan 2010, Andrey Chernov wrote: > On Wed, Jan 20, 2010 at 09:33:08PM +1100, Bruce Evans wrote: >>> But there is >>> nothing said about opendir() & strcoll() relation in the mentioned >>> standards. The only word I found is that opendir() returns "ordered" >>> sequence, but nowhere mentioned ordered by what criteria, so perhaps they >>> mean "stable": >> >> As I said before, sorting in opendir() has nothing to do with POSIX! It >> is an implementation detail for union file systems/mounts. > > Moreover, even sorting itself is not required here. We sort just to remove > dups. Interesting. Why does it require a stable sort then? It only removes duplicates by name. At least with strcmp() in the compare function, such dups will remain together although they may be moved. The stable sort would be needed if it must keep the original first of duplicates by name, but it doesn't say that. BTW, the statfs() to determine if this sort is necessary is a large pessimization for nfs file systems. Nfs caches most things but not statfs(). Thus a readdir() over nfs does an expensive statfs() every time although the directory contents will normally be cached after the first time. I think the sorting belongs in file systems, not in readdir() where it affects file systems that don't need it. >> It should also give the FreeBSD >> extension of POSIX. POSIX says: "If the strcoll() function fails, >> then the return value of alphasort() is unspecified.", but this makes >> alphasort() unusable since a qsort() comparison function must return >> a specified value. > > To be used in practice, strcoll() should never fails, doing fallback to > strcmp() instead, not only in that, but in lots of other cases too (it may > set errno like EILSEQ, but not fails). The next important thing is to > return 0 only for true binary equals, additionaly ranking (f.e. by > strcmp()) anything inside classes of equality to stabilize result. > > I hope our strcoll() will be kept in that state after implementing > UCA too. What is UCA? Failing is a POSIX bug -- C99 doesn't allow it to fail. I think it should at least be specified to return nonzero (unequal) on failure. This is like comparisons of NaNs returning unequal even for comparisons of identical NaNs. Can it return equal for non-binary-equal strings? I think it can -- the locale might have different encodings for strings that are considered identical. Then duplicates should be according to strcoll() and file systems would have a hard time managing such duplicates when they are created in a locale where they are non-duplicates. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 09:11:51 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2307B1065670; Thu, 21 Jan 2010 09:11:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12C208FC1F; Thu, 21 Jan 2010 09:11:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L9Boqk079402; Thu, 21 Jan 2010 09:11:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0L9BoPX079400; Thu, 21 Jan 2010 09:11:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001210911.o0L9BoPX079400@svn.freebsd.org> From: Alexander Motin Date: Thu, 21 Jan 2010 09:11:50 +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: r202736 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 09:11:51 -0000 Author: mav Date: Thu Jan 21 09:11:50 2010 New Revision: 202736 URL: http://svn.freebsd.org/changeset/base/202736 Log: Print playback channels paths in order of their sequence numbers, not nids. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Thu Jan 21 08:53:01 2010 (r202735) +++ head/sys/dev/sound/pci/hda/hdac.c Thu Jan 21 09:11:50 2010 (r202736) @@ -7091,19 +7091,19 @@ hdac_dump_dac(struct hdac_pcm_devinfo *p { struct hdac_devinfo *devinfo = pdevinfo->devinfo; struct hdac_softc *sc = devinfo->codec->sc; + struct hdac_audio_as *as; struct hdac_widget *w; int i, printed = 0; if (pdevinfo->play < 0) return; - for (i = devinfo->startnode; i < devinfo->endnode; i++) { - w = hdac_widget_get(devinfo, i); - if (w == NULL || w->enable == 0) + as = &devinfo->function.audio.as[sc->chans[pdevinfo->play].as]; + for (i = 0; i < 16; i++) { + if (as->pins[i] <= 0) continue; - if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) - continue; - if (w->bindas != sc->chans[pdevinfo->play].as) + w = hdac_widget_get(devinfo, as->pins[i]); + if (w == NULL || w->enable == 0) continue; if (printed == 0) { printed = 1; @@ -7111,7 +7111,7 @@ hdac_dump_dac(struct hdac_pcm_devinfo *p device_printf(pdevinfo->dev, "Playback:\n"); } device_printf(pdevinfo->dev, "\n"); - hdac_dump_dst_nid(pdevinfo, i, 0); + hdac_dump_dst_nid(pdevinfo, as->pins[i], 0); } } From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 11:36:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEE6F106566C; Thu, 21 Jan 2010 11:36:40 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE77C8FC17; Thu, 21 Jan 2010 11:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LBaeED014337; Thu, 21 Jan 2010 11:36:40 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LBaeYK014335; Thu, 21 Jan 2010 11:36:40 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201001211136.o0LBaeYK014335@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 21 Jan 2010 11:36:40 +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: r202743 - head/lib/libc/nls X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 11:36:40 -0000 Author: gabor (doc,ports committer) Date: Thu Jan 21 11:36:40 2010 New Revision: 202743 URL: http://svn.freebsd.org/changeset/base/202743 Log: - Update Galician catalog Modified: head/lib/libc/nls/gl_ES.ISO8859-1.msg Modified: head/lib/libc/nls/gl_ES.ISO8859-1.msg ============================================================================== --- head/lib/libc/nls/gl_ES.ISO8859-1.msg Thu Jan 21 10:16:49 2010 (r202742) +++ head/lib/libc/nls/gl_ES.ISO8859-1.msg Thu Jan 21 11:36:40 2010 (r202743) @@ -181,6 +181,16 @@ $ ENOATTR 87 Atributo non encontrado $ EDOOFUS 88 Erro de programación +$ EBADMSG +89 Mensaxe inválido +$ EMULTIHOP +90 Intento de Multihop +$ ENOLINK +91 Enlace fortaleceuse +$ EPROTO +92 Erro de protocolo +$ ENOTCAPABLE +93 Habilidades non suficientes $ $ strsignal() support catalog $ @@ -247,3 +257,39 @@ $ SIGUSR1 30 Sinal definida polo usuario no. 1 $ SIGUSR2 31 Sinal definida polo usuario no. 2 +$ +$ gai_strerror() support catalog +$ +$set 3 +$ 1 (obsoleto) +1 Tipo de dirección non soportado +$ EAI_AGAIN +2 Erro temporal na resolución de nomes +$ EAI_BADFLAGS +3 Valor inválido de ai_flags +$ EAI_FAIL +4 Erro non recuperable na resolución de nomes +$ EAI_FAMILY +5 ai_family non soportado +$ EAI_MEMORY +6 Erro na asignación de memoria +$ 7 (obsoleto) +7 Non hai dirección asociada co nome de máquina +$ EAI_NONAME +8 Non se dispón nome de máquina, nin nome de servizo +$ EAI_SERVICE +9 Nome de servizo non soportado en ai_socktype +$ EAI_SOCKTYPE +10 ai_socktype non soportado +$ EAI_SYSTEM +11 Erro de sistema devolto en errno +$ EAI_BADHINTS +12 Valor inválido de hints +$ EAI_PROTOCOL +13 Protocolo resolto descoñecido +$ EAI_OVERFLOW +14 Búfer de argumentos excedido +$ 0 +32766 Éxito +$ NL_MSGMAX +32767 Erro descoñecido From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 11:57:23 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 513F6106566B; Thu, 21 Jan 2010 11:57:23 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 9FC368FC1B; Thu, 21 Jan 2010 11:57:22 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.3/8.14.3) with ESMTP id o0LBvJw5061408; Thu, 21 Jan 2010 14:57:19 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1264075040; bh=waffBYRmaanPl0IoSAgvVqtSUCo366sLS5hHZvKupM0=; l=1192; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=TNGEkaNECB9Chm8c8v9m4qXh9RjtDg1zhPIV7LBEFf78KeNJeDGxKCqQOu9s1c/nv nAztyInSZRaE7/q/ERBpwZV/MGQPsGTa5K8Nky4krJwrWIrVSCWmuK13ztQD1vdr7P vf8BrteleOgTO49jb1kQai5UM0W0pG1TGowwFeRE= Received: (from ache@localhost) by nagual.pp.ru (8.14.3/8.14.3/Submit) id o0LBvJ4N061407; Thu, 21 Jan 2010 14:57:19 +0300 (MSK) (envelope-from ache) Date: Thu, 21 Jan 2010 14:57:19 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20100121115719.GA61292@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> <20100120094627.GA53020@nagual.pp.ru> <20100120211722.S2451@besplex.bde.org> <20100120121827.GA55236@nagual.pp.ru> <20100121155841.H1512@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100121155841.H1512@besplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202572 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 11:57:23 -0000 On Thu, Jan 21, 2010 at 04:25:53PM +1100, Bruce Evans wrote: > > To be used in practice, strcoll() should never fails, doing fallback to > > strcmp() instead, not only in that, but in lots of other cases too (it may > > set errno like EILSEQ, but not fails). The next important thing is to > > return 0 only for true binary equals, additionaly ranking (f.e. by > > strcmp()) anything inside classes of equality to stabilize result. > > > > I hope our strcoll() will be kept in that state after implementing > > UCA too. > > What is UCA? http://unicode.org/reports/tr10/ > Can it return equal for non-binary-equal strings? I think it can -- the > locale might have different encodings for strings that are considered > identical. Then duplicates should be according to strcoll() and file > systems would have a hard time managing such duplicates when they are > created in a locale where they are non-duplicates. It can, but it isn't convenient. It depends of how equality classes are treated. If strings belongs to such class, they have the same weight comparing with other strings, but additional ranking inside class is possible. -- http://ache.pp.ru/ From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 12:01:07 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 860D61065696; Thu, 21 Jan 2010 12:01:07 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 360798FC2D; Thu, 21 Jan 2010 12:01:06 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 1F06F14DA318; Thu, 21 Jan 2010 13:01:06 +0100 (CET) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TxMdjtXAn90H; Thu, 21 Jan 2010 13:00:56 +0100 (CET) Received: from [192.168.1.105] (catv-89-132-179-104.catv.broadband.hu [89.132.179.104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 2293F14DA311; Thu, 21 Jan 2010 13:00:56 +0100 (CET) Message-ID: <4B5841F7.4090408@FreeBSD.org> Date: Thu, 21 Jan 2010 13:00:55 +0100 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; es-ES; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Andrey Chernov , Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201001181344.o0IDiiEL079037@svn.freebsd.org> <20100120012639.B67517@delplex.bde.org> <20100120070843.GA45937@nagual.pp.ru> <20100120191752.Q2120@besplex.bde.org> <20100120094627.GA53020@nagual.pp.ru> <20100120211722.S2451@besplex.bde.org> <20100120121827.GA55236@nagual.pp.ru> <20100121155841.H1512@besplex.bde.org> <20100121115719.GA61292@nagual.pp.ru> In-Reply-To: <20100121115719.GA61292@nagual.pp.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: Unicode collation [Was: Re: svn commit: r202572 - head/lib/libc/gen] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 12:01:07 -0000 El 2010. 01. 21. 12:57, Andrey Chernov escribió: > On Thu, Jan 21, 2010 at 04:25:53PM +1100, Bruce Evans wrote: > >>> To be used in practice, strcoll() should never fails, doing fallback to >>> strcmp() instead, not only in that, but in lots of other cases too (it may >>> set errno like EILSEQ, but not fails). The next important thing is to >>> return 0 only for true binary equals, additionaly ranking (f.e. by >>> strcmp()) anything inside classes of equality to stabilize result. >>> >>> I hope our strcoll() will be kept in that state after implementing >>> UCA too. >>> >> What is UCA? >> > http://unicode.org/reports/tr10/ > IIRC, there was a SoC student working on collation. Do we know something about him and the status of that project? Cheers, -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 15:01:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86EA5106568F; Thu, 21 Jan 2010 15:01:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 776608FC0C; Thu, 21 Jan 2010 15:01:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LF19Oa060863; Thu, 21 Jan 2010 15:01:09 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LF195l060862; Thu, 21 Jan 2010 15:01:09 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201001211501.o0LF195l060862@svn.freebsd.org> From: Ed Maste Date: Thu, 21 Jan 2010 15:01:09 +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: r202751 - head/lib/libtacplus X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 15:01:09 -0000 Author: emaste Date: Thu Jan 21 15:01:09 2010 New Revision: 202751 URL: http://svn.freebsd.org/changeset/base/202751 Log: Correct comment typo. Modified: head/lib/libtacplus/taclib.c Modified: head/lib/libtacplus/taclib.c ============================================================================== --- head/lib/libtacplus/taclib.c Thu Jan 21 14:33:18 2010 (r202750) +++ head/lib/libtacplus/taclib.c Thu Jan 21 15:01:09 2010 (r202751) @@ -1329,7 +1329,7 @@ tac_get_av_value(struct tac_handle *h, c * Note that for empty string attribute values a * 0-length string is returned in order to distinguish * against unset values. - * dump_str() will handle srvr.len == 0 correctly. + * dup_str() will handle srvr.len == 0 correctly. */ if (found_seperator == 1) { srvr.len = end - ch; From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 16:56:28 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86712106566C; Thu, 21 Jan 2010 16:56:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F88D8FC1A; Thu, 21 Jan 2010 16:56:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LGuSR1087260; Thu, 21 Jan 2010 16:56:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LGuScr087251; Thu, 21 Jan 2010 16:56:28 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001211656.o0LGuScr087251@svn.freebsd.org> From: Ed Schouten Date: Thu, 21 Jan 2010 16:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202755 - in head: . lib release/i386 release/pc98 release/picobsd/bridge release/picobsd/qemu rescue/rescue X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 16:56:28 -0000 Author: ed Date: Thu Jan 21 16:56:27 2010 New Revision: 202755 URL: http://svn.freebsd.org/changeset/base/202755 Log: Remove libulog from the bootstrap again. libulog now only provides functions that are used by various packages from the ports tree, namely the libutempter ones. There is no reason to link it into the crunch/fixit binaries anymore. Modified: head/Makefile.inc1 head/lib/Makefile head/release/i386/fixit_crunch.conf head/release/pc98/fixit-small_crunch.conf head/release/pc98/fixit_crunch.conf head/release/picobsd/bridge/crunch.conf head/release/picobsd/qemu/crunch.conf head/rescue/rescue/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jan 21 16:41:13 2010 (r202754) +++ head/Makefile.inc1 Thu Jan 21 16:56:27 2010 (r202755) @@ -1114,7 +1114,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libkiconv lib/libkvm lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ - lib/libradius lib/libsbuf lib/libtacplus lib/libulog \ + lib/libradius lib/libsbuf lib/libtacplus \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ ${_secure_lib_libssl} lib/libdwarf lib/libproc Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Thu Jan 21 16:41:13 2010 (r202754) +++ head/lib/Makefile Thu Jan 21 16:56:27 2010 (r202755) @@ -21,7 +21,6 @@ # librpcsvc must be built before libpam. # libsbuf must be built before libcam. # libtacplus must be built before libpam. -# libulog must be built before libpam. # libutil must be built before libpam. # libypclnt must be built before libpam. # libgssapi must be built before librpcsec_gss @@ -31,7 +30,7 @@ SUBDIR= ${_csu} libc libbsm libauditd libcom_err libcrypt libelf libkvm msun \ libmd \ ncurses ${_libnetgraph} libradius librpcsvc libsbuf \ - libtacplus libulog libutil ${_libypclnt} libalias libarchive \ + libtacplus libutil ${_libypclnt} libalias libarchive \ ${_libatm} libbegemot ${_libbluetooth} ${_libbsnmp} libbz2 \ libcalendar libcam libcompat libdevinfo libdevstat libdisk \ libdwarf libedit libexpat libfetch libftpio libgeom ${_libgpib} \ @@ -39,9 +38,9 @@ SUBDIR= ${_csu} libc libbsm libauditd li ${_libipx} libjail libkiconv libmagic libmemstat ${_libmilter} \ ${_libmp} ${_libncp} ${_libngatm} libopie libpam libpcap \ ${_libpmc} libproc librt ${_libsdp} ${_libsm} ${_libsmb} \ - ${_libsmdb} \ - ${_libsmutil} libstand ${_libtelnet} ${_libthr} libthread_db libufs \ - libugidfw ${_libusbhid} ${_libusb} ${_libvgl} libwrap liby libz \ + ${_libsmdb} ${_libsmutil} libstand \ + ${_libtelnet} ${_libthr} libthread_db libufs libugidfw libulog \ + ${_libusbhid} ${_libusb} ${_libvgl} libwrap liby libz \ ${_bind} .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) Modified: head/release/i386/fixit_crunch.conf ============================================================================== --- head/release/i386/fixit_crunch.conf Thu Jan 21 16:41:13 2010 (r202754) +++ head/release/i386/fixit_crunch.conf Thu Jan 21 16:56:27 2010 (r202755) @@ -46,4 +46,4 @@ progs chown progs chroot ln chown chgrp -libs -ledit -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lulog -lutil +libs -ledit -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lutil Modified: head/release/pc98/fixit-small_crunch.conf ============================================================================== --- head/release/pc98/fixit-small_crunch.conf Thu Jan 21 16:41:13 2010 (r202754) +++ head/release/pc98/fixit-small_crunch.conf Thu Jan 21 16:56:27 2010 (r202755) @@ -40,4 +40,4 @@ srcdirs /usr/src/usr.sbin progs chown ln chown chgrp -libs -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lulog -lutil +libs -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lutil Modified: head/release/pc98/fixit_crunch.conf ============================================================================== --- head/release/pc98/fixit_crunch.conf Thu Jan 21 16:41:13 2010 (r202754) +++ head/release/pc98/fixit_crunch.conf Thu Jan 21 16:56:27 2010 (r202755) @@ -44,4 +44,4 @@ srcdirs /usr/src/usr.sbin progs chown ln chown chgrp -libs -ledit -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lulog -lutil +libs -ledit -lgeom -lbsdxml -lsbuf -lkiconv -lkvm -lncurses -lutil Modified: head/release/picobsd/bridge/crunch.conf ============================================================================== --- head/release/picobsd/bridge/crunch.conf Thu Jan 21 16:41:13 2010 (r202754) +++ head/release/picobsd/bridge/crunch.conf Thu Jan 21 16:56:27 2010 (r202755) @@ -181,4 +181,3 @@ libs_so -lz libs_so -lbsdxml libs_so -lsbuf libs_so -ljail # used by ifconfig -libs_so -lulog # used by ifconfig Modified: head/release/picobsd/qemu/crunch.conf ============================================================================== --- head/release/picobsd/qemu/crunch.conf Thu Jan 21 16:41:13 2010 (r202754) +++ head/release/picobsd/qemu/crunch.conf Thu Jan 21 16:56:27 2010 (r202755) @@ -189,4 +189,3 @@ libs_so -lz libs_so -lbsdxml libs_so -lsbuf libs_so -ljail # used by ifconfig -libs_so -lulog Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Thu Jan 21 16:41:13 2010 (r202754) +++ head/rescue/rescue/Makefile Thu Jan 21 16:56:27 2010 (r202755) @@ -72,7 +72,7 @@ CRUNCH_SRCDIRS+= bin CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \ ed expr getfacl hostname kenv kill ln ls mkdir mv \ pkill ps pwd realpath rm rmdir setfacl sh stty sync test -CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lulog -lutil +CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lutil # Additional options for specific programs CRUNCH_ALIAS_test= [ From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 17:25:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 726B71065676; Thu, 21 Jan 2010 17:25:13 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DBF28FC19; Thu, 21 Jan 2010 17:25:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LHPDIb093819; Thu, 21 Jan 2010 17:25:13 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LHPDGG093800; Thu, 21 Jan 2010 17:25:13 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001211725.o0LHPDGG093800@svn.freebsd.org> From: Ed Schouten Date: Thu, 21 Jan 2010 17:25:13 +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: r202756 - in head: bin/date lib/libpam/modules/pam_lastlog libexec/comsat libexec/ftpd sbin/init sbin/reboot share/man/man3 share/man/man7 share/security usr.bin/at usr.bin/finger usr.b... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 17:25:13 -0000 Author: ed Date: Thu Jan 21 17:25:12 2010 New Revision: 202756 URL: http://svn.freebsd.org/changeset/base/202756 Log: Remove stale references to utmp(5) and its corresponding filenames. I removed utmp and its manpage, but not other manpages referring to it. Modified: head/bin/date/date.1 head/lib/libpam/modules/pam_lastlog/pam_lastlog.8 head/libexec/comsat/comsat.8 head/libexec/ftpd/ftpd.8 head/sbin/init/init.8 head/sbin/reboot/reboot.8 head/share/man/man3/sysexits.3 head/share/man/man7/hier.7 head/share/security/lomac-policy.contexts head/usr.bin/at/at.man head/usr.bin/finger/finger.1 head/usr.bin/last/last.1 head/usr.bin/ncplist/ncplist.1 head/usr.bin/talk/talk.1 head/usr.bin/users/users.1 head/usr.bin/w/w.1 head/usr.bin/who/who.1 head/usr.sbin/ac/ac.8 head/usr.sbin/lastlogin/lastlogin.8 head/usr.sbin/rwhod/rwhod.8 Modified: head/bin/date/date.1 ============================================================================== --- head/bin/date/date.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/bin/date/date.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -299,7 +299,7 @@ for more information. .El .Sh FILES .Bl -tag -width /var/log/messages -compact -.It Pa /var/log/wtmp +.It Pa /var/log/utx.log record of date resets and time changes .It Pa /var/log/messages record of the user setting the time @@ -406,9 +406,9 @@ fails. .Sh SEE ALSO .Xr locale 1 , .Xr gettimeofday 2 , +.Xr getutxent 3 , .Xr strftime 3 , .Xr strptime 3 , -.Xr utmp 5 , .Xr timed 8 .Rs .%T "TSP: The Time Synchronization Protocol for UNIX 4.3BSD" Modified: head/lib/libpam/modules/pam_lastlog/pam_lastlog.8 ============================================================================== --- head/lib/libpam/modules/pam_lastlog/pam_lastlog.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/lib/libpam/modules/pam_lastlog/pam_lastlog.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -65,12 +65,7 @@ and terminate sessions. The .Fn pam_sm_open_session -function records the session in the -.Xr utmp 5 , -.Xr wtmp 5 -and -.Xr lastlog 5 -databases. +function records the session in the user accounting database. The .Fn pam_sm_close_session function does nothing. @@ -90,10 +85,10 @@ Ignore I/O failures. .Sh SEE ALSO .Xr last 1 , .Xr w 1 , +.Xr getutxent 3 , .Xr login 3 , .Xr logout 3 , .Xr pam.conf 5 , -.Xr utmp 5 , .Xr lastlogin 8 , .Xr pam 8 .Sh AUTHORS Modified: head/libexec/comsat/comsat.8 ============================================================================== --- head/libexec/comsat/comsat.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/libexec/comsat/comsat.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -91,7 +91,7 @@ If omitted, standard mailbox assumed. .Sh FILES .Bl -tag -width ".Pa /var/mail/user" -compact -.It Pa /var/run/utmp +.It Pa /var/run/utx.active to find out who is logged on and on what terminals .It Pa /var/mail/user standard mailbox Modified: head/libexec/ftpd/ftpd.8 ============================================================================== --- head/libexec/ftpd/ftpd.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/libexec/ftpd/ftpd.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -219,8 +219,7 @@ This option may be overridden by A synonym for .Fl d . .It Fl W -Do not log FTP sessions to -.Pa /var/log/wtmp . +Do not log FTP sessions to the user accounting database. .El .Pp The file Modified: head/sbin/init/init.8 ============================================================================== --- head/sbin/init/init.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/sbin/init/init.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -148,12 +148,9 @@ dies, either because the user logged out or an abnormal termination occurred (a signal), the .Nm -utility wakes up, deletes the user -from the -.Xr utmp 5 -file of current users and records the logout in the -.Xr wtmp 5 -file. +utility wakes up and records the logout in the the user accounting +database (see +.Xr getutxent 3 ). The cycle is then restarted by .Nm @@ -207,13 +204,6 @@ If a line is commented out or deleted fr .Xr ttys 5 , .Nm will not do anything at all to that line. -However, it will complain that the relationship between lines -in the -.Xr ttys 5 -file and records in the -.Xr utmp 5 -file is out of sync, -so this practice is not recommended. .Pp The .Nm @@ -316,9 +306,9 @@ system console device .It Pa /dev/tty* terminal ports found in .Xr ttys 5 -.It Pa /var/run/utmp +.It Pa /var/run/utx.active record of current users on the system -.It Pa /var/log/wtmp +.It Pa /var/log/utx.log record of all logins and logouts .It Pa /etc/ttys the terminal initialization information file Modified: head/sbin/reboot/reboot.8 ============================================================================== --- head/sbin/reboot/reboot.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/sbin/reboot/reboot.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -61,9 +61,8 @@ a (and subsequently a .Dv SIGKILL ) and, respectively, halt or restart the system. -The action is logged, including entering a shutdown record into the -.Xr wtmp 5 -file. +The action is logged, including entering a shutdown record into the user +accounting database. .Pp The options are as follows: .Bl -tag -width indent Modified: head/share/man/man3/sysexits.3 ============================================================================== --- head/share/man/man3/sysexits.3 Thu Jan 21 16:56:27 2010 (r202755) +++ head/share/man/man3/sysexits.3 Thu Jan 21 17:25:12 2010 (r202756) @@ -97,7 +97,7 @@ does not exist in the passwd file. .It Sy EX_OSFILE Pq 72 Some system file (e.g., .Pa /etc/passwd , -.Pa /var/run/utmp , +.Pa /var/run/utx.active , etc.) does not exist, cannot be opened, or has some sort of error (e.g., syntax error). .It Sy EX_CANTCREAT Pq 73 Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Thu Jan 21 16:56:27 2010 (r202755) +++ head/share/man/man7/hier.7 Thu Jan 21 17:25:12 2010 (r202756) @@ -735,10 +735,14 @@ kerberos server databases; see miscellaneous system log files .Pp .Bl -tag -width Fl -compact -.It Pa wtmp +.It Pa utx.lastlogin +last login log; +see +.Xr getutxent 3 +.It Pa utx.log login/logout log; see -.Xr wtmp 5 +.Xr getutxent 3 .El .Pp .It Pa mail/ @@ -769,10 +773,10 @@ writable by the .Dq network group for command connection sockets; see .Xr ppp 8 -.It Pa utmp +.It Pa utx.active database of current users; see -.Xr utmp 5 +.Xr getutxent 5 .El .Pp .It Pa rwho/ Modified: head/share/security/lomac-policy.contexts ============================================================================== --- head/share/security/lomac-policy.contexts Thu Jan 21 16:56:27 2010 (r202755) +++ head/share/security/lomac-policy.contexts Thu Jan 21 17:25:12 2010 (r202756) @@ -25,5 +25,5 @@ (/mnt)?/cdrom(/.*)? lomac/high (/usr)?/home/(ftp|samba)(/.*)? lomac/high /var/log/sendmail\.st lomac/low -/var/run/utmp lomac/equal -/var/log/(lastlog|wtmp) lomac/equal +/var/run/utx.active lomac/equal +/var/log/utx.(lastlogin|log) lomac/equal Modified: head/usr.bin/at/at.man ============================================================================== --- head/usr.bin/at/at.man Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/at/at.man Thu Jan 21 17:25:12 2010 (r202756) @@ -313,7 +313,7 @@ letter pair is not specified, the value directory containing job files .It Pa _ATSPOOL_DIR directory containing output spool files -.It Pa /var/run/utmp +.It Pa /var/run/utx.active login records .It Pa _PERM_PATH/at.allow allow permission control @@ -338,7 +338,7 @@ with minor enhancements by .An Joe Halpin Aq joe.halpin@attbi.com . .Sh BUGS If the file -.Pa /var/run/utmp +.Pa /var/run/utx.active is not available or corrupted, or if the user is not logged on at the time .Nm Modified: head/usr.bin/finger/finger.1 ============================================================================== --- head/usr.bin/finger/finger.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/finger/finger.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -100,8 +100,7 @@ of the remote host when used in conjunct .Fl h option. .It Fl k -Disable all use of -.Xr utmp 5 . +Disable all use of the user accounting database. .It Fl l Produce a multi-line format displaying all of the information described for the @@ -221,10 +220,10 @@ This variable may be set with favored op .Nm . .El .Sh FILES -.Bl -tag -width /var/log/lastlog -compact +.Bl -tag -width /var/log/utx.lastlogin -compact .It Pa /etc/finger.conf alias definition data base -.It Pa /var/log/lastlog +.It Pa /var/log/utx.lastlogin last login data base .El .Sh SEE ALSO Modified: head/usr.bin/last/last.1 ============================================================================== --- head/usr.bin/last/last.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/last/last.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -83,7 +83,7 @@ be reported. This may be used with the .Fl f option to derive the results from stored -.Pa wtmp +.Pa utx.log files. When this argument is provided, all other options except for .Fl f @@ -141,7 +141,7 @@ letter pair is not specified, the value Read the file .Ar file instead of the default, -.Pa /var/log/wtmp . +.Pa /var/log/utx.log . .It Fl h Ar host .Ar Host names may be names or internet numbers. @@ -196,13 +196,13 @@ If interrupted with a quit signal indicates how far the search has progressed and then continues. .Sh FILES -.Bl -tag -width /var/log/wtmp -compact -.It Pa /var/log/wtmp +.Bl -tag -width /var/log/utx.log -compact +.It Pa /var/log/utx.log login data base .El .Sh SEE ALSO .Xr lastcomm 1 , -.Xr utmp 5 , +.Xr getutxent 3 , .Xr ac 8 .Sh HISTORY A @@ -212,7 +212,7 @@ utility appeared in .Sh BUGS If a login shell should terminate abnormally for some reason, it is likely that a logout record will not be written to the -.Pa wtmp +.Pa utx.log file. In this case, .Nm Modified: head/usr.bin/ncplist/ncplist.1 ============================================================================== --- head/usr.bin/ncplist/ncplist.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/ncplist/ncplist.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -69,7 +69,7 @@ Displays mounted volumes on a given .Sh IMPLEMENTATION NOTES This utility is provided mostly for educational purposes. .Sh FILES -.Bl -tag -width /var/log/wtmp -compact +.Bl -tag -width /var/log/utx.log -compact .It Pa ~/.nwfsrc keeps description for each connection. See Modified: head/usr.bin/talk/talk.1 ============================================================================== --- head/usr.bin/talk/talk.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/talk/talk.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -116,10 +116,10 @@ Permission to talk may be denied or gran command. At the outset talking is allowed. .Sh FILES -.Bl -tag -width /var/run/utmp -compact +.Bl -tag -width /var/run/utx.active -compact .It Pa /etc/hosts to find the recipient's machine -.It Pa /var/run/utmp +.It Pa /var/run/utx.active to find the recipient's tty .El .Sh SEE ALSO Modified: head/usr.bin/users/users.1 ============================================================================== --- head/usr.bin/users/users.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/users/users.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -46,14 +46,14 @@ The utility lists the login names of the users currently on the system, in sorted order, space separated, on a single line. .Sh FILES -.Bl -tag -width /var/run/utmp -.It Pa /var/run/utmp +.Bl -tag -width /var/run/utx.active +.It Pa /var/run/utx.active .El .Sh SEE ALSO .Xr finger 1 , .Xr last 1 , .Xr who 1 , -.Xr utmp 5 +.Xr getutxent 3 .Sh HISTORY The .Nm Modified: head/usr.bin/w/w.1 ============================================================================== --- head/usr.bin/w/w.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/w/w.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -87,8 +87,8 @@ If one or more .Ar user names are specified, the output is restricted to those users. .Sh FILES -.Bl -tag -width ".Pa /var/run/utmp" -compact -.It Pa /var/run/utmp +.Bl -tag -width ".Pa /var/run/utx.active" -compact +.It Pa /var/run/utx.active list of users on the system .El .Sh COMPATIBILITY Modified: head/usr.bin/who/who.1 ============================================================================== --- head/usr.bin/who/who.1 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.bin/who/who.1 Thu Jan 21 17:25:12 2010 (r202756) @@ -90,36 +90,36 @@ Equivalent to By default, .Nm gathers information from the file -.Pa /var/run/utmp . +.Pa /var/run/utx.active . An alternate .Ar file may be specified which is usually -.Pa /var/log/wtmp +.Pa /var/log/utx.log (or -.Pa /var/log/wtmp.[0-6] +.Pa /var/log/utx.log.[0-6] depending on site policy as -.Pa wtmp +.Pa utx.log can grow quite large and daily versions may or may not be kept around after compression by .Xr ac 8 ) . The -.Pa wtmp +.Pa utx.log file contains a record of every login, logout, crash, shutdown and date change since -.Pa wtmp +.Pa utx.log was last truncated or created. .Pp If -.Pa /var/log/wtmp +.Pa /var/log/utx.log is being used as the file, the user name may be empty or one of the special characters '|', '}' and '~'. Logouts produce an output line without any user name. For more information on the special characters, see -.Xr utmp 5 . +.Xr getutxent 3 . .Sh ENVIRONMENT The .Ev COLUMNS , LANG , LC_ALL @@ -130,10 +130,10 @@ environment variables affect the executi as described in .Xr environ 7 . .Sh FILES -.Bl -tag -width /var/log/wtmp.[0-6] -compact -.It Pa /var/run/utmp -.It Pa /var/log/wtmp -.It Pa /var/log/wtmp.[0-6] +.Bl -tag -width /var/log/utx.log.[0-6] -compact +.It Pa /var/run/utx.active +.It Pa /var/log/utx.log +.It Pa /var/log/utx.log.[0-6] .El .Sh EXIT STATUS .Ex -std @@ -141,7 +141,7 @@ as described in .Xr last 1 , .Xr users 1 , .Xr w 1 , -.Xr utmp 5 +.Xr getutxent 3 .Sh STANDARDS The .Nm Modified: head/usr.sbin/ac/ac.8 ============================================================================== --- head/usr.sbin/ac/ac.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.sbin/ac/ac.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -45,7 +45,7 @@ .Op Ar users ... .Sh DESCRIPTION If the file -.Pa /var/log/wtmp +.Pa /var/log/utx.log exists, a record of individual login and logout times are written to it by .Xr login 1 @@ -86,7 +86,7 @@ flags may be specified. Read connect time data from .Ar wtmp instead of the default file, -.Pa /var/log/wtmp . +.Pa /var/log/utx.log . .It Ar users ... Display totals for the given individuals only. .El @@ -95,20 +95,20 @@ If no arguments are given, .Nm displays the total connect time for all accounts with login sessions recorded in -.Pa wtmp . +.Pa utx.log . .Pp The default -.Pa wtmp +.Pa utx.log file will increase without bound unless it is truncated. It is normally truncated by the daily scripts run by .Xr cron 8 , which rename and rotate the -.Pa wtmp +.Pa utx.log files, keeping a week's worth of data on hand. No login or connect time accounting is performed if -.Pa /var/log/wtmp +.Pa /var/log/utx.log does not exist. .Pp For example, @@ -122,15 +122,15 @@ allows times recorded in to be charged out at a different rate than .Pa other . .Sh FILES -.Bl -tag -width /var/log/wtmp -compact -.It Pa /var/log/wtmp +.Bl -tag -width /var/log/utx.log -compact +.It Pa /var/log/utx.log connect time accounting file .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr login 1 , -.Xr utmp 5 , +.Xr getutxent 3 , .Xr init 8 , .Xr sa 8 .\" .Sh NOTES Modified: head/usr.sbin/lastlogin/lastlogin.8 ============================================================================== --- head/usr.sbin/lastlogin/lastlogin.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.sbin/lastlogin/lastlogin.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -64,13 +64,13 @@ utility differs from in that it only prints information regarding the very last login session. The last login database is never turned over or deleted in standard usage. .Sh FILES -.Bl -tag -width /var/log/lastlog -compact -.It Pa /var/log/lastlog +.Bl -tag -width /var/log/utx.lastlogin -compact +.It Pa /var/log/utx.lastlogin last login database .El .Sh SEE ALSO .Xr last 1 , -.Xr lastlog 5 , +.Xr getutxent 3 , .Xr ac 8 .Sh AUTHORS .An John M. Vinopal Modified: head/usr.sbin/rwhod/rwhod.8 ============================================================================== --- head/usr.sbin/rwhod/rwhod.8 Thu Jan 21 16:56:27 2010 (r202755) +++ head/usr.sbin/rwhod/rwhod.8 Thu Jan 21 17:25:12 2010 (r202756) @@ -188,9 +188,8 @@ system call, with any trailing domain na The array at the end of the message contains information about the users logged in to the sending machine. This information -includes the contents of the -.Xr utmp 5 -entry for each non-idle terminal line and a value indicating the +includes the contents of the entry from the user accounting database +for each non-idle terminal line and a value indicating the time in seconds since a character was last received on the terminal line. .Pp Messages received by the From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 17:26:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21736106566B; Thu, 21 Jan 2010 17:26:12 +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 10E868FC08; Thu, 21 Jan 2010 17:26:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LHQBXJ094090; Thu, 21 Jan 2010 17:26:11 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LHQBGT094088; Thu, 21 Jan 2010 17:26:11 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001211726.o0LHQBGT094088@svn.freebsd.org> From: Ed Schouten Date: Thu, 21 Jan 2010 17:26:11 +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: r202757 - head/share/man/man7 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 17:26:12 -0000 Author: ed Date: Thu Jan 21 17:26:11 2010 New Revision: 202757 URL: http://svn.freebsd.org/changeset/base/202757 Log: Correct a minor mistake in my previous commit. getutxent is in category 3, not 5. Modified: head/share/man/man7/hier.7 Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Thu Jan 21 17:25:12 2010 (r202756) +++ head/share/man/man7/hier.7 Thu Jan 21 17:26:11 2010 (r202757) @@ -776,7 +776,7 @@ group for command connection sockets; se .It Pa utx.active database of current users; see -.Xr getutxent 5 +.Xr getutxent 3 .El .Pp .It Pa rwho/ From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 17:46:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A09261065672; Thu, 21 Jan 2010 17:46:14 +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 8F9308FC0A; Thu, 21 Jan 2010 17:46:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LHkEIm098805; Thu, 21 Jan 2010 17:46:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LHkEEv098802; Thu, 21 Jan 2010 17:46:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001211746.o0LHkEEv098802@svn.freebsd.org> From: Xin LI Date: Thu, 21 Jan 2010 17:46: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: r202761 - in head/usr.bin: bc dc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 17:46:14 -0000 Author: delphij Date: Thu Jan 21 17:46:14 2010 New Revision: 202761 URL: http://svn.freebsd.org/changeset/base/202761 Log: Makefile cleanups: o Enable building of USD o Remove commented out targets o Remove WARNS?=6 lines since it's the default Reviewed by: gabor Modified: head/usr.bin/bc/Makefile head/usr.bin/dc/Makefile Modified: head/usr.bin/bc/Makefile ============================================================================== --- head/usr.bin/bc/Makefile Thu Jan 21 17:37:26 2010 (r202760) +++ head/usr.bin/bc/Makefile Thu Jan 21 17:46:14 2010 (r202761) @@ -4,14 +4,9 @@ PROG= bc SRCS= bc.y scan.l CFLAGS+= -I. -I${.CURDIR} -WARNS?= 6 -#SUBDIR+= USD.doc +SUBDIR+= USD.doc FILES+= bc.library FILESDIR= ${SHAREDIR}/misc -#beforeinstall: -# install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/bc.library \ -# ${DESTDIR}/usr/share/misc - .include Modified: head/usr.bin/dc/Makefile ============================================================================== --- head/usr.bin/dc/Makefile Thu Jan 21 17:37:26 2010 (r202760) +++ head/usr.bin/dc/Makefile Thu Jan 21 17:46:14 2010 (r202761) @@ -6,8 +6,6 @@ SRCS= dc.c bcode.c inout.c mem.c stack.c LDADD= -lcrypto DPADD= ${LIBCRYPTO} -#SUBDIR+= USD.doc - -WARNS?= 6 +SUBDIR+= USD.doc .include From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 20:57:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0D0E10656A7; Thu, 21 Jan 2010 20:57:25 +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 8E4838FC1E; Thu, 21 Jan 2010 20:57:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LKvP7w043261; Thu, 21 Jan 2010 20:57:25 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LKvPkD043256; Thu, 21 Jan 2010 20:57:25 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001212057.o0LKvPkD043256@svn.freebsd.org> From: Rick Macklem Date: Thu, 21 Jan 2010 20:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202767 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 20:57:25 -0000 Author: rmacklem Date: Thu Jan 21 20:57:25 2010 New Revision: 202767 URL: http://svn.freebsd.org/changeset/base/202767 Log: Add a timeout for the negative name cache entries in the NFS client. This avoids a bogus negative name cache entry from persisting forever when another client creates an entry with the same name within the same NFS server time of day clock tick. The mount option negnametimeo can be used to override the default timeout interval on a per-mount-point basis. Setting negnametimeo to 0 disables negative name caching for the mount point. I also fixed one obvious typo where args.timeo should be args.maxgrouplist. Submitted by: jhb (earlier version) Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/nfsclient/nfs_vfsops.c head/sys/nfsclient/nfs_vnops.c head/sys/nfsclient/nfsmount.h head/sys/nfsclient/nfsnode.h Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Thu Jan 21 20:56:18 2010 (r202766) +++ head/sys/nfsclient/nfs_vfsops.c Thu Jan 21 20:57:25 2010 (r202767) @@ -114,7 +114,7 @@ static void nfs_decode_args(struct mount struct nfs_args *argp, const char *hostname); static int mountnfs(struct nfs_args *, struct mount *, struct sockaddr *, char *, struct vnode **, - struct ucred *cred); + struct ucred *cred, int); static vfs_mount_t nfs_mount; static vfs_cmount_t nfs_cmount; static vfs_unmount_t nfs_unmount; @@ -551,7 +551,7 @@ nfs_mountdiskless(char *path, nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK); if ((error = mountnfs(args, mp, nam, path, vpp, - td->td_ucred)) != 0) { + td->td_ucred, NFS_DEFAULT_NEGNAMETIMEO)) != 0) { printf("nfs_mountroot: mount %s on /: %d\n", path, error); return (error); } @@ -778,7 +778,7 @@ static const char *nfs_opts[] = { "from" "readdirsize", "soft", "hard", "mntudp", "tcp", "udp", "wsize", "rsize", "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "deadthresh", "hostname", "timeout", "addr", "fh", "nfsv3", "sec", - "maxgroups", "principal", + "maxgroups", "principal", "negnametimeo", NULL }; /* @@ -827,6 +827,7 @@ nfs_mount(struct mount *mp) size_t len; u_char nfh[NFSX_V3FHMAX]; char *opt; + int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO; has_nfs_args_opt = 0; has_addr_opt = 0; @@ -1029,7 +1030,7 @@ nfs_mount(struct mount *mp) } if (vfs_getopt(mp->mnt_optnew, "maxgroups", (void **)&opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.maxgrouplist); - if (ret != 1 || args.timeo <= 0) { + if (ret != 1 || args.maxgrouplist <= 0) { vfs_mount_error(mp, "illegal maxgroups: %s", opt); error = EINVAL; @@ -1037,6 +1038,16 @@ nfs_mount(struct mount *mp) } args.flags |= NFSMNT_MAXGRPS; } + if (vfs_getopt(mp->mnt_optnew, "negnametimeo", (void **)&opt, NULL) + == 0) { + ret = sscanf(opt, "%d", &negnametimeo); + if (ret != 1 || negnametimeo < 0) { + vfs_mount_error(mp, "illegal negnametimeo: %s", + opt); + error = EINVAL; + goto out; + } + } if (vfs_getopt(mp->mnt_optnew, "addr", (void **)&args.addr, &args.addrlen) == 0) { has_addr_opt = 1; @@ -1125,7 +1136,7 @@ nfs_mount(struct mount *mp) } } error = mountnfs(&args, mp, nam, args.hostname, &vp, - curthread->td_ucred); + curthread->td_ucred, negnametimeo); out: if (!error) { MNT_ILOCK(mp); @@ -1167,7 +1178,7 @@ nfs_cmount(struct mntarg *ma, void *data */ static int mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, - char *hst, struct vnode **vpp, struct ucred *cred) + char *hst, struct vnode **vpp, struct ucred *cred, int negnametimeo) { struct nfsmount *nmp; struct nfsnode *np; @@ -1217,6 +1228,7 @@ mountnfs(struct nfs_args *argp, struct m nmp->nm_numgrps = NFS_MAXGRPS; nmp->nm_readahead = NFS_DEFRAHEAD; nmp->nm_deadthresh = NFS_MAXDEADTHRESH; + nmp->nm_negnametimeo = negnametimeo; nmp->nm_tprintf_delay = nfs_tprintf_delay; if (nmp->nm_tprintf_delay < 0) nmp->nm_tprintf_delay = 0; Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Thu Jan 21 20:56:18 2010 (r202766) +++ head/sys/nfsclient/nfs_vnops.c Thu Jan 21 20:57:25 2010 (r202767) @@ -982,8 +982,13 @@ nfs_lookup(struct vop_lookup_args *ap) * modification time of the parent directory matches * our cached copy. Otherwise, we discard all of the * negative cache entries for this directory. + * negative cache entries for this directory. We also + * only trust -ve cache entries for less than + * nm_negative_namecache_timeout seconds. */ - if (VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && + if ((u_int)(ticks - np->n_dmtime_ticks) < + (nmp->nm_negnametimeo * hz) && + VOP_GETATTR(dvp, &vattr, cnp->cn_cred) == 0 && vattr.va_mtime.tv_sec == np->n_dmtime) { nfsstats.lookupcache_hits++; return (ENOENT); @@ -1157,8 +1162,10 @@ nfsmout: */ mtx_lock(&np->n_mtx); if (np->n_dmtime <= dmtime) { - if (np->n_dmtime == 0) + if (np->n_dmtime == 0) { np->n_dmtime = dmtime; + np->n_dmtime_ticks = ticks; + } mtx_unlock(&np->n_mtx); cache_enter(dvp, NULL, cnp); } else Modified: head/sys/nfsclient/nfsmount.h ============================================================================== --- head/sys/nfsclient/nfsmount.h Thu Jan 21 20:56:18 2010 (r202766) +++ head/sys/nfsclient/nfsmount.h Thu Jan 21 20:57:25 2010 (r202767) @@ -85,6 +85,7 @@ struct nfsmount { struct rpc_timers nm_timers[NFS_MAX_TIMER]; /* RTT Timers for rpcs */ char nm_principal[MNAMELEN]; /* GSS-API principal of server */ gss_OID nm_mech_oid; /* OID of selected GSS-API mechanism */ + int nm_negnametimeo; /* timeout for -ve entries (sec) */ /* NFSv4 */ uint64_t nm_clientid; @@ -107,6 +108,10 @@ struct nfsmount { #define NFS_TPRINTF_DELAY 30 #endif +#ifndef NFS_DEFAULT_NEGNAMETIMEO +#define NFS_DEFAULT_NEGNAMETIMEO 60 +#endif + #define NFS_PCATCH (PCATCH | PBDRY) #endif Modified: head/sys/nfsclient/nfsnode.h ============================================================================== --- head/sys/nfsclient/nfsnode.h Thu Jan 21 20:56:18 2010 (r202766) +++ head/sys/nfsclient/nfsnode.h Thu Jan 21 20:57:25 2010 (r202767) @@ -114,6 +114,7 @@ struct nfsnode { struct timespec n_mtime; /* Prev modify time. */ time_t n_ctime; /* Prev create time. */ time_t n_dmtime; /* Prev dir modify time. */ + int n_dmtime_ticks; /* Tick of -ve cache entry */ time_t n_expiry; /* Lease expiry time */ nfsfh_t *n_fhp; /* NFS File Handle */ struct vnode *n_vnode; /* associated vnode */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 21:14:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCA941065696; Thu, 21 Jan 2010 21:14:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6A378FC14; Thu, 21 Jan 2010 21:14:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LLETu0047473; Thu, 21 Jan 2010 21:14:29 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LLETxG047428; Thu, 21 Jan 2010 21:14:29 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201001212114.o0LLETxG047428@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 21 Jan 2010 21:14:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202771 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpica/disassembler sys/contrib/d... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 21:14:29 -0000 Author: jkim Date: Thu Jan 21 21:14:28 2010 New Revision: 202771 URL: http://svn.freebsd.org/changeset/base/202771 Log: Merge ACPICA 20100121. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/adfile.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/adwalk.c head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/common/getopt.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/aslcompiler.y head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslfold.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/asllength.c head/sys/contrib/dev/acpica/compiler/asllisting.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/asllookup.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/asloperands.c head/sys/contrib/dev/acpica/compiler/aslopt.c head/sys/contrib/dev/acpica/compiler/aslresource.c head/sys/contrib/dev/acpica/compiler/aslrestype1.c head/sys/contrib/dev/acpica/compiler/aslrestype2.c head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/compiler/asltree.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/debugger/dbcmds.c head/sys/contrib/dev/acpica/debugger/dbdisply.c head/sys/contrib/dev/acpica/debugger/dbexec.c head/sys/contrib/dev/acpica/debugger/dbfileio.c head/sys/contrib/dev/acpica/debugger/dbhistry.c head/sys/contrib/dev/acpica/debugger/dbinput.c head/sys/contrib/dev/acpica/debugger/dbstats.c head/sys/contrib/dev/acpica/debugger/dbutils.c head/sys/contrib/dev/acpica/debugger/dbxface.c head/sys/contrib/dev/acpica/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/disassembler/dmnames.c head/sys/contrib/dev/acpica/disassembler/dmobject.c head/sys/contrib/dev/acpica/disassembler/dmopcode.c head/sys/contrib/dev/acpica/disassembler/dmresrc.c head/sys/contrib/dev/acpica/disassembler/dmresrcl.c head/sys/contrib/dev/acpica/disassembler/dmresrcs.c head/sys/contrib/dev/acpica/disassembler/dmutils.c head/sys/contrib/dev/acpica/disassembler/dmwalk.c head/sys/contrib/dev/acpica/dispatcher/dsfield.c head/sys/contrib/dev/acpica/dispatcher/dsinit.c head/sys/contrib/dev/acpica/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c head/sys/contrib/dev/acpica/dispatcher/dsobject.c head/sys/contrib/dev/acpica/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/dispatcher/dsutils.c head/sys/contrib/dev/acpica/dispatcher/dswexec.c head/sys/contrib/dev/acpica/dispatcher/dswload.c head/sys/contrib/dev/acpica/dispatcher/dswscope.c head/sys/contrib/dev/acpica/dispatcher/dswstate.c head/sys/contrib/dev/acpica/events/evevent.c head/sys/contrib/dev/acpica/events/evgpe.c head/sys/contrib/dev/acpica/events/evgpeblk.c head/sys/contrib/dev/acpica/events/evmisc.c head/sys/contrib/dev/acpica/events/evregion.c head/sys/contrib/dev/acpica/events/evrgnini.c head/sys/contrib/dev/acpica/events/evsci.c head/sys/contrib/dev/acpica/events/evxface.c head/sys/contrib/dev/acpica/events/evxfevnt.c head/sys/contrib/dev/acpica/events/evxfregn.c head/sys/contrib/dev/acpica/executer/exconfig.c head/sys/contrib/dev/acpica/executer/exconvrt.c head/sys/contrib/dev/acpica/executer/excreate.c head/sys/contrib/dev/acpica/executer/exdump.c head/sys/contrib/dev/acpica/executer/exfield.c head/sys/contrib/dev/acpica/executer/exfldio.c head/sys/contrib/dev/acpica/executer/exmisc.c head/sys/contrib/dev/acpica/executer/exmutex.c head/sys/contrib/dev/acpica/executer/exnames.c head/sys/contrib/dev/acpica/executer/exoparg1.c head/sys/contrib/dev/acpica/executer/exoparg2.c head/sys/contrib/dev/acpica/executer/exoparg3.c head/sys/contrib/dev/acpica/executer/exoparg6.c head/sys/contrib/dev/acpica/executer/exprep.c head/sys/contrib/dev/acpica/executer/exregion.c head/sys/contrib/dev/acpica/executer/exresnte.c head/sys/contrib/dev/acpica/executer/exresolv.c head/sys/contrib/dev/acpica/executer/exresop.c head/sys/contrib/dev/acpica/executer/exstore.c head/sys/contrib/dev/acpica/executer/exstoren.c head/sys/contrib/dev/acpica/executer/exstorob.c head/sys/contrib/dev/acpica/executer/exsystem.c head/sys/contrib/dev/acpica/executer/exutils.c head/sys/contrib/dev/acpica/hardware/hwacpi.c head/sys/contrib/dev/acpica/hardware/hwgpe.c head/sys/contrib/dev/acpica/hardware/hwregs.c head/sys/contrib/dev/acpica/hardware/hwsleep.c head/sys/contrib/dev/acpica/hardware/hwtimer.c head/sys/contrib/dev/acpica/hardware/hwvalid.c head/sys/contrib/dev/acpica/hardware/hwxface.c head/sys/contrib/dev/acpica/include/acapps.h head/sys/contrib/dev/acpica/include/accommon.h head/sys/contrib/dev/acpica/include/acconfig.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acdispat.h head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/achware.h head/sys/contrib/dev/acpica/include/acinterp.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acnames.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acobject.h head/sys/contrib/dev/acpica/include/acopcode.h head/sys/contrib/dev/acpica/include/acoutput.h head/sys/contrib/dev/acpica/include/acparser.h head/sys/contrib/dev/acpica/include/acpi.h head/sys/contrib/dev/acpica/include/acpiosxf.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/acresrc.h head/sys/contrib/dev/acpica/include/acrestyp.h head/sys/contrib/dev/acpica/include/acstruct.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/amlcode.h head/sys/contrib/dev/acpica/include/amlresrc.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/contrib/dev/acpica/include/platform/acgcc.h head/sys/contrib/dev/acpica/namespace/nsaccess.c head/sys/contrib/dev/acpica/namespace/nsalloc.c head/sys/contrib/dev/acpica/namespace/nsdump.c head/sys/contrib/dev/acpica/namespace/nsdumpdv.c head/sys/contrib/dev/acpica/namespace/nseval.c head/sys/contrib/dev/acpica/namespace/nsinit.c head/sys/contrib/dev/acpica/namespace/nsload.c head/sys/contrib/dev/acpica/namespace/nsnames.c head/sys/contrib/dev/acpica/namespace/nsobject.c head/sys/contrib/dev/acpica/namespace/nsparse.c head/sys/contrib/dev/acpica/namespace/nspredef.c head/sys/contrib/dev/acpica/namespace/nsrepair.c head/sys/contrib/dev/acpica/namespace/nsrepair2.c head/sys/contrib/dev/acpica/namespace/nssearch.c head/sys/contrib/dev/acpica/namespace/nsutils.c head/sys/contrib/dev/acpica/namespace/nswalk.c head/sys/contrib/dev/acpica/namespace/nsxfeval.c head/sys/contrib/dev/acpica/namespace/nsxfname.c head/sys/contrib/dev/acpica/namespace/nsxfobj.c head/sys/contrib/dev/acpica/osunixxf.c head/sys/contrib/dev/acpica/parser/psargs.c head/sys/contrib/dev/acpica/parser/psloop.c head/sys/contrib/dev/acpica/parser/psopcode.c head/sys/contrib/dev/acpica/parser/psparse.c head/sys/contrib/dev/acpica/parser/psscope.c head/sys/contrib/dev/acpica/parser/pstree.c head/sys/contrib/dev/acpica/parser/psutils.c head/sys/contrib/dev/acpica/parser/pswalk.c head/sys/contrib/dev/acpica/parser/psxface.c head/sys/contrib/dev/acpica/resources/rsaddr.c head/sys/contrib/dev/acpica/resources/rscalc.c head/sys/contrib/dev/acpica/resources/rscreate.c head/sys/contrib/dev/acpica/resources/rsdump.c head/sys/contrib/dev/acpica/resources/rsinfo.c head/sys/contrib/dev/acpica/resources/rsio.c head/sys/contrib/dev/acpica/resources/rsirq.c head/sys/contrib/dev/acpica/resources/rslist.c head/sys/contrib/dev/acpica/resources/rsmemory.c head/sys/contrib/dev/acpica/resources/rsmisc.c head/sys/contrib/dev/acpica/resources/rsutils.c head/sys/contrib/dev/acpica/resources/rsxface.c head/sys/contrib/dev/acpica/tables/tbfadt.c head/sys/contrib/dev/acpica/tables/tbfind.c head/sys/contrib/dev/acpica/tables/tbinstal.c head/sys/contrib/dev/acpica/tables/tbutils.c head/sys/contrib/dev/acpica/tables/tbxface.c head/sys/contrib/dev/acpica/tables/tbxfroot.c head/sys/contrib/dev/acpica/tools/acpiexec/aecommon.h head/sys/contrib/dev/acpica/utilities/utalloc.c head/sys/contrib/dev/acpica/utilities/utcache.c head/sys/contrib/dev/acpica/utilities/utcopy.c head/sys/contrib/dev/acpica/utilities/utdebug.c head/sys/contrib/dev/acpica/utilities/utdelete.c head/sys/contrib/dev/acpica/utilities/uteval.c head/sys/contrib/dev/acpica/utilities/utglobal.c head/sys/contrib/dev/acpica/utilities/utids.c head/sys/contrib/dev/acpica/utilities/utinit.c head/sys/contrib/dev/acpica/utilities/utlock.c head/sys/contrib/dev/acpica/utilities/utmath.c head/sys/contrib/dev/acpica/utilities/utmisc.c head/sys/contrib/dev/acpica/utilities/utmutex.c head/sys/contrib/dev/acpica/utilities/utobject.c head/sys/contrib/dev/acpica/utilities/utresrc.c head/sys/contrib/dev/acpica/utilities/utstate.c head/sys/contrib/dev/acpica/utilities/uttrack.c head/sys/contrib/dev/acpica/utilities/utxface.c head/sys/dev/acpi_support/acpi_ibm.c head/sys/dev/acpi_support/acpi_panasonic.c head/sys/dev/acpi_support/acpi_wmi.c head/sys/dev/acpica/Osd/OsdHardware.c head/sys/dev/acpica/Osd/OsdSchedule.c head/sys/dev/acpica/acpi_ec.c head/sys/dev/acpica/acpi_if.m head/sys/dev/acpica/acpi_package.c head/sys/dev/acpica/acpi_powerres.c head/sys/dev/acpica/acpi_smbat.c head/sys/dev/acpica/acpivar.h head/usr.sbin/acpi/acpidb/acpidb.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/changes.txt Thu Jan 21 21:14:28 2010 (r202771) @@ -1,7 +1,55 @@ ---------------------------------------- -14 December 2009. Summary of changes for version 20091214: +21 January 2010. Summary of changes for version 20100121: + +1) ACPI CA Core Subsystem: -This release is available at www.acpica.org/downloads +Added the 2010 copyright to all module headers and signons. This affects +virtually every file in the ACPICA core subsystem, the iASL compiler, the +tools/utilities, and the test suites. + +Implemented a change to the AcpiGetDevices interface to eliminate unnecessary +invocations of the _STA method. In the case where a specific _HID is +requested, do not run _STA until a _HID match is found. This eliminates +potentially dozens of _STA calls during a search for a particular device/HID, +which in turn can improve boot times. ACPICA BZ 828. Lin Ming. + +Implemented an additional repair for predefined method return values. Attempt +to repair unexpected NULL elements within returned Package objects. Create an +Integer of value zero, a NULL String, or a zero-length Buffer as appropriate. +ACPICA BZ 818. Lin Ming, Bob Moore. + +Removed the obsolete ACPI_INTEGER data type. This type was introduced as the +code was migrated from ACPI 1.0 (with 32-bit AML integers) to ACPI 2.0 (with +64-bit AML integers). It is now obsolete and this change removes it from the +ACPICA code base, replaced by UINT64. The original typedef has been retained +for now for compatibility with existing device driver code. ACPICA BZ 824. + +Removed the unused UINT32_STRUCT type, and the obsolete Integer64 field in +the parse tree object. + +Added additional warning options for the gcc-4 generation. Updated the source +accordingly. This includes some code restructuring to eliminate unreachable +code, elimination of some gotos, elimination of unused return values, some +additional casting, and removal of redundant declarations. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 87.0K Code, 18.0K Data, 105.0K Total + Debug Version: 163.4K Code, 50.8K Data, 214.2K Total + Current Release: + Non-Debug Version: 87.1K Code, 18.0K Data, 105.1K Total + Debug Version: 163.5K Code, 50.9K Data, 214.4K Total + +2) iASL Compiler/Disassembler and Tools: + +No functional changes for this release. + +---------------------------------------- +14 December 2009. Summary of changes for version 20091214: 1) ACPI CA Core Subsystem: @@ -68,8 +116,6 @@ depend on a specific initial value for a ---------------------------------------- 12 November 2009. Summary of changes for version 20091112: -This release is available at www.acpica.org/downloads - 1) ACPI CA Core Subsystem: Implemented a post-order callback to AcpiWalkNamespace. The existing @@ -141,8 +187,6 @@ level set very high. ---------------------------------------- 13 October 2009. Summary of changes for version 20091013: -This release is available at www.acpica.org/downloads - 1) ACPI CA Core Subsystem: Fixed a problem where an Operation Region _REG method could be executed more @@ -1037,9 +1081,6 @@ header. 29 July 2008. Summary of changes for version 20080729: -This release is available at http://acpica.org/downloads -Direct git access via http://www.acpica.org/repos/acpica.git - 1) ACPI CA Core Subsystem: Fix a possible deadlock in the GPE dispatch. Remove call to @@ -1129,9 +1170,6 @@ completion message. Previously, no messa ---------------------------------------- 01 July 2008. Summary of changes for version 20080701: -This release is available at http://acpica.org/downloads -Direct git access via http://www.acpica.org/repos/acpica.git - 0) Git source tree / acpica.org Fixed a problem where a git-clone from http would not transfer the entire Modified: head/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adfile.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/adfile.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/adisasm.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adwalk.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/adwalk.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/dmextern.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmrestag.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmrestag.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/dmrestag.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/dmtable.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/dmtbinfo.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/getopt.c ============================================================================== --- head/sys/contrib/dev/acpica/common/getopt.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/common/getopt.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -667,8 +667,8 @@ AnCheckForReservedName ( { /* The next two characters must be hex digits */ - if ((isxdigit (Name[2])) && - (isxdigit (Name[3]))) + if ((isxdigit ((int) Name[2])) && + (isxdigit ((int) Name[3]))) { return (ACPI_EVENT_RESERVED_NAME); } @@ -1236,7 +1236,7 @@ AnMethodAnalysisWalkBegin ( */ for (i = 0; Next->Asl.Value.String[i]; i++) { - if (!isalnum (Next->Asl.Value.String[i])) + if (!isalnum ((int) Next->Asl.Value.String[i])) { AslError (ASL_ERROR, ASL_MSG_ALPHANUMERIC_STRING, Next, Next->Asl.Value.String); @@ -2157,7 +2157,7 @@ AnOtherSemanticAnalysisWalkBegin ( */ if (((ArgNode->Asl.ParseOpcode == PARSEOP_WORDCONST) || (ArgNode->Asl.ParseOpcode == PARSEOP_INTEGER)) && - (ArgNode->Asl.Value.Integer >= (ACPI_INTEGER) ACPI_WAIT_FOREVER)) + (ArgNode->Asl.Value.Integer >= (UINT64) ACPI_WAIT_FOREVER)) { break; } Modified: head/sys/contrib/dev/acpica/compiler/aslcodegen.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcodegen.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslcodegen.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -511,7 +511,7 @@ TrCreateLeafNode ( ACPI_PARSE_OBJECT * TrCreateValuedLeafNode ( UINT32 ParseOpcode, - ACPI_INTEGER Value); + UINT64 Value); ACPI_PARSE_OBJECT * TrLinkChildren ( @@ -718,7 +718,7 @@ UtCheckIntegerRange ( UINT32 LowValue, UINT32 HighValue); -ACPI_INTEGER +UINT64 UtDoConstant ( char *String); Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.l Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.l Thu Jan 21 21:14:28 2010 (r202771) @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.y Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.y Thu Jan 21 21:14:28 2010 (r202771) @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -2388,7 +2388,7 @@ QWordConstExpr ConstExprTerm : PARSEOP_ZERO {$$ = TrCreateValuedLeafNode (PARSEOP_ZERO, 0);} | PARSEOP_ONE {$$ = TrCreateValuedLeafNode (PARSEOP_ONE, 1);} - | PARSEOP_ONES {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_INTEGER_MAX);} + | PARSEOP_ONES {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_UINT64_MAX);} ; /* OptionalCount must appear before ByteList or an incorrect reduction will result */ Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -127,7 +127,7 @@ #define IntelAcpiCA "Intel ACPI Component Architecture" #define CompilerId "ASL Optimizing Compiler" #define DisassemblerId "AML Disassembler" -#define CompilerCopyright "Copyright (C) 2000 - 2009 Intel Corporation" +#define CompilerCopyright "Copyright (c) 2000 - 2010 Intel Corporation" #define CompilerCompliance "Supports ACPI Specification Revision 4.0" #define CompilerName "iasl" #define CompilerCreatorId "INTL" Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -169,13 +169,7 @@ AeAddToErrorLog ( ASL_ERROR_MSG *Prev; - if (!Gbl_ErrorLog) - { - Gbl_ErrorLog = Enode; - return; - } - - /* List is sorted according to line number */ + /* If Gbl_ErrorLog is null, this is the first error node */ if (!Gbl_ErrorLog) { @@ -183,8 +177,10 @@ AeAddToErrorLog ( return; } - /* Walk error list until we find a line number greater than ours */ - + /* + * Walk error list until we find a line number greater than ours. + * List is sorted according to line number. + */ Prev = NULL; Next = Gbl_ErrorLog; Modified: head/sys/contrib/dev/acpica/compiler/aslfiles.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslfold.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfold.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslfold.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Jan 21 21:14:28 2010 (r202771) @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -165,7 +165,6 @@ ASL_EXTERN char ASL_ ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*Gbl_ErrorLog,NULL); ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*Gbl_NextError,NULL); -extern UINT32 Gbl_ExceptionCount[]; /* Option flags */ @@ -278,5 +277,12 @@ ASL_EXTERN char MsgB ASL_EXTERN char StringBuffer[ASL_MSG_BUFFER_SIZE]; ASL_EXTERN char StringBuffer2[ASL_MSG_BUFFER_SIZE]; + +#ifdef _DECLARE_GLOBALS +UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS] = {0,0,0,0,0,0}; +#else +extern UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS]; +#endif + #endif /* __ASLGLOBAL_H */ Modified: head/sys/contrib/dev/acpica/compiler/asllength.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllength.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asllength.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asllisting.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllisting.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asllisting.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -534,7 +534,7 @@ LdNamespace1Begin ( if (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC) { Status = LdLoadResourceElements (Op, WalkState); - goto Exit; + return_ACPI_STATUS (Status); } ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); @@ -578,7 +578,7 @@ LdNamespace1Begin ( AslCoreSubsystemError (Op, Status, "Failure from namespace lookup", FALSE); - goto Exit; + return_ACPI_STATUS (Status); } /* We found a node with this name, now check the type */ @@ -713,15 +713,14 @@ LdNamespace1Begin ( AslError (ASL_ERROR, ASL_MSG_NAME_EXISTS, Op, Op->Asl.ExternalName); - Status = AE_OK; - goto Exit; + return_ACPI_STATUS (AE_OK); } } else { AslCoreSubsystemError (Op, Status, "Failure from namespace lookup", FALSE); - goto Exit; + return_ACPI_STATUS (Status); } } @@ -759,8 +758,7 @@ FinishNode: Node->Value = (UINT32) Op->Asl.Extra; } -Exit: - return (Status); + return_ACPI_STATUS (Status); } Modified: head/sys/contrib/dev/acpica/compiler/asllookup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllookup.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asllookup.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmain.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmain.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslmain.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -165,9 +165,6 @@ static int AslDoResponseFile ( char *Filename); -extern int AcpiGbl_Opterr; -extern int AcpiGbl_Optind; - #define ASL_TOKEN_SEPARATORS " \t\n" #define ASL_SUPPORTED_OPTIONS "@:2b:cd^e:fgh^i^I:l^o:p:r:s:t:v:w:x:" Modified: head/sys/contrib/dev/acpica/compiler/aslmap.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmap.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslmap.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslopcodes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopcodes.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslopcodes.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -328,7 +328,7 @@ OpcSetOptimalIntegerSize ( } break; - case ACPI_INTEGER_MAX: + case ACPI_UINT64_MAX: /* Check for table integer width (32 or 64) */ @@ -568,7 +568,7 @@ OpcDoEisaId ( if (i < 3) { - if (!isupper (InString[i])) + if (!isupper ((int) InString[i])) { Status = AE_BAD_PARAMETER; } @@ -576,7 +576,7 @@ OpcDoEisaId ( /* Last 4 characters must be hex digits */ - else if (!isxdigit (InString[i])) + else if (!isxdigit ((int) InString[i])) { Status = AE_BAD_PARAMETER; } @@ -666,7 +666,7 @@ OpcDoUuId ( } else { - if (!isxdigit (InString[i])) + if (!isxdigit ((int) InString[i])) { Status = AE_BAD_PARAMETER; } Modified: head/sys/contrib/dev/acpica/compiler/asloperands.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloperands.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asloperands.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -604,7 +604,7 @@ OpnDoRegion ( } else { - Op->Asl.Value.Integer = ACPI_INTEGER_MAX; + Op->Asl.Value.Integer = ACPI_UINT64_MAX; } } @@ -1007,7 +1007,7 @@ OpnDoDefinitionBlock ( for (i = 0; i < 4; i++) { - if (!isalnum (Gbl_TableSignature[i])) + if (!isalnum ((int) Gbl_TableSignature[i])) { AslError (ASL_ERROR, ASL_MSG_TABLE_SIGNATURE, Child, "Contains non-alphanumeric characters"); Modified: head/sys/contrib/dev/acpica/compiler/aslopt.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopt.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslopt.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslresource.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslresource.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslresource.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -184,7 +184,7 @@ RsCreateBitField ( { Op->Asl.ExternalName = Name; - Op->Asl.Value.Integer = ((ACPI_INTEGER) ByteOffset * 8) + BitOffset; + Op->Asl.Value.Integer = ((UINT64) ByteOffset * 8) + BitOffset; Op->Asl.CompileFlags |= (NODE_IS_RESOURCE_FIELD | NODE_IS_BIT_OFFSET); } Modified: head/sys/contrib/dev/acpica/compiler/aslrestype1.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype1.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslrestype1.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslrestype2.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslrestype2.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslrestype2.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslstartup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstartup.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslstartup.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslstubs.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslstubs.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslstubs.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asltransform.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltransform.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asltransform.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -554,7 +554,7 @@ TrDoSwitch ( NewOp = NewOp2; NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp->Asl.Next = NewOp2; TrAmlInitLineNumbers (NewOp2, Predicate); @@ -612,7 +612,7 @@ TrDoSwitch ( * CaseOp->Child->Peer is the beginning of the case block */ NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp->Asl.Next = Predicate; TrAmlInitLineNumbers (NewOp, Predicate); @@ -761,7 +761,7 @@ TrDoSwitch ( /* Create the NameSeg child for the Name node */ NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESEG, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp2->Asl.CompileFlags |= NODE_IS_NAME_DECLARATION; NewOp->Asl.Child = NewOp2; @@ -771,22 +771,22 @@ TrDoSwitch ( { case ACPI_BTYPE_INTEGER: NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_ZERO, - (ACPI_INTEGER) 0); + (UINT64) 0); break; case ACPI_BTYPE_STRING: NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, - (ACPI_INTEGER) ACPI_TO_INTEGER ("")); + (UINT64) ACPI_TO_INTEGER ("")); break; case ACPI_BTYPE_BUFFER: (void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER, - (ACPI_INTEGER) 0)); + (UINT64) 0)); Next = NewOp2->Asl.Next; (void) TrLinkChildren (Next, 1, TrCreateValuedLeafNode (PARSEOP_ZERO, - (ACPI_INTEGER) 1)); + (UINT64) 1)); (void) TrLinkPeerNode (Next->Asl.Child, - TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (ACPI_INTEGER) 0)); + TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (UINT64) 0)); TrAmlSetSubtreeParent (Next->Asl.Child, Next); break; @@ -821,7 +821,7 @@ TrDoSwitch ( Predicate->Asl.Parent = StoreOp; NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG, - (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName)); + (UINT64) ACPI_TO_INTEGER (PredicateValueName)); NewOp->Asl.Parent = StoreOp; Predicate->Asl.Next = NewOp; Modified: head/sys/contrib/dev/acpica/compiler/asltree.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltree.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asltree.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -490,7 +490,7 @@ TrCreateLeafNode ( ACPI_PARSE_OBJECT * TrCreateValuedLeafNode ( UINT32 ParseOpcode, - ACPI_INTEGER Value) + UINT64 Value) { ACPI_PARSE_OBJECT *Op; Modified: head/sys/contrib/dev/acpica/compiler/asltypes.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltypes.h Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/asltypes.h Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -571,11 +571,6 @@ char *AslErrorLevel [ #define ASL_ERROR_LEVEL_LENGTH 8 /* Length of strings above */ -/* Exception counters */ - -UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS] = {0,0,0,0,0,0}; - -#endif - +#endif /* ASL_EXCEPTIONS */ #endif /* __ASLTYPES_H */ Modified: head/sys/contrib/dev/acpica/compiler/aslutils.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslutils.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/compiler/aslutils.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -142,7 +142,7 @@ static ACPI_STATUS UtStrtoul64 ( char *String, UINT32 Base, - ACPI_INTEGER *RetInteger); + UINT64 *RetInteger); static void UtPadNameWithUnderscores ( @@ -846,12 +846,12 @@ UtAttachNamepathToOwner ( * ******************************************************************************/ -ACPI_INTEGER +UINT64 UtDoConstant ( char *String) { ACPI_STATUS Status; - ACPI_INTEGER Converted; + UINT64 Converted; char ErrBuf[64]; @@ -888,11 +888,11 @@ static ACPI_STATUS UtStrtoul64 ( char *String, UINT32 Base, - ACPI_INTEGER *RetInteger) + UINT64 *RetInteger) { UINT32 Index; UINT32 Sign; - ACPI_INTEGER ReturnValue = 0; + UINT64 ReturnValue = 0; ACPI_STATUS Status = AE_OK; @@ -916,7 +916,7 @@ UtStrtoul64 ( /* Skip over any white space in the buffer: */ - while (isspace (*String) || *String == '\t') + while (isspace ((int) *String) || *String == '\t') { ++String; } @@ -948,7 +948,7 @@ UtStrtoul64 ( { if (*String == '0') { - if (tolower (*(++String)) == 'x') + if (tolower ((int) *(++String)) == 'x') { Base = 16; ++String; @@ -975,7 +975,7 @@ UtStrtoul64 ( if (Base == 16 && *String == '0' && - tolower (*(++String)) == 'x') + tolower ((int) *(++String)) == 'x') { String++; } @@ -984,14 +984,14 @@ UtStrtoul64 ( while (*String) { - if (isdigit (*String)) + if (isdigit ((int) *String)) { Index = ((UINT8) *String) - '0'; } else { - Index = (UINT8) toupper (*String); - if (isupper ((char) Index)) + Index = (UINT8) toupper ((int) *String); + if (isupper ((int) Index)) { Index = Index - 'A' + 10; } @@ -1008,8 +1008,8 @@ UtStrtoul64 ( /* Check to see if value is out of range: */ - if (ReturnValue > ((ACPI_INTEGER_MAX - (ACPI_INTEGER) Index) / - (ACPI_INTEGER) Base)) + if (ReturnValue > ((ACPI_UINT64_MAX - (UINT64) Index) / + (UINT64) Base)) { goto ErrorExit; } Modified: head/sys/contrib/dev/acpica/debugger/dbcmds.c ============================================================================== --- head/sys/contrib/dev/acpica/debugger/dbcmds.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/debugger/dbcmds.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/debugger/dbdisply.c ============================================================================== --- head/sys/contrib/dev/acpica/debugger/dbdisply.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/debugger/dbdisply.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/debugger/dbexec.c ============================================================================== --- head/sys/contrib/dev/acpica/debugger/dbexec.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/debugger/dbexec.c Thu Jan 21 21:14:28 2010 (r202771) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -243,7 +243,7 @@ AcpiDbExecuteMethod ( default: Params[i].Type = ACPI_TYPE_INTEGER; - Params[i].Integer.Value = i * (ACPI_INTEGER) 0x1000; + Params[i].Integer.Value = i * (UINT64) 0x1000; break; } } @@ -484,7 +484,7 @@ AcpiDbExecute ( * Allow any handlers in separate threads to complete. * (Such as Notify handlers invoked from AML executed above). */ - AcpiOsSleep ((ACPI_INTEGER) 10); + AcpiOsSleep ((UINT64) 10); #ifdef ACPI_DEBUG_OUTPUT Modified: head/sys/contrib/dev/acpica/debugger/dbfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/debugger/dbfileio.c Thu Jan 21 21:12:36 2010 (r202770) +++ head/sys/contrib/dev/acpica/debugger/dbfileio.c Thu Jan 21 21:14:28 2010 (r202771) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. * All rights reserved. * * 2. License @@ -150,9 +150,6 @@ AcpiDbCheckTextModeCorruption ( UINT32 TableLength, UINT32 FileLength); -static ACPI_STATUS -AeLocalLoadTable ( - ACPI_TABLE_HEADER *TablePtr); #endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 21:21:03 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEC921065697; Thu, 21 Jan 2010 21:21:03 +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 ADD1C8FC17; Thu, 21 Jan 2010 21:21:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LLL3gr049074; Thu, 21 Jan 2010 21:21:03 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LLL1Sk049073; Thu, 21 Jan 2010 21:21:01 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001212121.o0LLL1Sk049073@svn.freebsd.org> From: Rick Macklem Date: Thu, 21 Jan 2010 21:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202772 - head/sbin/mount_nfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 21:21:03 -0000 Author: rmacklem Date: Thu Jan 21 21:21:00 2010 New Revision: 202772 URL: http://svn.freebsd.org/changeset/base/202772 Log: Document the negnametimeo option for mount_nfs as implemented by r202767. This is a content change. MFC after: 2 weeks Modified: head/sbin/mount_nfs/mount_nfs.8 Modified: head/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- head/sbin/mount_nfs/mount_nfs.8 Thu Jan 21 21:14:28 2010 (r202771) +++ head/sbin/mount_nfs/mount_nfs.8 Thu Jan 21 21:21:00 2010 (r202772) @@ -151,6 +151,10 @@ Force the mount protocol to use UDP tran (Necessary for some old .Bx servers.) +.It Cm negnametimeo Ns = Ns Aq Ar value +Override the default of NFS_DEFAULT_NEGNAMETIMEO for the timeout (in seconds) +for negative name cache entries. If this is set to 0 it disables negative +name caching for the mount point. .It Cm nfsv2 Use the NFS Version 2 protocol (the default is to try version 3 first then version 2). From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 21:31:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9103F1065670; Thu, 21 Jan 2010 21:31:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F4588FC43; Thu, 21 Jan 2010 21:31:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LLVdLF051537; Thu, 21 Jan 2010 21:31:39 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LLVd7L051536; Thu, 21 Jan 2010 21:31:39 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201001212131.o0LLVd7L051536@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 21 Jan 2010 21:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202773 - head/sys/contrib/dev/acpica/namespace X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 21:31:39 -0000 Author: jkim Date: Thu Jan 21 21:31:39 2010 New Revision: 202773 URL: http://svn.freebsd.org/changeset/base/202773 Log: Fix a new header inclusion. Modified: head/sys/contrib/dev/acpica/namespace/nsrepair.c Modified: head/sys/contrib/dev/acpica/namespace/nsrepair.c ============================================================================== --- head/sys/contrib/dev/acpica/namespace/nsrepair.c Thu Jan 21 21:21:00 2010 (r202772) +++ head/sys/contrib/dev/acpica/namespace/nsrepair.c Thu Jan 21 21:31:39 2010 (r202773) @@ -119,7 +119,7 @@ #include #include #include -#include "acpredef.h" +#include #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME ("nsrepair") From owner-svn-src-head@FreeBSD.ORG Thu Jan 21 21:59:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 506211065672; Thu, 21 Jan 2010 21:59:11 +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 4037D8FC16; Thu, 21 Jan 2010 21:59:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0LLxBAE057761; Thu, 21 Jan 2010 21:59:11 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0LLxA1k057760; Thu, 21 Jan 2010 21:59:10 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201001212159.o0LLxA1k057760@svn.freebsd.org> From: Rick Macklem Date: Thu, 21 Jan 2010 21:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202774 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 21:59:11 -0000 Author: rmacklem Date: Thu Jan 21 21:59:10 2010 New Revision: 202774 URL: http://svn.freebsd.org/changeset/base/202774 Log: Fix a typo in a comment introduced by r202767. MFC after: 2 weeks Modified: head/sys/nfsclient/nfs_vnops.c Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Thu Jan 21 21:31:39 2010 (r202773) +++ head/sys/nfsclient/nfs_vnops.c Thu Jan 21 21:59:10 2010 (r202774) @@ -981,7 +981,6 @@ nfs_lookup(struct vop_lookup_args *ap) * We only accept a negative hit in the cache if the * modification time of the parent directory matches * our cached copy. Otherwise, we discard all of the - * negative cache entries for this directory. * negative cache entries for this directory. We also * only trust -ve cache entries for less than * nm_negative_namecache_timeout seconds. From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 04:53:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25AE3106566B; Fri, 22 Jan 2010 04:53:09 +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 1515B8FC15; Fri, 22 Jan 2010 04:53:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M4r8Sx051374; Fri, 22 Jan 2010 04:53:08 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M4r8pi051372; Fri, 22 Jan 2010 04:53:08 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001220453.o0M4r8pi051372@svn.freebsd.org> From: Ed Schouten Date: Fri, 22 Jan 2010 04:53:08 +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: r202778 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 04:53:09 -0000 Author: ed Date: Fri Jan 22 04:53:08 2010 New Revision: 202778 URL: http://svn.freebsd.org/changeset/base/202778 Log: Remove comments about breaking the specification. I've discussed this issue with the Austin Group and it will be fixed in future revisions of the specification. The issue was that ut_line fields weren't supposed to be valid for LOGIN_PROCESS entries, while getutxline() would try to match these records anyway. They also agreed on our way of implementing pututxline() without getutxid() (which other operating systems also do), but unfortunately they disagreed with our way of replacing DEAD_PROCESS entries, which is a pity. The current specification allows the utmpx database to become infinitely big over time. See also: http://austingroupbugs.net/view.php?id=213#c378 Modified: head/lib/libc/gen/utxdb.c Modified: head/lib/libc/gen/utxdb.c ============================================================================== --- head/lib/libc/gen/utxdb.c Fri Jan 22 03:59:05 2010 (r202777) +++ head/lib/libc/gen/utxdb.c Fri Jan 22 04:53:08 2010 (r202778) @@ -83,7 +83,6 @@ utx_to_futx(const struct utmpx *ut, stru case LOGIN_PROCESS: UTOF_ID(ut, fu); UTOF_STRING(ut, fu, user); - /* XXX: bug in the specification? Needed for getutxline(). */ UTOF_STRING(ut, fu, line); UTOF_PID(ut, fu); break; @@ -156,7 +155,6 @@ futx_to_utx(const struct futx *fu) case LOGIN_PROCESS: FTOU_ID(fu, ut); FTOU_STRING(fu, ut, user); - /* XXX: bug in the specification? Needed for getutxline(). */ FTOU_STRING(fu, ut, line); FTOU_PID(fu, ut); break; From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 05:09:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2945106566B; Fri, 22 Jan 2010 05:09:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B22A88FC0C; Fri, 22 Jan 2010 05:09:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M59APU054995; Fri, 22 Jan 2010 05:09:10 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M59ArC054993; Fri, 22 Jan 2010 05:09:10 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001220509.o0M59ArC054993@svn.freebsd.org> From: Ed Schouten Date: Fri, 22 Jan 2010 05:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202779 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 05:09:10 -0000 Author: ed Date: Fri Jan 22 05:09:10 2010 New Revision: 202779 URL: http://svn.freebsd.org/changeset/base/202779 Log: Describe why pututxline() doesn't entirely conform to standards. Modified: head/lib/libc/gen/getutxent.3 Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Fri Jan 22 04:53:08 2010 (r202778) +++ head/lib/libc/gen/getutxent.3 Fri Jan 22 05:09:10 2010 (r202779) @@ -414,14 +414,32 @@ The .Fn endutxent , .Fn getutxent , .Fn getutxid , -.Fn getutxline , -.Fn pututxline +.Fn getutxline and .Fn setutxent functions are expected to conform to .St -p1003.1-2008 . .Pp The +.Fn pututxline +function deviates from the standard by writing its records to multiple +database files, depending on its +.Fa ut_type . +This prevents the need for special utility functions to update the other +databases, such as the +.Fn updwtmpx +function which is often available in other implementations. +It also tries to replace +.Dv DEAD_PROCESS +entries in the active sessions database when storing +.Dv USER_PROCESS +entries and no entry with the same value for +.Fa ut_id +has been found. +The standard always requires a new entry to be allocated, which could +cause an unbounded growth to the database. +.Pp +The .Fn getutxuser and .Fn setutxdb From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 05:19:52 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F32A6106566C; Fri, 22 Jan 2010 05:19:51 +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 E2A4E8FC18; Fri, 22 Jan 2010 05:19:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M5Jp64057410; Fri, 22 Jan 2010 05:19:51 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M5Jpvn057408; Fri, 22 Jan 2010 05:19:51 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001220519.o0M5Jpvn057408@svn.freebsd.org> From: Ed Schouten Date: Fri, 22 Jan 2010 05:19: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: r202780 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 05:19:52 -0000 Author: ed Date: Fri Jan 22 05:19:51 2010 New Revision: 202780 URL: http://svn.freebsd.org/changeset/base/202780 Log: English nitpicking. Submitted by: jmallett Modified: head/lib/libc/gen/getutxent.3 Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Fri Jan 22 05:09:10 2010 (r202779) +++ head/lib/libc/gen/getutxent.3 Fri Jan 22 05:19:51 2010 (r202780) @@ -437,7 +437,7 @@ entries and no entry with the same value .Fa ut_id has been found. The standard always requires a new entry to be allocated, which could -cause an unbounded growth to the database. +cause an unbounded growth of the database. .Pp The .Fn getutxuser From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 07:53:42 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33BDB106566B; Fri, 22 Jan 2010 07:53:42 +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 220508FC08; Fri, 22 Jan 2010 07:53:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M7rgbG094710; Fri, 22 Jan 2010 07:53:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M7rfX9094706; Fri, 22 Jan 2010 07:53:41 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201001220753.o0M7rfX9094706@svn.freebsd.org> From: Michael Tuexen Date: Fri, 22 Jan 2010 07:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202782 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 07:53:42 -0000 Author: tuexen Date: Fri Jan 22 07:53:41 2010 New Revision: 202782 URL: http://svn.freebsd.org/changeset/base/202782 Log: Use [] instead of [0] for flexible arrays. Obtained from: Bruce Cran MFC after: 1 week Modified: head/sys/netinet/sctp_auth.h head/sys/netinet/sctp_header.h head/sys/netinet/sctp_uio.h Modified: head/sys/netinet/sctp_auth.h ============================================================================== --- head/sys/netinet/sctp_auth.h Fri Jan 22 07:22:46 2010 (r202781) +++ head/sys/netinet/sctp_auth.h Fri Jan 22 07:53:41 2010 (r202782) @@ -60,7 +60,7 @@ typedef union sctp_hash_context { typedef struct sctp_key { uint32_t keylen; - uint8_t key[0]; + uint8_t key[]; } sctp_key_t; typedef struct sctp_shared_key { @@ -83,7 +83,7 @@ typedef struct sctp_auth_chklist { typedef struct sctp_hmaclist { uint16_t max_algo; /* max algorithms allocated */ uint16_t num_algo; /* num algorithms used */ - uint16_t hmac[0]; + uint16_t hmac[]; } sctp_hmaclist_t; /* authentication info */ Modified: head/sys/netinet/sctp_header.h ============================================================================== --- head/sys/netinet/sctp_header.h Fri Jan 22 07:22:46 2010 (r202781) +++ head/sys/netinet/sctp_header.h Fri Jan 22 07:53:41 2010 (r202782) @@ -138,7 +138,7 @@ struct sctp_asconf_addrv4_param { /* an struct sctp_supported_chunk_types_param { struct sctp_paramhdr ph;/* type = 0x8008 len = x */ - uint8_t chunk_types[0]; + uint8_t chunk_types[]; } SCTP_PACKED; @@ -219,7 +219,7 @@ struct sctp_state_cookie { /* this is ou struct sctp_missing_nat_state { uint16_t cause; uint16_t length; - uint8_t data[0]; + uint8_t data[]; } SCTP_PACKED; @@ -451,7 +451,7 @@ struct sctp_pktdrop_chunk { uint32_t current_onq; uint16_t trunc_len; uint16_t reserved; - uint8_t data[0]; + uint8_t data[]; } SCTP_PACKED; /**********STREAM RESET STUFF ******************/ @@ -461,13 +461,13 @@ struct sctp_stream_reset_out_request { uint32_t request_seq; /* monotonically increasing seq no */ uint32_t response_seq; /* if a response, the resp seq no */ uint32_t send_reset_at_tsn; /* last TSN I assigned outbound */ - uint16_t list_of_streams[0]; /* if not all list of streams */ + uint16_t list_of_streams[]; /* if not all list of streams */ } SCTP_PACKED; struct sctp_stream_reset_in_request { struct sctp_paramhdr ph; uint32_t request_seq; - uint16_t list_of_streams[0]; /* if not all list of streams */ + uint16_t list_of_streams[]; /* if not all list of streams */ } SCTP_PACKED; @@ -545,24 +545,24 @@ struct sctp_stream_reset_resp_tsn { #define SCTP_RANDOM_MAX_SIZE 256 struct sctp_auth_random { struct sctp_paramhdr ph;/* type = 0x8002 */ - uint8_t random_data[0]; + uint8_t random_data[]; } SCTP_PACKED; struct sctp_auth_chunk_list { struct sctp_paramhdr ph;/* type = 0x8003 */ - uint8_t chunk_types[0]; + uint8_t chunk_types[]; } SCTP_PACKED; struct sctp_auth_hmac_algo { struct sctp_paramhdr ph;/* type = 0x8004 */ - uint16_t hmac_ids[0]; + uint16_t hmac_ids[]; } SCTP_PACKED; struct sctp_auth_chunk { struct sctp_chunkhdr ch; uint16_t shared_key_id; uint16_t hmac_id; - uint8_t hmac[0]; + uint8_t hmac[]; } SCTP_PACKED; struct sctp_auth_invalid_hmac { Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Fri Jan 22 07:22:46 2010 (r202781) +++ head/sys/netinet/sctp_uio.h Fri Jan 22 07:53:41 2010 (r202782) @@ -276,7 +276,7 @@ struct sctp_send_failed { uint32_t ssf_error; struct sctp_sndrcvinfo ssf_info; sctp_assoc_t ssf_assoc_id; - uint8_t ssf_data[0]; + uint8_t ssf_data[]; }; /* flag that indicates state of data */ @@ -370,7 +370,7 @@ struct sctp_stream_reset_event { uint16_t strreset_flags; uint32_t strreset_length; sctp_assoc_t strreset_assoc_id; - uint16_t strreset_list[0]; + uint16_t strreset_list[]; }; /* flags in strreset_flags field */ @@ -517,13 +517,13 @@ struct sctp_authchunk { struct sctp_authkey { sctp_assoc_t sca_assoc_id; uint16_t sca_keynumber; - uint8_t sca_key[0]; + uint8_t sca_key[]; }; /* SCTP_HMAC_IDENT */ struct sctp_hmacalgo { uint32_t shmac_number_of_idents; - uint16_t shmac_idents[0]; + uint16_t shmac_idents[]; }; /* AUTH hmac_id */ @@ -544,7 +544,7 @@ struct sctp_authkeyid { /* SCTP_PEER_AUTH_CHUNKS / SCTP_LOCAL_AUTH_CHUNKS */ struct sctp_authchunks { sctp_assoc_t gauth_assoc_id; - uint8_t gauth_chunks[0]; + uint8_t gauth_chunks[]; }; struct sctp_assoc_value { @@ -554,7 +554,7 @@ struct sctp_assoc_value { struct sctp_assoc_ids { uint32_t gaids_number_of_ids; - sctp_assoc_t gaids_assoc_id[0]; + sctp_assoc_t gaids_assoc_id[]; }; struct sctp_sack_info { @@ -603,7 +603,7 @@ struct sctp_stream_reset { sctp_assoc_t strrst_assoc_id; uint16_t strrst_flags; uint16_t strrst_num_streams; /* 0 == ALL */ - uint16_t strrst_list[0];/* list if strrst_num_streams is not 0 */ + uint16_t strrst_list[]; /* list if strrst_num_streams is not 0 */ }; @@ -756,7 +756,7 @@ struct sctp_cwnd_log_req { int32_t num_ret; /* Number returned */ int32_t start_at; /* start at this one */ int32_t end_at; /* end at this one */ - struct sctp_cwnd_log log[0]; + struct sctp_cwnd_log log[]; }; struct sctp_timeval { From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 08:45:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41899106566C; Fri, 22 Jan 2010 08:45:13 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF7E8FC0C; Fri, 22 Jan 2010 08:45:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M8jChv009732; Fri, 22 Jan 2010 08:45:12 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M8jC6v009730; Fri, 22 Jan 2010 08:45:12 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001220845.o0M8jC6v009730@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 22 Jan 2010 08:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202783 - head/sys/fs/pseudofs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 08:45:13 -0000 Author: jh Date: Fri Jan 22 08:45:12 2010 New Revision: 202783 URL: http://svn.freebsd.org/changeset/base/202783 Log: Truncate read request rather than returning EIO if the request is larger than MAXPHYS + 1. This fixes a problem with cat(1) when it uses a large I/O buffer. Reported by: Fernando Apesteguía Suggested by: jilles Reviewed by: des Approved by: trasz (mentor) Modified: head/sys/fs/pseudofs/pseudofs_vnops.c Modified: head/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vnops.c Fri Jan 22 07:53:41 2010 (r202782) +++ head/sys/fs/pseudofs/pseudofs_vnops.c Fri Jan 22 08:45:12 2010 (r202783) @@ -637,10 +637,8 @@ pfs_read(struct vop_read_args *va) error = EINVAL; goto ret; } - if (buflen > MAXPHYS + 1) { - error = EIO; - goto ret; - } + if (buflen > MAXPHYS + 1) + buflen = MAXPHYS + 1; sb = sbuf_new(sb, NULL, buflen, 0); if (sb == NULL) { From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 08:51:58 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6EF91065672; Fri, 22 Jan 2010 08:51:58 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C29A8FC16; Fri, 22 Jan 2010 08:51:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M8pwUY011733; Fri, 22 Jan 2010 08:51:58 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M8pwCI011730; Fri, 22 Jan 2010 08:51:58 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201001220851.o0M8pwCI011730@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 22 Jan 2010 08:51: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: r202784 - head/sbin/mdconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 08:51:58 -0000 Author: jh Date: Fri Jan 22 08:51:58 2010 New Revision: 202784 URL: http://svn.freebsd.org/changeset/base/202784 Log: Make mdconfig(8) WARNS=6 clean: - Constify geom_config_get() name argument. - Add void keyword for usage(). - Initialize mdunit to NULL. - Don't call md_prthumanval() at all if length is NULL. Approved by: trasz (mentor) Modified: head/sbin/mdconfig/Makefile head/sbin/mdconfig/mdconfig.c Modified: head/sbin/mdconfig/Makefile ============================================================================== --- head/sbin/mdconfig/Makefile Fri Jan 22 08:45:12 2010 (r202783) +++ head/sbin/mdconfig/Makefile Fri Jan 22 08:51:58 2010 (r202784) @@ -4,7 +4,6 @@ PROG= mdconfig MAN= mdconfig.8 MLINKS= mdconfig.8 vnconfig.8 -WARNS?= 2 DPADD= ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} LDADD= -lutil -lgeom -lbsdxml -lsbuf Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Fri Jan 22 08:45:12 2010 (r202783) +++ head/sbin/mdconfig/mdconfig.c Fri Jan 22 08:51:58 2010 (r202784) @@ -41,7 +41,7 @@ static void usage(void); static int md_find(char *, const char *); static int md_query(char *name); static int md_list(char *units, int opt); -static char *geom_config_get(struct gconf *g, char *name); +static char *geom_config_get(struct gconf *g, const char *name); static void md_prthumanval(char *length); #define OPT_VERBOSE 0x01 @@ -52,7 +52,7 @@ static void md_prthumanval(char *length) #define CLASS_NAME_MD "MD" static void -usage() +usage(void) { fprintf(stderr, "usage: mdconfig -a -t type [-n] [-o [no]option] ... [-f file]\n" @@ -74,7 +74,7 @@ main(int argc, char **argv) int ch, fd, i, vflag; char *p; int cmdline = 0; - char *mdunit; + char *mdunit = NULL; bzero(&mdio, sizeof(mdio)); mdio.md_file = malloc(PATH_MAX); @@ -379,10 +379,9 @@ md_list(char *units, int opt) if (strcmp(type, "vnode") == 0) file = geom_config_get(gc, "file"); length = geom_config_get(gc, "length"); - if (length == NULL) - length = ""; printf("\t%s\t", type); - md_prthumanval(length); + if (length != NULL) + md_prthumanval(length); if (file != NULL) { printf("\t%s", file); file = NULL; @@ -409,7 +408,7 @@ md_list(char *units, int opt) * Returns value of 'name' from gconfig structure. */ static char * -geom_config_get(struct gconf *g, char *name) +geom_config_get(struct gconf *g, const char *name) { struct gconfig *gce; From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 09:19:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86C90106566B; Fri, 22 Jan 2010 09:19:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 756EE8FC0C; Fri, 22 Jan 2010 09:19:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9Jvts019726; Fri, 22 Jan 2010 09:19:57 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9JvQj019724; Fri, 22 Jan 2010 09:19:57 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001220919.o0M9JvQj019724@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 09:19:57 +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: r202785 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 09:19:57 -0000 Author: imp Date: Fri Jan 22 09:19:57 2010 New Revision: 202785 URL: http://svn.freebsd.org/changeset/base/202785 Log: Jump to the mips reset vector. OR in the 0x80000000 for kseg0 and cast it to a long so it will work on 64-bit targets. reset now works on octeon, so I don't have to power cycle the board as often. Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 08:51:58 2010 (r202784) +++ head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 09:19:57 2010 (r202785) @@ -99,7 +99,7 @@ platform_cpu_init() void platform_reset(void) { - ((void(*)(void))0x1fc00000)(); /* Jump to this hex address */ + ((void(*)(void))(long)0x9fc00000)(); /* Jump to MIPS reset vector */ } From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 09:23:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AE9F106568B; Fri, 22 Jan 2010 09:23:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D41688FC0A; Fri, 22 Jan 2010 09:23:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9NYHG020803; Fri, 22 Jan 2010 09:23:34 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9NYBS020801; Fri, 22 Jan 2010 09:23:34 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001220923.o0M9NYBS020801@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 09:23:34 +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: r202786 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 09:23:35 -0000 Author: imp Date: Fri Jan 22 09:23:34 2010 New Revision: 202786 URL: http://svn.freebsd.org/changeset/base/202786 Log: Don't clear bss/sbss. The boot loader already does this. In addition, the Cavium version of the boot loader puts data just after &end, so our rounding up to the next page in clearing memory overwrote their data, which meant we'd get a lot of wrong values for parameters to the system. While I'm here, remove argc/argv parsing. Those values aren't passed in via a0 and a1, so it was a guaranted panic on some boards. Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 09:19:57 2010 (r202785) +++ head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 09:23:34 2010 (r202786) @@ -643,14 +643,7 @@ platform_start(__register_t a0, __regist __register_t a3) { uint64_t platform_counter_freq; - vm_offset_t kernend; - int argc = a0; - char **argv = (char **)a1; - int i, mem; - - /* clear the BSS and SBSS segments */ - kernend = round_page((vm_offset_t)&end); - memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + int i, mem = 0; /* Initialize pcpu stuff */ mips_pcpu0_init(); @@ -660,17 +653,6 @@ platform_start(__register_t a0, __regist octeon_ciu_reset(); octeon_uart_write_string(0, "Platform Starting\n"); - /* - * Looking for mem=XXM argument - */ - mem = 0; /* Just something to start with */ - for (i=0; i < argc; i++) { - if (strncmp(argv[i], "mem=", 4) == 0) { - mem = strtol(argv[i] + 4, NULL, 0); - break; - } - } - bootverbose = 1; if (mem > 0) realmem = btoc(mem << 20); @@ -694,10 +676,6 @@ platform_start(__register_t a0, __regist platform_counter_freq = 330000000UL; /* XXX: from idt */ mips_timer_init_params(platform_counter_freq, 1); cninit(); - printf("cmd line: "); - for (i=0; i < argc; i++) - printf("%s ", argv[i]); - printf("\n"); init_param2(physmem); mips_cpu_init(); mutex_init(); From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 09:31:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA8BB1065672; Fri, 22 Jan 2010 09:31:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D81EB8FC18; Fri, 22 Jan 2010 09:31:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9VAcE023167; Fri, 22 Jan 2010 09:31:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9VA5E023165; Fri, 22 Jan 2010 09:31:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001220931.o0M9VA5E023165@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 09:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202789 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 09:31:11 -0000 Author: mav Date: Fri Jan 22 09:31:10 2010 New Revision: 202789 URL: http://svn.freebsd.org/changeset/base/202789 Log: - Improve tracer, to handle more cases of input-to-output monitoring loopback. - Change the meaning of "mix" OSS control. Now it controls loopback level, according to comments in soundcard.h. - Allow AD1981HD codecs to use playback mixer. Now driver should be able to really use it. - Fix bug in shared muters operation. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 09:30:09 2010 (r202788) +++ head/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 09:31:10 2010 (r202789) @@ -86,7 +86,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20100112_0140" +#define HDA_DRV_TEST_REV "20100122_0141" SND_DECLARE_FILE("$FreeBSD$"); @@ -3934,8 +3934,8 @@ hdac_audio_ctl_ossmixer_set(struct snd_m rvol = rvol * pdevinfo->right[j] / 100; } } - mute = (left == 0) ? HDA_AMP_MUTE_LEFT : 0; - mute |= (right == 0) ? HDA_AMP_MUTE_RIGHT : 0; + mute = (lvol == 0) ? HDA_AMP_MUTE_LEFT : 0; + mute |= (rvol == 0) ? HDA_AMP_MUTE_RIGHT : 0; lvol = (lvol * ctl->step + 50) / 100; rvol = (rvol * ctl->step + 50) / 100; hdac_audio_ctl_amp_set(ctl, mute, lvol, rvol); @@ -4757,37 +4757,6 @@ hdac_vendor_patch_parse(struct hdac_devi } switch (id) { -#if 0 - case HDA_CODEC_ALC883: - /* - * nid: 24/25 = External (jack) or Internal (fixed) Mic. - * Clear vref cap for jack connectivity. - */ - w = hdac_widget_get(devinfo, 24); - if (w != NULL && w->enable != 0 && w->type == - HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && - (w->wclass.pin.config & - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) == - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK) - w->wclass.pin.cap &= ~( - HDA_PARAM_PIN_CAP_VREF_CTRL_100_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_80_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_50_MASK); - w = hdac_widget_get(devinfo, 25); - if (w != NULL && w->enable != 0 && w->type == - HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && - (w->wclass.pin.config & - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) == - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK) - w->wclass.pin.cap &= ~( - HDA_PARAM_PIN_CAP_VREF_CTRL_100_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_80_MASK | - HDA_PARAM_PIN_CAP_VREF_CTRL_50_MASK); - /* - * nid: 26 = Line-in, leave it alone. - */ - break; -#endif case HDA_CODEC_AD1983: /* * This codec has several possible usages, but none @@ -4900,10 +4869,19 @@ hdac_vendor_patch_parse(struct hdac_devi w = hdac_widget_get(devinfo, 31); if (w != NULL) w->enable = 0; - /* Disable playback mixer, use direct bypass. */ - w = hdac_widget_get(devinfo, 14); + /* Disable direct playback, use mixer. */ + w = hdac_widget_get(devinfo, 5); if (w != NULL) - w->enable = 0; + w->connsenable[0] = 0; + w = hdac_widget_get(devinfo, 6); + if (w != NULL) + w->connsenable[0] = 0; + w = hdac_widget_get(devinfo, 9); + if (w != NULL) + w->connsenable[0] = 0; + w = hdac_widget_get(devinfo, 24); + if (w != NULL) + w->connsenable[0] = 0; break; } } @@ -5279,6 +5257,8 @@ hdac_audio_trace_to_out(struct hdac_devi " %*snid %d found output association %d\n", depth + 1, "", w->nid, w->bindas); ); + if (w->bindas >= 0) + w->pflags |= HDA_ADC_MONITOR; return (1); } else { HDA_BOOTHVERBOSE( @@ -5321,7 +5301,7 @@ hdac_audio_trace_to_out(struct hdac_devi } break; } - if (res) + if (res && w->bindas == -1) w->bindas = -2; HDA_BOOTHVERBOSE( @@ -5368,11 +5348,39 @@ hdac_audio_trace_as_extra(struct hdac_de " nid %d is input monitor\n", w->nid); ); - w->pflags |= HDA_ADC_MONITOR; w->ossdev = SOUND_MIXER_IMIX; } } + /* Other inputs monitor */ + /* Find input pins supplying signal for output associations. + Hope it will be input monitoring. */ + HDA_BOOTVERBOSE( + device_printf(devinfo->codec->sc->dev, + "Tracing other input monitors\n"); + ); + for (j = devinfo->startnode; j < devinfo->endnode; j++) { + w = hdac_widget_get(devinfo, j); + if (w == NULL || w->enable == 0) + continue; + if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) + continue; + if (w->bindas < 0 || as[w->bindas].dir != HDA_CTL_IN) + continue; + HDA_BOOTVERBOSE( + device_printf(devinfo->codec->sc->dev, + " Tracing nid %d to out\n", + j); + ); + if (hdac_audio_trace_to_out(devinfo, w->nid, 0)) { + HDA_BOOTVERBOSE( + device_printf(devinfo->codec->sc->dev, + " nid %d is input monitor\n", + w->nid); + ); + } + } + /* Beeper */ HDA_BOOTVERBOSE( device_printf(devinfo->codec->sc->dev, @@ -5748,6 +5756,7 @@ hdac_audio_disable_notselected(struct hd static void hdac_audio_disable_crossas(struct hdac_devinfo *devinfo) { + struct hdac_audio_as *ases = devinfo->function.audio.as; struct hdac_widget *w, *cw; struct hdac_audio_ctl *ctl; int i, j; @@ -5770,7 +5779,10 @@ hdac_audio_disable_crossas(struct hdac_d cw = hdac_widget_get(devinfo, w->conns[j]); if (cw == NULL || w->enable == 0) continue; - if (cw->bindas == -2) + if (cw->bindas == -2 || + ((w->pflags & HDA_ADC_MONITOR) && + cw->bindas >= 0 && + ases[cw->bindas].dir == HDA_CTL_IN)) continue; if (w->bindas == cw->bindas && (w->bindseqmask & cw->bindseqmask) != 0) @@ -5789,8 +5801,12 @@ hdac_audio_disable_crossas(struct hdac_d while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) { if (ctl->enable == 0 || ctl->childwidget == NULL) continue; - if (ctl->widget->bindas == -2 || - ctl->childwidget->bindas == -2) + if (ctl->widget->bindas == -2) + continue; + if (ctl->childwidget->bindas == -2 || + ((ctl->widget->pflags & HDA_ADC_MONITOR) && + ctl->childwidget->bindas >= 0 && + ases[ctl->childwidget->bindas].dir == HDA_CTL_IN)) continue; if (ctl->widget->bindas != ctl->childwidget->bindas || (ctl->widget->bindseqmask & ctl->childwidget->bindseqmask) == 0) { @@ -5909,7 +5925,7 @@ hdac_audio_ctl_source_amp(struct hdac_de * Find controls to control amplification for destination. */ static void -hdac_audio_ctl_dest_amp(struct hdac_devinfo *devinfo, nid_t nid, +hdac_audio_ctl_dest_amp(struct hdac_devinfo *devinfo, nid_t nid, int index, int ossdev, int depth, int need) { struct hdac_audio_as *as = devinfo->function.audio.as; @@ -5968,6 +5984,8 @@ hdac_audio_ctl_dest_amp(struct hdac_devi int tneed = need; if (w->connsenable[i] == 0) continue; + if (index >= 0 && i != index) + continue; ctl = hdac_audio_ctl_amp_get(devinfo, w->nid, HDA_CTL_IN, i, 1); if (ctl) { @@ -5977,7 +5995,7 @@ hdac_audio_ctl_dest_amp(struct hdac_devi ctl->possmask |= (1 << ossdev); tneed &= ~HDA_CTL_GIVE(ctl); } - hdac_audio_ctl_dest_amp(devinfo, w->conns[i], ossdev, + hdac_audio_ctl_dest_amp(devinfo, w->conns[i], -1, ossdev, depth + 1, tneed); } } @@ -6184,8 +6202,8 @@ hdac_audio_assign_mixers(struct hdac_dev { struct hdac_audio_as *as = devinfo->function.audio.as; struct hdac_audio_ctl *ctl; - struct hdac_widget *w; - int i; + struct hdac_widget *w, *cw; + int i, j; /* Assign mixers to the tree. */ for (i = devinfo->startnode; i < devinfo->endnode; i++) { @@ -6200,24 +6218,30 @@ hdac_audio_assign_mixers(struct hdac_dev continue; hdac_audio_ctl_source_amp(devinfo, w->nid, -1, w->ossdev, 1, 0, 1); - } else if ((w->pflags & HDA_ADC_MONITOR) != 0) { - if (w->ossdev < 0) - continue; - if (hdac_audio_ctl_source_amp(devinfo, w->nid, -1, - w->ossdev, 1, 0, 1)) { - /* If we are unable to control input monitor - as source - try to control it as destination. */ - hdac_audio_ctl_dest_amp(devinfo, w->nid, - w->ossdev, 0, 1); - } } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) { - hdac_audio_ctl_dest_amp(devinfo, w->nid, + hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, SOUND_MIXER_RECLEV, 0, 1); } else if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && as[w->bindas].dir == HDA_CTL_OUT) { - hdac_audio_ctl_dest_amp(devinfo, w->nid, + hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, SOUND_MIXER_VOLUME, 0, 1); } + if (w->pflags & HDA_ADC_MONITOR) { + for (j = 0; j < w->nconns; j++) { + if (!w->connsenable[j]) + continue; + cw = hdac_widget_get(devinfo, w->conns[j]); + if (cw == NULL || cw->enable == 0) + continue; + if (cw->bindas == -1) + continue; + if (cw->bindas >= 0 && + as[cw->bindas].dir != HDA_CTL_IN) + continue; + hdac_audio_ctl_dest_amp(devinfo, + w->nid, j, SOUND_MIXER_IMIX, 0, 1); + } + } } /* Treat unrequired as possible. */ i = 0; @@ -7160,7 +7184,7 @@ hdac_dump_mix(struct hdac_pcm_devinfo *p w = hdac_widget_get(devinfo, i); if (w == NULL || w->enable == 0) continue; - if ((w->pflags & HDA_ADC_MONITOR) == 0) + if (w->ossdev != SOUND_MIXER_IMIX) continue; if (printed == 0) { printed = 1; @@ -8126,7 +8150,7 @@ hdac_pcm_attach(device_t dev) hdac_dump_ctls(pdevinfo, "Line-in Volume", SOUND_MASK_LINE); hdac_dump_ctls(pdevinfo, "Speaker/Beep Volume", SOUND_MASK_SPEAKER); hdac_dump_ctls(pdevinfo, "Recording Level", SOUND_MASK_RECLEV); - hdac_dump_ctls(pdevinfo, "Input Mix Level", SOUND_MASK_IMIX); + hdac_dump_ctls(pdevinfo, "Input Monitoring Level", SOUND_MASK_IMIX); hdac_dump_ctls(pdevinfo, NULL, 0); device_printf(dev, "\n"); ); From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 09:54:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE88E106568D; Fri, 22 Jan 2010 09:54:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 936C78FC13; Fri, 22 Jan 2010 09:54:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9seId029126; Fri, 22 Jan 2010 09:54:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9se66029124; Fri, 22 Jan 2010 09:54:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001220954.o0M9se66029124@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 09:54:40 +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: r202796 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 09:54:40 -0000 Author: mav Date: Fri Jan 22 09:54:40 2010 New Revision: 202796 URL: http://svn.freebsd.org/changeset/base/202796 Log: Oops! r202789 broke recording from input mixer. Restore previous "mix" usage and use "igain" instead for input-to-output monitoring loopback. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 09:50:17 2010 (r202795) +++ head/sys/dev/sound/pci/hda/hdac.c Fri Jan 22 09:54:40 2010 (r202796) @@ -6226,6 +6226,15 @@ hdac_audio_assign_mixers(struct hdac_dev hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, SOUND_MIXER_VOLUME, 0, 1); } + if (w->ossdev == SOUND_MIXER_IMIX) { + if (hdac_audio_ctl_source_amp(devinfo, w->nid, -1, + w->ossdev, 1, 0, 1)) { + /* If we are unable to control input monitor + as source - try to control it as destination. */ + hdac_audio_ctl_dest_amp(devinfo, w->nid, -1, + w->ossdev, 0, 1); + } + } if (w->pflags & HDA_ADC_MONITOR) { for (j = 0; j < w->nconns; j++) { if (!w->connsenable[j]) @@ -6239,7 +6248,7 @@ hdac_audio_assign_mixers(struct hdac_dev as[cw->bindas].dir != HDA_CTL_IN) continue; hdac_audio_ctl_dest_amp(devinfo, - w->nid, j, SOUND_MIXER_IMIX, 0, 1); + w->nid, j, SOUND_MIXER_IGAIN, 0, 1); } } } @@ -6739,8 +6748,8 @@ hdac_dump_ctls(struct hdac_pcm_devinfo * if (flag == 0) { flag = ~(SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_CD | SOUND_MASK_LINE | SOUND_MASK_RECLEV | - SOUND_MASK_MIC | SOUND_MASK_SPEAKER | SOUND_MASK_OGAIN | - SOUND_MASK_IMIX | SOUND_MASK_MONITOR); + SOUND_MASK_MIC | SOUND_MASK_SPEAKER | SOUND_MASK_IGAIN | + SOUND_MASK_OGAIN | SOUND_MASK_IMIX | SOUND_MASK_MONITOR); } for (j = 0; j < SOUND_MIXER_NRDEVICES; j++) { @@ -8150,7 +8159,8 @@ hdac_pcm_attach(device_t dev) hdac_dump_ctls(pdevinfo, "Line-in Volume", SOUND_MASK_LINE); hdac_dump_ctls(pdevinfo, "Speaker/Beep Volume", SOUND_MASK_SPEAKER); hdac_dump_ctls(pdevinfo, "Recording Level", SOUND_MASK_RECLEV); - hdac_dump_ctls(pdevinfo, "Input Monitoring Level", SOUND_MASK_IMIX); + hdac_dump_ctls(pdevinfo, "Input Mix Level", SOUND_MASK_IMIX); + hdac_dump_ctls(pdevinfo, "Input Monitoring Level", SOUND_MASK_IGAIN); hdac_dump_ctls(pdevinfo, NULL, 0); device_printf(dev, "\n"); ); From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 09:55:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76C2A1065692; Fri, 22 Jan 2010 09:55:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 658F18FC1E; Fri, 22 Jan 2010 09:55:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0M9tD1d029308; Fri, 22 Jan 2010 09:55:13 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0M9tD2g029306; Fri, 22 Jan 2010 09:55:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001220955.o0M9tD2g029306@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 09:55:13 +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: r202797 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 09:55:13 -0000 Author: imp Date: Fri Jan 22 09:55:13 2010 New Revision: 202797 URL: http://svn.freebsd.org/changeset/base/202797 Log: Add a suggested improvement. Modified: head/sys/mips/mips/tick.c Modified: head/sys/mips/mips/tick.c ============================================================================== --- head/sys/mips/mips/tick.c Fri Jan 22 09:54:40 2010 (r202796) +++ head/sys/mips/mips/tick.c Fri Jan 22 09:55:13 2010 (r202797) @@ -144,6 +144,7 @@ mips_timer_init_params(uint64_t platform /* * XXX: Some MIPS32 cores update the Count register only every two * pipeline cycles. + * We know this because of status registers in CP0, make it automatic. */ if (double_count != 0) counter_freq /= 2; From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 11:04:25 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE45C1065676; Fri, 22 Jan 2010 11:04:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA9F8FC13; Fri, 22 Jan 2010 11:04:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MB4P2A049142; Fri, 22 Jan 2010 11:04:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MB4PSL049140; Fri, 22 Jan 2010 11:04:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001221104.o0MB4PSL049140@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 11:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202798 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 11:04:25 -0000 Author: mav Date: Fri Jan 22 11:04:25 2010 New Revision: 202798 URL: http://svn.freebsd.org/changeset/base/202798 Log: Add "MIXER CONTROLS" chapter. Modified: head/share/man/man4/snd_hda.4 Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Fri Jan 22 09:55:13 2010 (r202797) +++ head/share/man/man4/snd_hda.4 Fri Jan 22 11:04:25 2010 (r202798) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2010 +.Dd January 22, 2010 .Dt SND_HDA 4 .Os .Sh NAME @@ -459,6 +459,42 @@ mic and line-in) and headset (headphones .Li pcm1 for internal speaker playback. On headphones connection rear connectors will be muted. +.Sh MIXER CONTROLS +Depending on codec configuration, these controls and signal sources could be +reported to +.Xr sound 4 : +.Pp +.Bl -tag -width ".Va speaker" -offset indent +.It Va vol +overall output level (volume) +.It Va rec +overall recording level +.It Va igain +input-to-output monitoring loopback level +.It Va ogain +external amplifier control +.It Va pcm +PCM playback +.It Va mix +input mix +.It Va mic +first external or second internal microphone input +.It Va monitor +first internal or second external microphone input +.It Va line , Va line1 , Va line2, Va line3 +analog (line) inputs +.It Va dig1 , Va dig2 , Va dig3 +digital (S/PDIF, HDMI or DisplayPort) inputs +.It Va cd +CD input +.It Va speaker +PC speaker input +.It Va phin , Va phout , Va radio . Va video +other random inputs +.El +.Pp +Controls have different precision. Some could be just an on/off triggers. +Most of controls use logarithmic scale. .Sh HARDWARE The .Nm From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 11:44:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 825691065698; Fri, 22 Jan 2010 11:44:56 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0874B8FC1F; Fri, 22 Jan 2010 11:44:55 +0000 (UTC) Received: from outgoing.leidinger.net (pD954F1B8.dip.t-dialin.net [217.84.241.184]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 449A48443D3; Fri, 22 Jan 2010 12:44:41 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id C9FE23BD48; Thu, 21 Jan 2010 08:58:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1264060733; bh=vWei0EJRQrJ1P94CpbrKX2XFXWOJC5Tb/loKlcZm2U8=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=YBWb+QavFagu+/VZ3GVITBb3juBF6YLLs3lG9vfdZR2M/OOscrFG+AaVRz3qxE3/Q a2Q/44PnYBO42GkxRcPiF2WmQy4nHY5UsZbtpNuDQPPMcAaf3VVsgWEy2XOc1LSDt3 yfZdGpis4IpNqn8Hl8MHe6K5D2WeTOXJNXoud4EqIxzqQADBmotzo9VRHCN4uCH4Nu TO/XDSkmVH0qPd7kxg0uE8C8OUSdkVqmPFJ0ibCWoS/Vj+rDuehDQLgaiQ0zAgDpYC svbS6vK2ByAqRC+WmhlVNnfc04wk/3KLEIjixC12WlVXWVi/rmjf9jPX9Mrx7HwIhC 0U0y5FVEgn0VQ== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o0L7wpfS021961; Thu, 21 Jan 2010 08:58:52 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Thu, 21 Jan 2010 08:58:51 +0100 Message-ID: <20100121085851.67964fn6pkgeauww@webmail.leidinger.net> Date: Thu, 21 Jan 2010 08:58:51 +0100 From: Alexander Leidinger To: "Wojciech A. Koszek" References: <201001182246.o0IMk6dw000346@svn.freebsd.org> <20100119091500.17856jhlpl7mjsow@webmail.leidinger.net> <20100121015554.GI1990@FreeBSD.org> In-Reply-To: <20100121015554.GI1990@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 449A48443D3.8C0CC X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1264765484.14179@71d+qx1gmgCNXkDuRoNZ9w X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, emulation@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202598 - head/sys/compat/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 11:44:56 -0000 Quoting "Wojciech A. Koszek" (from Thu, 21 Jan 2010 02:55:55 +0100): > On Tue, Jan 19, 2010 at 09:15:00AM +0100, Alexander Leidinger wrote: >> Quoting "Wojciech A. Koszek" (from Mon, 18 Jan 2010 >> 22:46:06 +0000 (UTC)): >> >>> Author: wkoszek >>> Date: Mon Jan 18 22:46:06 2010 >>> New Revision: 202598 >>> URL: http://svn.freebsd.org/changeset/base/202598 >>> >>> Log: >>> Let us to use our libusb(3) in Linuxolator. >>> >>> With this change, Linux binaries can work with our libusb(3) when >>> it's compiled against our header files on GNU/Linux system -- this >>> solves the problem with differences between /dev layouts. >>> >>> With ported libusb(3), I am able to use my USB JTAG cable with Linux >>> binaries that support it. >> >> The commit log is IMHO omitting the info if you checked (or not) that there >> is no linux ioctl in this range. It would also be nice if the comment in >> linux_ioctl.h tells to check that there is no clash with a linux ioctl when >> the min/max is changed. > > Sorry for delay. > > I have tested it against ioctl() calls submitted by ported libusb(3). > Apparently, all ioctl() requests in my execution path didn't hit our > emulator, > thus I was getting warnings about unsupported ioctl(). Thus, I > reserved a range > for them. However, it looks like conflict exists with Linux *SND* stuff. > > I believe the easiest solution would be based on picking "untypable" > values for > commands: > > #define BSDEMUL_USB_REQUEST _IOWR(3, 1, struct usb_ctl_request) > > > And putting them into linux_ioctl.h just like any other ioctl(). > Simple mapping > would be provided for those calls to our native USB stack. grep(1) > says 3 or 4 > passed as a ioctl() should be fine, since none of those seem to be used in > Linux. I could bring the same macros to ported libusb(3) easily, so > that we'd > be using something that Linuxolator can finally understand in a unique way. > > Does is sound like an acceptable solution? Unfortunately I do not follow you completely... My concern is that someone maybe want to implement an ioctl which falls in the same range. As long as the ioctl is not in a range of ioctls of a normal linux kernel, it is fine for me. If in doubt, add a kernel option to either enable or disable (I'm not sure what makes more sense) the FreeBSD-usb-forward-part. Bye, Alexander. -- Once a word has been allowed to escape, it cannot be recalled. -- Quintus Horatius Flaccus (Horace) http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 11:52:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C23251065679; Fri, 22 Jan 2010 11:52:12 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B13508FC23; Fri, 22 Jan 2010 11:52:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MBqCOF060340; Fri, 22 Jan 2010 11:52:12 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MBqCDg060338; Fri, 22 Jan 2010 11:52:12 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001221152.o0MBqCDg060338@svn.freebsd.org> From: Rui Paulo Date: Fri, 22 Jan 2010 11:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202806 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 11:52:12 -0000 Author: rpaulo Date: Fri Jan 22 11:52:12 2010 New Revision: 202806 URL: http://svn.freebsd.org/changeset/base/202806 Log: Remove duplicate bootverbose increment. Modified: head/sys/mips/mips/machdep.c Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Fri Jan 22 11:42:44 2010 (r202805) +++ head/sys/mips/mips/machdep.c Fri Jan 22 11:52:12 2010 (r202806) @@ -161,7 +161,6 @@ cpu_startup(void *dummy) if (boothowto & RB_VERBOSE) bootverbose++; - bootverbose++; printf("real memory = %lu (%luK bytes)\n", ptoa(realmem), ptoa(realmem) / 1024); From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 14:05:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E1C7106566B; Fri, 22 Jan 2010 14:05:49 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 045B48FC08; Fri, 22 Jan 2010 14:05:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ME5mXX090360; Fri, 22 Jan 2010 14:05:48 GMT (envelope-from sepotvin@svn.freebsd.org) Received: (from sepotvin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ME5mjP090357; Fri, 22 Jan 2010 14:05:48 GMT (envelope-from sepotvin@svn.freebsd.org) Message-Id: <201001221405.o0ME5mjP090357@svn.freebsd.org> From: "Stephane E. Potvin" Date: Fri, 22 Jan 2010 14:05:48 +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: r202807 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 14:05:49 -0000 Author: sepotvin Date: Fri Jan 22 14:05:48 2010 New Revision: 202807 URL: http://svn.freebsd.org/changeset/base/202807 Log: Introduce two new flags PO_CFLAGS and PO_CXXFLAGS to make it possible to have different flags when building profiled objects. MFC after: 1 month Modified: head/share/mk/bsd.lib.mk head/share/mk/sys.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Jan 22 11:52:12 2010 (r202806) +++ head/share/mk/bsd.lib.mk Fri Jan 22 14:05:48 2010 (r202807) @@ -67,7 +67,7 @@ PO_FLAG=-pg .endif .c.po: - ${CC} ${PO_FLAG} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CC} ${PO_FLAG} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif @@ -79,7 +79,7 @@ PO_FLAG=-pg .endif .cc.po .C.po .cpp.po .cxx.po: - ${CXX} ${PO_FLAG} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CXX} ${PO_FLAG} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} .cc.So .C.So .cpp.So .cxx.So: ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -115,7 +115,7 @@ PO_FLAG=-pg .endif .asm.po: - ${CC} -x assembler-with-cpp -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif @@ -128,7 +128,7 @@ PO_FLAG=-pg .endif .S.po: - ${CC} -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CC} -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Fri Jan 22 11:52:12 2010 (r202806) +++ head/share/mk/sys.mk Fri Jan 22 14:05:48 2010 (r202807) @@ -44,6 +44,7 @@ CFLAGS ?= -O2 -pipe CFLAGS += -fno-strict-aliasing .endif .endif +PO_CFLAGS ?= ${CFLAGS} # Turn CTF conversion off by default for now. This default could be # changed later if DTrace becomes popular. @@ -66,6 +67,7 @@ CFLAGS += -g CXX ?= c++ CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign} +PO_CXXFLAGS ?= ${CXXFLAGS} CPP ?= cpp From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 14:09:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66DF3106568B; Fri, 22 Jan 2010 14:09:15 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 569388FC27; Fri, 22 Jan 2010 14:09:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ME9F4P091173; Fri, 22 Jan 2010 14:09:15 GMT (envelope-from sepotvin@svn.freebsd.org) Received: (from sepotvin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ME9Fnh091170; Fri, 22 Jan 2010 14:09:15 GMT (envelope-from sepotvin@svn.freebsd.org) Message-Id: <201001221409.o0ME9Fnh091170@svn.freebsd.org> From: "Stephane E. Potvin" Date: Fri, 22 Jan 2010 14:09: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: r202808 - in head/gnu/lib: libstdc++ libsupc++ X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 14:09:15 -0000 Author: sepotvin Date: Fri Jan 22 14:09:15 2010 New Revision: 202808 URL: http://svn.freebsd.org/changeset/base/202808 Log: Use the new PO_CXXFLAGS from r202807 to remove the '-ffunction-sections' flag when compiling profiled objects as it's ignored by the compiler. This removes the associated warning for each file compiled. MFC after: 1 month Modified: head/gnu/lib/libstdc++/Makefile head/gnu/lib/libsupc++/Makefile Modified: head/gnu/lib/libstdc++/Makefile ============================================================================== --- head/gnu/lib/libstdc++/Makefile Fri Jan 22 14:05:48 2010 (r202807) +++ head/gnu/lib/libstdc++/Makefile Fri Jan 22 14:09:15 2010 (r202808) @@ -21,6 +21,7 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \ -Wno-deprecated +PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} DPADD= ${LIBM} LDADD= -lm Modified: head/gnu/lib/libsupc++/Makefile ============================================================================== --- head/gnu/lib/libsupc++/Makefile Fri Jan 22 14:05:48 2010 (r202807) +++ head/gnu/lib/libsupc++/Makefile Fri Jan 22 14:09:15 2010 (r202808) @@ -23,6 +23,7 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -I${.CURDIR}/../libstdc++ -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections +PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} HDRS= exception new typeinfo cxxabi.h exception_defines.h INCS= ${HDRS:S;^;${SRCDIR}/;} From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 14:25:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 355061065676; Fri, 22 Jan 2010 14:25:18 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 255D08FC15; Fri, 22 Jan 2010 14:25:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MEPIZc094893; Fri, 22 Jan 2010 14:25:18 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MEPIC9094891; Fri, 22 Jan 2010 14:25:18 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001221425.o0MEPIC9094891@svn.freebsd.org> From: Randall Stewart Date: Fri, 22 Jan 2010 14:25:18 +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: r202809 - head/sys/mips/rmi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 14:25:18 -0000 Author: rrs Date: Fri Jan 22 14:25:17 2010 New Revision: 202809 URL: http://svn.freebsd.org/changeset/base/202809 Log: This hopefully will fix the network problem I was seeing. Basically the msg ring interrupt was being re-enabled inside a spinlock as the thread set it self up for rescheduling. This won't work since inside the re-enable is another spin lock.. which means on return from the reenable the interrupts have been reenabled. Thus you would get a clock int and end up panicing holding a spin lock to long :-o Modified: head/sys/mips/rmi/xlr_machdep.c Modified: head/sys/mips/rmi/xlr_machdep.c ============================================================================== --- head/sys/mips/rmi/xlr_machdep.c Fri Jan 22 14:09:15 2010 (r202808) +++ head/sys/mips/rmi/xlr_machdep.c Fri Jan 22 14:25:17 2010 (r202809) @@ -618,18 +618,14 @@ msgring_process_fast_intr(void *arg) */ disable_msgring_int(NULL); it->i_pending = 1; + thread_lock(td); if (TD_AWAITING_INTR(td)) { - thread_lock(td); CTR3(KTR_INTR, "%s: schedule pid %d (%s)", __func__, p->p_pid, p->p_comm); TD_CLR_IWAIT(td); sched_add(td, SRQ_INTR); - thread_unlock(td); - } else { - CTR4(KTR_INTR, "%s: pid %d (%s): state %d", - __func__, p->p_pid, p->p_comm, td->td_state); } - + thread_unlock(td); } #define MIT_DEAD 4 @@ -668,13 +664,17 @@ msgring_process(void *arg) atomic_store_rel_int(&ithd->i_pending, 0); xlr_msgring_handler(NULL); } + enable_msgring_int(NULL); if (!ithd->i_pending && !(ithd->i_flags & MIT_DEAD)) { thread_lock(td); + if (ithd->i_pending) { + thread_unlock(td); + continue; + } sched_class(td, PRI_ITHD); TD_SET_IWAIT(td); - thread_unlock(td); - enable_msgring_int(NULL); mi_switch(SW_VOL, NULL); + thread_unlock(td); } } From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 16:05:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 053C7106566C; Fri, 22 Jan 2010 16:05:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E903D8FC1D; Fri, 22 Jan 2010 16:05:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MG5ACs017562; Fri, 22 Jan 2010 16:05:10 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MG5A1l017559; Fri, 22 Jan 2010 16:05:10 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201001221605.o0MG5A1l017559@svn.freebsd.org> From: Ed Maste Date: Fri, 22 Jan 2010 16:05:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202812 - head/sys/dev/ichwd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 16:05:11 -0000 Author: emaste Date: Fri Jan 22 16:05:10 2010 New Revision: 202812 URL: http://svn.freebsd.org/changeset/base/202812 Log: Add H55 ID from Mike Tancsa, with minor rewording from avg@. PR: kern/143068 Submitted by: Mike Tancsa (Sentex) MFC after: 1 week Modified: head/sys/dev/ichwd/ichwd.c head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Fri Jan 22 15:12:01 2010 (r202811) +++ head/sys/dev/ichwd/ichwd.c Fri Jan 22 16:05:10 2010 (r202812) @@ -109,6 +109,7 @@ static struct ichwd_device ichwd_devices { DEVICEID_ICH10D, "Intel ICH10D watchdog timer", 10 }, { DEVICEID_ICH10DO, "Intel ICH10DO watchdog timer", 10 }, { DEVICEID_ICH10R, "Intel ICH10R watchdog timer", 10 }, + { DEVICEID_H55, "Intel H55 watchdog timer", 10 }, { 0, NULL, 0 }, }; Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Fri Jan 22 15:12:01 2010 (r202811) +++ head/sys/dev/ichwd/ichwd.h Fri Jan 22 16:05:10 2010 (r202812) @@ -99,6 +99,7 @@ struct ichwd_softc { #define DEVICEID_ICH10D 0x3a1a #define DEVICEID_ICH10DO 0x3a14 #define DEVICEID_ICH10R 0x3a16 +#define DEVICEID_H55 0x3b06 /* ICH LPC Interface Bridge Registers (ICH5 and older) */ #define ICH_GEN_STA 0xd4 From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 17:17:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98B5E1065676; Fri, 22 Jan 2010 17:17:47 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8790E8FC14; Fri, 22 Jan 2010 17:17:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MHHl9j034291; Fri, 22 Jan 2010 17:17:47 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MHHlIG034289; Fri, 22 Jan 2010 17:17:47 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201001221717.o0MHHlIG034289@svn.freebsd.org> From: Doug Barton Date: Fri, 22 Jan 2010 17:17: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: r202817 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 17:17:47 -0000 Author: dougb Date: Fri Jan 22 17:17:47 2010 New Revision: 202817 URL: http://svn.freebsd.org/changeset/base/202817 Log: Make -U once again honor -D after my change to consolidate setting of MTREEDB with DESTDIR. PR: bin/143089 Submitted by: Anton Yuzhaninov Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 22 17:08:05 2010 (r202816) +++ head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 22 17:17:47 2010 (r202817) @@ -261,11 +261,6 @@ if [ -r "$HOME/.mergemasterrc" ]; then . "$HOME/.mergemasterrc" fi -# Assign the location of the mtree database -# -MTREEDB=${MTREEDB:-${DESTDIR}/var/db} -MTREEFILE="${MTREEDB}/mergemaster.mtree" - # Check the command line options # while getopts ":ascrvhipCPm:t:du:w:D:A:FU" COMMAND_LINE_ARGUMENT ; do @@ -342,6 +337,11 @@ while getopts ":ascrvhipCPm:t:du:w:D:A:F esac done +# Assign the location of the mtree database +# +MTREEDB=${MTREEDB:-${DESTDIR}/var/db} +MTREEFILE="${MTREEDB}/mergemaster.mtree" + # Don't force the user to set this in the mergemaster rc file if [ -n "${PRESERVE_FILES}" -a -z "${PRESERVE_FILES_DIR}" ]; then PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 18:35:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7AD410656AB; Fri, 22 Jan 2010 18:35:50 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A60348FC25; Fri, 22 Jan 2010 18:35:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MIZooj051636; Fri, 22 Jan 2010 18:35:50 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MIZoiZ051634; Fri, 22 Jan 2010 18:35:50 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001221835.o0MIZoiZ051634@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 22 Jan 2010 18:35:50 +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: r202821 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 18:35:50 -0000 Author: yongari Date: Fri Jan 22 18:35:50 2010 New Revision: 202821 URL: http://svn.freebsd.org/changeset/base/202821 Log: Fix a long standing ASF heartbeat sending bug. The initial implementation of heartbeat interval was 2 but there was typo which caused the heartbeat is sent approximately every 5 seconds. This caused unintended controller reset by firmware because firmware thought OS was crashed. Submitted by: Floris Bos < info <> je-eigen-domein dot nl > Tested by: Andrzej Tobola < ato <> iem dot pw dot edu dot pl > Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Jan 22 17:33:04 2010 (r202820) +++ head/sys/dev/bge/if_bge.c Fri Jan 22 18:35:50 2010 (r202821) @@ -3677,7 +3677,7 @@ bge_asf_driver_up(struct bge_softc *sc) if (sc->bge_asf_count) sc->bge_asf_count --; else { - sc->bge_asf_count = 5; + sc->bge_asf_count = 2; bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM_FW, BGE_FW_DRV_ALIVE); bge_writemem_ind(sc, BGE_SOFTWARE_GENNCOMM_FW_LEN, 4); From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 18:46:37 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1DC4106566C; Fri, 22 Jan 2010 18:46:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C06698FC14; Fri, 22 Jan 2010 18:46:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MIkblI054035; Fri, 22 Jan 2010 18:46:37 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MIkb43054033; Fri, 22 Jan 2010 18:46:37 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001221846.o0MIkb43054033@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 22 Jan 2010 18:46: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: r202822 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 18:46:37 -0000 Author: yongari Date: Fri Jan 22 18:46:37 2010 New Revision: 202822 URL: http://svn.freebsd.org/changeset/base/202822 Log: Use new handshake command for BCM5750 or new controllers. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Jan 22 18:35:50 2010 (r202821) +++ head/sys/dev/bge/if_bge.c Fri Jan 22 18:46:37 2010 (r202822) @@ -2744,9 +2744,8 @@ bge_attach(device_t dev) & BGE_HWCFG_ASF) { sc->bge_asf_mode |= ASF_ENABLE; sc->bge_asf_mode |= ASF_STACKUP; - if (sc->bge_asicrev == BGE_ASICREV_BCM5750) { + if (BGE_IS_575X_PLUS(sc)) sc->bge_asf_mode |= ASF_NEW_HANDSHAKE; - } } } From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 20:10:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CE921065670; Fri, 22 Jan 2010 20:10:13 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41F888FC12; Fri, 22 Jan 2010 20:10:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKADEx072734; Fri, 22 Jan 2010 20:10:13 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKADNd072732; Fri, 22 Jan 2010 20:10:13 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001222010.o0MKADNd072732@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 22 Jan 2010 20:10:13 +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: r202826 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 20:10:13 -0000 Author: yongari Date: Fri Jan 22 20:10:12 2010 New Revision: 202826 URL: http://svn.freebsd.org/changeset/base/202826 Log: s/Mhz/MHz/g Submitted by: N.J. Mann njm dot me dot uk > Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Fri Jan 22 20:06:57 2010 (r202825) +++ head/sys/dev/msk/if_msk.c Fri Jan 22 20:10:12 2010 (r202826) @@ -1697,15 +1697,15 @@ mskc_attach(device_t dev) switch (sc->msk_hw_id) { case CHIP_ID_YUKON_EC: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; case CHIP_ID_YUKON_EC_U: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_JUMBO_NOCSUM; break; case CHIP_ID_YUKON_EX: - sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2 | MSK_FLAG_AUTOTX_CSUM; /* @@ -1723,11 +1723,11 @@ mskc_attach(device_t dev) sc->msk_pflags |= MSK_FLAG_JUMBO_NOCSUM; break; case CHIP_ID_YUKON_FE: - sc->msk_clock = 100; /* 100 Mhz */ + sc->msk_clock = 100; /* 100 MHz */ sc->msk_pflags |= MSK_FLAG_FASTETHER; break; case CHIP_ID_YUKON_FE_P: - sc->msk_clock = 50; /* 50 Mhz */ + sc->msk_clock = 50; /* 50 MHz */ sc->msk_pflags |= MSK_FLAG_FASTETHER | MSK_FLAG_DESCV2 | MSK_FLAG_AUTOTX_CSUM; if (sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) { @@ -1746,15 +1746,15 @@ mskc_attach(device_t dev) } break; case CHIP_ID_YUKON_XL: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 156; /* 156 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; case CHIP_ID_YUKON_UL_2: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 156; /* 156 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; default: - sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_clock = 156; /* 156 MHz */ break; } From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 20:15:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58BC01065698; Fri, 22 Jan 2010 20:15:49 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 476B38FC1C; Fri, 22 Jan 2010 20:15:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKFnIL074029; Fri, 22 Jan 2010 20:15:49 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKFn2X074027; Fri, 22 Jan 2010 20:15:49 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201001222015.o0MKFn2X074027@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 22 Jan 2010 20:15:49 +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: r202827 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 20:15:49 -0000 Author: yongari Date: Fri Jan 22 20:15:49 2010 New Revision: 202827 URL: http://svn.freebsd.org/changeset/base/202827 Log: Yukon Ultra2 has 126MHz clock. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Fri Jan 22 20:10:12 2010 (r202826) +++ head/sys/dev/msk/if_msk.c Fri Jan 22 20:15:49 2010 (r202827) @@ -1750,7 +1750,7 @@ mskc_attach(device_t dev) sc->msk_pflags |= MSK_FLAG_JUMBO; break; case CHIP_ID_YUKON_UL_2: - sc->msk_clock = 156; /* 156 MHz */ + sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; default: From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 20:27:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 734EB106566C; Fri, 22 Jan 2010 20:27:38 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id D364B8FC08; Fri, 22 Jan 2010 20:27:37 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so377903qwd.7 for ; Fri, 22 Jan 2010 12:27:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=YvJug5LDwwhEOdop41bkryQgXLkBJyQfVrk+S4ezRcA=; b=hdjWGztxAb+9m8HrJlwCnWufE0RC0yPXhDvadEkPeSCeRx2LFDMCjmz5usr1IwGhbF /XRWg3h+NKneKWW8PwPgpGKkozaCxvL5SS0TWAsLlJhG1JAAAZjdIWCY1ABAmr1Emhgn P9Qx6DOuBoURnfLzTBgUAFUmZfRS9mWj1CAPY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=BT1Q1qi6pZiZsPpdv19iIALvl4Ekwgs2RZclDC7VzIwccOkJ7PTwkropj4+8yk/P6o pUdZBkXBrxB4ooyrcaf/7bFrwecADSZ2J7kEqvEouRxB1mabZozd3Q7pNRGRnFNDMrIP OzMRR4jwOriXQGtWLvwuDfbo6oHa9rhm3Merk= Received: by 10.224.79.231 with SMTP id q39mr2290428qak.163.1264192057049; Fri, 22 Jan 2010 12:27:37 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 6sm5727844qwk.51.2010.01.22.12.27.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 22 Jan 2010 12:27:36 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Fri, 22 Jan 2010 12:27:34 -0800 From: Pyun YongHyeon Date: Fri, 22 Jan 2010 12:27:34 -0800 To: Pyun YongHyeon Message-ID: <20100122202734.GD20753@michelle.cdnetworks.com> References: <201001222015.o0MKFn2X074027@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001222015.o0MKFn2X074027@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202827 - head/sys/dev/msk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 20:27:38 -0000 On Fri, Jan 22, 2010 at 08:15:49PM +0000, Pyun YongHyeon wrote: > Author: yongari > Date: Fri Jan 22 20:15:49 2010 > New Revision: 202827 > URL: http://svn.freebsd.org/changeset/base/202827 > > Log: > Yukon Ultra2 has 126MHz clock. > Sorry, it should be read as 125MHz. From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 20:32:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86188106566C; Fri, 22 Jan 2010 20:32:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 748B28FC0A; Fri, 22 Jan 2010 20:32:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKW71r077745; Fri, 22 Jan 2010 20:32:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKW79x077742; Fri, 22 Jan 2010 20:32:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001222032.o0MKW79x077742@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 20:32: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: r202830 - in head/sys/mips: include mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 20:32:07 -0000 Author: imp Date: Fri Jan 22 20:32:07 2010 New Revision: 202830 URL: http://svn.freebsd.org/changeset/base/202830 Log: Create a method of last resort for rebooting the mips processor: jump to the reset vector. This works for many SoCs where other reset hardware is either missing or unknown. Modified: head/sys/mips/include/md_var.h head/sys/mips/mips/machdep.c Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Fri Jan 22 20:30:54 2010 (r202829) +++ head/sys/mips/include/md_var.h Fri Jan 22 20:32:07 2010 (r202830) @@ -52,6 +52,7 @@ uintptr_t MipsEmulateBranch(struct trapf void MipsSwitchFPState(struct thread *, struct trapframe *); u_long kvtop(void *addr); int is_physical_memory(vm_offset_t addr); +void mips_generic_reset(void); #define is_cacheable_mem(pa) is_physical_memory((pa)) Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Fri Jan 22 20:30:54 2010 (r202829) +++ head/sys/mips/mips/machdep.c Fri Jan 22 20:32:07 2010 (r202830) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -359,6 +360,17 @@ mips_vector_init(void) } /* + * Many SoCs have a means to reset the core itself. Others do not, or + * the method is unknown to us. For those cases, we jump to the mips + * reset vector and hope for the best. This works well in practice. + */ +void +mips_generic_reset() +{ + ((void(*)(void))(intptr_t)MIPS_VEC_RESET)(); +} + +/* * Initialise a struct pcpu. */ void From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 20:40:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EFE3106566B; Fri, 22 Jan 2010 20:40:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F12978FC08; Fri, 22 Jan 2010 20:40:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKe7vO079531; Fri, 22 Jan 2010 20:40:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKe7TB079529; Fri, 22 Jan 2010 20:40:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001222040.o0MKe7TB079529@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 20:40: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: r202831 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 20:40:08 -0000 Author: imp Date: Fri Jan 22 20:40:07 2010 New Revision: 202831 URL: http://svn.freebsd.org/changeset/base/202831 Log: o Add support for memory above 256MB on the octeon. o Force the ebase to be 0x80000000 (the base that we're booted with may need to be respected in the future). o Initialize the clock early so we can initialize the console early o use panic where we can now use it. o Tag some code for parsing the boot records as belonging in the cavium sdk. o remove support for booting on ancient boards... # we make it further in bootstrapping now: interrupts being enabled in the # uarts are now taking us out, it seems, for reasons unknown. Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 20:32:07 2010 (r202830) +++ head/sys/mips/cavium/octeon_machdep.c Fri Jan 22 20:40:07 2010 (r202831) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #define MAX_APP_DESC_ADDR 0xafffffff #endif +static struct pcpu pcpu0; extern int *edata; extern int *end; @@ -87,6 +88,16 @@ static void octeon_boot_params_init(regi static uint64_t ciu_get_intr_sum_reg_addr(int core_num, int intx, int enx); static uint64_t ciu_get_intr_en_reg_addr(int core_num, int intx, int enx); +static __inline void +mips_wr_ebase(u_int32_t a0) +{ + __asm __volatile("mtc0 %[a0], $15, 1 ;" + : + : [a0] "r"(a0)); + + mips_barrier(); +} + void platform_cpu_init() { @@ -638,52 +649,122 @@ void ciu_enable_interrupts(int core_num, octeon_set_interrupts(cpu_status_bits); } +unsigned long +octeon_get_clock_rate(void) +{ + return octeon_cpu_clock; +} + +static void +octeon_memory_init(void) +{ + uint32_t realmem_bytes; + + if (octeon_board_real()) { + printf("octeon_dram == %llx\n", octeon_dram); + printf("reduced to ram: %u MB", (uint32_t) octeon_dram >> 20); + + realmem_bytes = (octeon_dram - PAGE_SIZE); + realmem_bytes &= ~(PAGE_SIZE - 1); + printf("Real memory bytes is %x\n", realmem_bytes); + } else { + /* Simulator we limit to 96 meg */ + realmem_bytes = (96 << 20); + } + /* phys_avail regions are in bytes */ + phys_avail[0] = (MIPS_KSEG0_TO_PHYS((vm_offset_t)&end) + PAGE_SIZE) & ~(PAGE_SIZE - 1); + if (octeon_board_real()) { + if (realmem_bytes > OCTEON_DRAM_FIRST_256_END) + phys_avail[1] = OCTEON_DRAM_FIRST_256_END; + else + phys_avail[1] = realmem_bytes; + realmem_bytes -= OCTEON_DRAM_FIRST_256_END; + realmem_bytes &= ~(PAGE_SIZE - 1); + printf("phys_avail[0] = %x phys_avail[1] = %x\n", + phys_avail[0], phys_avail[1]); + } else { + /* Simulator gets 96Meg period. */ + phys_avail[1] = (96 << 20); + } + /*- + * Octeon Memory looks as follows: + * PA + * 0000 0000 to 0x0 0000 0000 0000 + * 0FFF FFFF First 256 MB memory Maps to 0x0 0000 0FFF FFFF + * + * 1000 0000 to 0x1 0000 1000 0000 + * 1FFF FFFF Uncached Bu I/O space.converted to 0x1 0000 1FFF FFFF + * + * 2FFF FFFF to Cached 0x0 0000 2000 0000 + * FFFF FFFF all dram mem above the first 512M 0x3 FFFF FFFF FFFF + * + */ + physmem = btoc(phys_avail[1] - phys_avail[0]); + if ((octeon_board_real()) && + (realmem_bytes > OCTEON_DRAM_FIRST_256_END)) { + /* take out the upper non-cached 1/2 */ + realmem_bytes -= OCTEON_DRAM_FIRST_256_END; + realmem_bytes &= ~(PAGE_SIZE - 1); + /* Now map the rest of the memory */ + phys_avail[2] = 0x20000000; + printf("realmem_bytes is now at %x\n", realmem_bytes); + phys_avail[3] = ((uint32_t) 0x20000000 + realmem_bytes); + printf("Next block of memory goes from %x to %x\n", + phys_avail[2], phys_avail[3]); + physmem += btoc(phys_avail[3] - phys_avail[2]); + } else { + printf("realmem_bytes is %d\n", realmem_bytes); + } + realmem = physmem; + + printf("\nTotal DRAM Size 0x%X", (uint32_t) octeon_dram); + printf("\nBank 0 = 0x%8X -> 0x%8X", phys_avail[0], phys_avail[1]); + printf("\nBank 1 = 0x%8X -> 0x%8X\n", phys_avail[2], phys_avail[3]); + printf("\nphysmem: 0x%lx", physmem); + + Maxmem = physmem; + +} + void platform_start(__register_t a0, __register_t a1, __register_t a2 __unused, __register_t a3) { uint64_t platform_counter_freq; - int i, mem = 0; /* Initialize pcpu stuff */ mips_pcpu0_init(); + mips_timer_early_init(OCTEON_CLOCK_DEFAULT); + cninit(); + octeon_ciu_reset(); octeon_boot_params_init(a3); - /* XXX octeon boot decriptor has args in it... */ - octeon_ciu_reset(); - octeon_uart_write_string(0, "Platform Starting\n"); - bootverbose = 1; - if (mem > 0) - realmem = btoc(mem << 20); - else - realmem = btoc(32 << 20); - - for (i = 0; i < 10; i++) - phys_avail[i] = 0; - - /* phys_avail regions are in bytes */ - phys_avail[0] = MIPS_KSEG0_TO_PHYS((vm_offset_t)&end); - phys_avail[1] = ctob(realmem); - - physmem = realmem; + cpuid_to_pcpu[0] = &pcpu0; - pmap_bootstrap(); - mips_proc0_init(); + /* + * For some reason on the cn38xx simulator ebase register is set to + * 0x80001000 at bootup time. Move it back to the default, but + * when we move to having support for multiple executives, we need + * to rethink this. + */ + mips_wr_ebase(0x80000000); + octeon_memory_init(); init_param1(); - /* TODO: parse argc,argv */ - platform_counter_freq = 330000000UL; /* XXX: from idt */ - mips_timer_init_params(platform_counter_freq, 1); - cninit(); init_param2(physmem); mips_cpu_init(); + pmap_bootstrap(); + mips_proc0_init(); mutex_init(); #ifdef DDB kdb_init(); #endif + platform_counter_freq = octeon_get_clock_rate(); + mips_timer_init_params(platform_counter_freq, 1); } +/* impSTART: This stuff should move back into the Cavium SDK */ /* **************************************************************************************** * @@ -788,7 +869,6 @@ uint8_t octeon_mac_addr[6] = { 0 }; int octeon_core_mask, octeon_mac_addr_count; int octeon_chip_rev_major = 0, octeon_chip_rev_minor = 0, octeon_chip_type = 0; -extern int32_t app_descriptor_addr; static octeon_boot_descriptor_t *app_desc_ptr; static cvmx_bootinfo_t *cvmx_desc_ptr; @@ -821,7 +901,6 @@ octeon_process_app_desc_ver_unknown(void octeon_dram = OCTEON_DRAM_DEFAULT; octeon_board_rev_major = octeon_board_rev_minor = octeon_board_type = 0; octeon_core_mask = 1; - octeon_cpu_clock = OCTEON_CLOCK_DEFAULT; octeon_chip_type = octeon_chip_rev_major = octeon_chip_rev_minor = 0; octeon_mac_addr[0] = 0x00; octeon_mac_addr[1] = 0x0f; octeon_mac_addr[2] = 0xb7; octeon_mac_addr[3] = 0x10; @@ -844,13 +923,10 @@ octeon_process_app_desc_ver_6(void) (cvmx_bootinfo_t *) ((intptr_t)cvmx_desc_ptr | MIPS_KSEG0_START); octeon_cvmx_bd_ver = (cvmx_desc_ptr->major_version * 100) + cvmx_desc_ptr->minor_version; - /* Too early for panic? */ if (cvmx_desc_ptr->major_version != 1) { - printf("Incompatible CVMX descriptor from bootloader: %d.%d %p\n", + panic("Incompatible CVMX descriptor from bootloader: %d.%d %p\n", (int) cvmx_desc_ptr->major_version, (int) cvmx_desc_ptr->minor_version, cvmx_desc_ptr); - while (1); /* Never return */ - return 1; /* Satisfy the compiler */ } octeon_core_mask = cvmx_desc_ptr->core_mask; @@ -876,53 +952,15 @@ octeon_process_app_desc_ver_6(void) return 0; } -static int -octeon_process_app_desc_ver_3_4_5(void) -{ - - octeon_cvmx_bd_ver = octeon_bd_ver; - octeon_core_mask = app_desc_ptr->core_mask; - - if (app_desc_ptr->desc_version > 3) - octeon_cpu_clock = app_desc_ptr->eclock_hz; - else - octeon_cpu_clock = OCTEON_CLOCK_DEFAULT; - if (app_desc_ptr->dram_size > 16*1024*1024) - octeon_dram = (uint64_t)app_desc_ptr->dram_size; - else - octeon_dram = (uint64_t)app_desc_ptr->dram_size << 20; - - if (app_desc_ptr->desc_version > 4) { - octeon_board_type = app_desc_ptr->board_type; - octeon_board_rev_major = app_desc_ptr->board_rev_major; - octeon_board_rev_minor = app_desc_ptr->board_rev_minor; - octeon_chip_type = app_desc_ptr->chip_type; - octeon_chip_rev_major = app_desc_ptr->chip_rev_major; - octeon_chip_rev_minor = app_desc_ptr->chip_rev_minor; - - octeon_mac_addr[0] = app_desc_ptr->mac_addr_base[0]; - octeon_mac_addr[1] = app_desc_ptr->mac_addr_base[1]; - octeon_mac_addr[2] = app_desc_ptr->mac_addr_base[2]; - octeon_mac_addr[3] = app_desc_ptr->mac_addr_base[3]; - octeon_mac_addr[4] = app_desc_ptr->mac_addr_base[4]; - octeon_mac_addr[5] = app_desc_ptr->mac_addr_base[5]; - octeon_mac_addr_count = app_desc_ptr->mac_addr_count; - } - return 0; -} - - static void octeon_boot_params_init(register_t ptr) { int bad_desc = 1; - + if (ptr != 0 && ptr < MAX_APP_DESC_ADDR) { app_desc_ptr = (octeon_boot_descriptor_t *)(intptr_t)ptr; octeon_bd_ver = app_desc_ptr->desc_version; - if ((octeon_bd_ver >= 3) && (octeon_bd_ver <= 5)) - bad_desc = octeon_process_app_desc_ver_3_4_5(); - else if (app_desc_ptr->desc_version == 6) + if (app_desc_ptr->desc_version == 6) bad_desc = octeon_process_app_desc_ver_6(); } if (bad_desc) @@ -937,7 +975,9 @@ octeon_boot_params_init(register_t ptr) printf(" Octeon Chip: %u Rev %u/%u", octeon_chip_type, octeon_chip_rev_major, octeon_chip_rev_minor); - printf(" Mac Address %02X.%02X.%02X.%02X.%02X.%02X\n", - octeon_mac_addr[0], octeon_mac_addr[1], octeon_mac_addr[2], - octeon_mac_addr[3], octeon_mac_addr[4], octeon_mac_addr[5]); + printf(" Mac Address %02X.%02X.%02X.%02X.%02X.%02X (%d)\n", + octeon_mac_addr[0], octeon_mac_addr[1], octeon_mac_addr[2], + octeon_mac_addr[3], octeon_mac_addr[4], octeon_mac_addr[5], + octeon_mac_addr_count); } +/* impEND: This stuff should move back into the Cavium SDK */ From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 20:41:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0F33106566B; Fri, 22 Jan 2010 20:41:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEA218FC14; Fri, 22 Jan 2010 20:41:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKfheY079945; Fri, 22 Jan 2010 20:41:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKfhxV079943; Fri, 22 Jan 2010 20:41:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001222041.o0MKfhxV079943@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 20:41:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202832 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 20:41:43 -0000 Author: imp Date: Fri Jan 22 20:41:43 2010 New Revision: 202832 URL: http://svn.freebsd.org/changeset/base/202832 Log: make note of the nonsensical nature of the values in this hints file. Modified: head/sys/mips/conf/OCTEON1.hints Modified: head/sys/mips/conf/OCTEON1.hints ============================================================================== --- head/sys/mips/conf/OCTEON1.hints Fri Jan 22 20:40:07 2010 (r202831) +++ head/sys/mips/conf/OCTEON1.hints Fri Jan 22 20:41:43 2010 (r202832) @@ -1,13 +1,13 @@ -# /* -# * This product includes software developed by the University of - -# * California, Berkeley and its contributors." -# */ +# $FreeBSD$ # device.hints +# All these values are complete nonsense... hw.uart.console="io:0x1" hint.obio.0.at="nexus" hint.obio.0.maddr="0x1" +hint.obio.0.msize="0x1" hint.obio.0.flags="0x1" hint.uart.0.at="obio" hint.uart.0.maddr="0x1" hint.uart.0.flags="0x1" +hint.pcib.0.at="nexus" +hint.pci.0.at="pcib" From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 20:42:19 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35CE31065676; Fri, 22 Jan 2010 20:42:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24BB48FC18; Fri, 22 Jan 2010 20:42:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKgJtc080083; Fri, 22 Jan 2010 20:42:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKgJJs080081; Fri, 22 Jan 2010 20:42:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001222042.o0MKgJJs080081@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 20:42:19 +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: r202833 - head/sys/mips/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 20:42:19 -0000 Author: imp Date: Fri Jan 22 20:42:18 2010 New Revision: 202833 URL: http://svn.freebsd.org/changeset/base/202833 Log: Remove some irrelevant commented out make options. Modified: head/sys/mips/conf/OCTEON1-32 Modified: head/sys/mips/conf/OCTEON1-32 ============================================================================== --- head/sys/mips/conf/OCTEON1-32 Fri Jan 22 20:41:43 2010 (r202832) +++ head/sys/mips/conf/OCTEON1-32 Fri Jan 22 20:42:18 2010 (r202833) @@ -21,14 +21,10 @@ machine mips cpu CPU_MIPS4KC ident OCTEON1 -#makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" -#makeoptions LDSCRIPT_NAME= ldscript.mips.mips64 - # Don't build any modules yet. makeoptions MODULES_OVERRIDE="" makeoptions TARGET_BIG_ENDIAN=defined makeoptions LDSCRIPT_NAME=ldscript.mips.octeon1.32 -#makeoptions TARGET_64BIT=defined options KERNVIRTADDR=0x80100000 makeoptions KERNLOADADDR=0x80100000 From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 20:44:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84B1E106568F; Fri, 22 Jan 2010 20:44:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 739DC8FC1B; Fri, 22 Jan 2010 20:44:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MKiYjq080639; Fri, 22 Jan 2010 20:44:34 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MKiYd3080637; Fri, 22 Jan 2010 20:44:34 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001222044.o0MKiYd3080637@svn.freebsd.org> From: Warner Losh Date: Fri, 22 Jan 2010 20:44:34 +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: r202834 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 20:44:34 -0000 Author: imp Date: Fri Jan 22 20:44:34 2010 New Revision: 202834 URL: http://svn.freebsd.org/changeset/base/202834 Log: Declare octeon_get_clock_rate, now exported from octeon_machdep Modified: head/sys/mips/cavium/octeon_pcmap_regs.h Modified: head/sys/mips/cavium/octeon_pcmap_regs.h ============================================================================== --- head/sys/mips/cavium/octeon_pcmap_regs.h Fri Jan 22 20:42:18 2010 (r202833) +++ head/sys/mips/cavium/octeon_pcmap_regs.h Fri Jan 22 20:44:34 2010 (r202834) @@ -1,7 +1,9 @@ /* * This product includes software developed by the University of * California, Berkeley and its contributors." -*/ + */ + +/* $FreeBSD$ */ #ifndef __OCTEON_PCMAP_REGS_H__ #define __OCTEON_PCMAP_REGS_H__ @@ -904,8 +906,7 @@ extern uint64_t ciu_get_int_summary(int extern void octeon_ciu_start_gtimer(int timer, u_int one_shot, uint64_t time_cycles); extern void octeon_ciu_stop_gtimer(int timer); extern int octeon_board_real(void); - - +extern unsigned long octeon_get_clock_rate(void); typedef union { uint64_t word64; From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 22:14:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40E3A106566B; Fri, 22 Jan 2010 22:14:13 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E37A8FC12; Fri, 22 Jan 2010 22:14:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MMED7D002284; Fri, 22 Jan 2010 22:14:13 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MMED3V002279; Fri, 22 Jan 2010 22:14:13 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201001222214.o0MMED3V002279@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Fri, 22 Jan 2010 22:14:13 +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: r202839 - in head/sys/mips: atheros conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 22:14:13 -0000 Author: gonzo Date: Fri Jan 22 22:14:12 2010 New Revision: 202839 URL: http://svn.freebsd.org/changeset/base/202839 Log: - Add driver for PCF2123, SPI real time clock/calendar Added: head/sys/mips/atheros/pcf2123_rtc.c (contents, props changed) head/sys/mips/atheros/pcf2123reg.h (contents, props changed) Modified: head/sys/mips/atheros/files.ar71xx head/sys/mips/conf/AR71XX.hints Modified: head/sys/mips/atheros/files.ar71xx ============================================================================== --- head/sys/mips/atheros/files.ar71xx Fri Jan 22 21:36:34 2010 (r202838) +++ head/sys/mips/atheros/files.ar71xx Fri Jan 22 22:14:12 2010 (r202839) @@ -7,6 +7,7 @@ mips/atheros/ar71xx_ohci.c optional ohci mips/atheros/ar71xx_pci.c optional pci mips/atheros/ar71xx_pci_bus_space.c optional pci mips/atheros/ar71xx_spi.c optional ar71xx_spi +mips/atheros/pcf2123_rtc.c optional pcf2123_rtc ar71xx_spi mips/atheros/ar71xx_wdog.c optional ar71xx_wdog mips/atheros/if_arge.c optional arge mips/atheros/uart_bus_ar71xx.c optional uart Added: head/sys/mips/atheros/pcf2123_rtc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/pcf2123_rtc.c Fri Jan 22 22:14:12 2010 (r202839) @@ -0,0 +1,204 @@ +/*- + * Copyright (c) 2010, Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include "spibus_if.h" + +#include "clock_if.h" + +#define YEAR_BASE 1970 +#define PCF2123_DELAY 50 + +struct pcf2123_rtc_softc { + device_t dev; +}; + +static int pcf2123_rtc_probe(device_t dev); +static int pcf2123_rtc_attach(device_t dev); + +static int pcf2123_rtc_gettime(device_t dev, struct timespec *ts); +static int pcf2123_rtc_settime(device_t dev, struct timespec *ts); + +static int +pcf2123_rtc_probe(device_t dev) +{ + + device_set_desc(dev, "PCF2123 SPI RTC"); + return (0); +} + +static int +pcf2123_rtc_attach(device_t dev) +{ + struct pcf2123_rtc_softc *sc; + struct spi_command cmd; + unsigned char rxBuf[3]; + unsigned char txBuf[3]; + int err; + + sc = device_get_softc(dev); + sc->dev = dev; + + clock_register(dev, 1000000); + + memset(&cmd, 0, sizeof(cmd)); + memset(rxBuf, 0, sizeof(rxBuf)); + memset(txBuf, 0, sizeof(txBuf)); + + /* Make sure Ctrl1 and Ctrl2 are zeroes */ + txBuf[0] = PCF2123_WRITE(PCF2123_REG_CTRL1); + cmd.rx_cmd = rxBuf; + cmd.tx_cmd = txBuf; + cmd.rx_cmd_sz = sizeof(rxBuf); + cmd.tx_cmd_sz = sizeof(txBuf); + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); + DELAY(PCF2123_DELAY); + + return (0); +} + +static int +pcf2123_rtc_gettime(device_t dev, struct timespec *ts) +{ + struct clocktime ct; + struct spi_command cmd; + unsigned char rxTimedate[8]; + unsigned char txTimedate[8]; + int err; + + memset(&cmd, 0, sizeof(cmd)); + memset(rxTimedate, 0, sizeof(rxTimedate)); + memset(txTimedate, 0, sizeof(txTimedate)); + + /* + * Counter is stopped when access to time registers is in progress + * So there is no need to stop/start counter + */ + /* Start reading from seconds */ + txTimedate[0] = PCF2123_READ(PCF2123_REG_SECONDS); + cmd.rx_cmd = rxTimedate; + cmd.tx_cmd = txTimedate; + cmd.rx_cmd_sz = sizeof(rxTimedate); + cmd.tx_cmd_sz = sizeof(txTimedate); + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); + DELAY(PCF2123_DELAY); + + ct.nsec = 0; + ct.sec = FROMBCD(rxTimedate[1] & 0x7f); + ct.min = FROMBCD(rxTimedate[2] & 0x7f); + ct.hour = FROMBCD(rxTimedate[3] & 0x3f); + + ct.dow = FROMBCD(rxTimedate[5] & 0x3f); + + ct.day = FROMBCD(rxTimedate[4] & 0x3f); + ct.mon = FROMBCD(rxTimedate[6] & 0x1f); + ct.year = YEAR_BASE + FROMBCD(rxTimedate[7]); + + return (clock_ct_to_ts(&ct, ts)); +} + +static int +pcf2123_rtc_settime(device_t dev, struct timespec *ts) +{ + struct clocktime ct; + struct pcf2123_rtc_softc *sc; + struct spi_command cmd; + unsigned char rxTimedate[8]; + unsigned char txTimedate[8]; + int err; + + sc = device_get_softc(dev); + + /* Resolution: 1 sec */ + if (ts->tv_nsec >= 500000000) + ts->tv_sec++; + ts->tv_nsec = 0; + clock_ts_to_ct(ts, &ct); + + memset(&cmd, 0, sizeof(cmd)); + memset(rxTimedate, 0, sizeof(rxTimedate)); + memset(txTimedate, 0, sizeof(txTimedate)); + + /* Start reading from seconds */ + cmd.rx_cmd = rxTimedate; + cmd.tx_cmd = txTimedate; + cmd.rx_cmd_sz = sizeof(rxTimedate); + cmd.tx_cmd_sz = sizeof(txTimedate); + + /* + * Counter is stopped when access to time registers is in progress + * So there is no need to stop/start counter + */ + txTimedate[0] = PCF2123_WRITE(PCF2123_REG_SECONDS); + txTimedate[1] = TOBCD(ct.sec); + txTimedate[2] = TOBCD(ct.min); + txTimedate[3] = TOBCD(ct.hour); + txTimedate[4] = TOBCD(ct.day); + txTimedate[5] = TOBCD(ct.dow); + txTimedate[6] = TOBCD(ct.mon); + txTimedate[7] = TOBCD(ct.year - YEAR_BASE); + + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); + DELAY(PCF2123_DELAY); + + return (err); +} + +static device_method_t pcf2123_rtc_methods[] = { + DEVMETHOD(device_probe, pcf2123_rtc_probe), + DEVMETHOD(device_attach, pcf2123_rtc_attach), + + DEVMETHOD(clock_gettime, pcf2123_rtc_gettime), + DEVMETHOD(clock_settime, pcf2123_rtc_settime), + + { 0, 0 }, +}; + +static driver_t pcf2123_rtc_driver = { + "rtc", + pcf2123_rtc_methods, + sizeof(struct pcf2123_rtc_softc), +}; +static devclass_t pcf2123_rtc_devclass; + +DRIVER_MODULE(pcf2123_rtc, spibus, pcf2123_rtc_driver, pcf2123_rtc_devclass, 0, 0); Added: head/sys/mips/atheros/pcf2123reg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/pcf2123reg.h Fri Jan 22 22:14:12 2010 (r202839) @@ -0,0 +1,67 @@ +/*- + * Copyright (c) 2009, Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* $FreeBSD$ */ + +#ifndef __PCF2123REG_H__ +#define __PCF2123REG_H__ + +/* Control and status */ +#define PCF2123_REG_CTRL1 0x0 +#define PCF2123_REG_CTRL2 0x1 + +/* Time and date */ +#define PCF2123_REG_SECONDS 0x2 +#define PCF2123_REG_MINUTES 0x3 +#define PCF2123_REG_HOURS 0x4 +#define PCF2123_REG_DAYS 0x5 +#define PCF2123_REG_WEEKDAYS 0x6 +#define PCF2123_REG_MONTHS 0x7 +#define PCF2123_REG_YEARS 0x8 + +/* Alarm registers */ +#define PCF2123_REG_MINUTE_ALARM 0x9 +#define PCF2123_REG_HOUR_ALARM 0xA +#define PCF2123_REG_DAY_ALARM 0xB +#define PCF2123_REG_WEEKDAY_ALARM 0xC + +/* Offset */ +#define PCF2123_REG_OFFSET 0xD + +/* Timer */ +#define PCF2123_REG_TIMER_CLKOUT 0xE +#define PCF2123_REG_COUNTDOWN_TIMER 0xF + +/* Commands */ +#define PCF2123_CMD_READ (1 << 7) +#define PCF2123_CMD_WRITE (0 << 7) + +#define PCF2123_READ(reg) (PCF2123_CMD_READ | (1 << 4) | (reg)) +#define PCF2123_WRITE(reg) (PCF2123_CMD_WRITE | (1 << 4) | (reg)) + +#endif /* __PCF2123REG_H__ */ + Modified: head/sys/mips/conf/AR71XX.hints ============================================================================== --- head/sys/mips/conf/AR71XX.hints Fri Jan 22 21:36:34 2010 (r202838) +++ head/sys/mips/conf/AR71XX.hints Fri Jan 22 22:14:12 2010 (r202839) @@ -55,5 +55,11 @@ hint.spi.0.msize=0x10 hint.mx25l.0.at="spibus0" hint.mx25l.0.cs=0 +# shares the same bus with mx25l. +# CE low for flash, CE high for RTC +# at the moment it's just stub until SPI bus is ready for such hacks +# hint.rtc.0.at="spibus0" +# hint.rtc.0.cs=0 + # Watchdog hint.ar71xx_wdog.0.at="nexus0" From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 23:19:49 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21DA510656C2; Fri, 22 Jan 2010 23:19:49 +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 0F13F8FC12; Fri, 22 Jan 2010 23:19:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNJmUO019758; Fri, 22 Jan 2010 23:19:48 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNJmaO019750; Fri, 22 Jan 2010 23:19:48 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001222319.o0MNJmaO019750@svn.freebsd.org> From: Xin LI Date: Fri, 22 Jan 2010 23:19:48 +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: r202843 - in head: . etc/mtree share/doc/usd share/doc/usd/05.dc share/doc/usd/06.bc usr.bin/bc usr.bin/bc/USD.doc usr.bin/dc usr.bin/dc/USD.doc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 23:19:49 -0000 Author: delphij Date: Fri Jan 22 23:19:48 2010 New Revision: 202843 URL: http://svn.freebsd.org/changeset/base/202843 Log: Move USD documents from /usr/share/doc/papers to to /usr/share/doc/usd. Reviewed by: gabor Added: head/share/doc/usd/05.dc/ head/share/doc/usd/05.dc/Makefile (contents, props changed) head/share/doc/usd/06.bc/ head/share/doc/usd/06.bc/Makefile (contents, props changed) Deleted: head/usr.bin/bc/USD.doc/Makefile head/usr.bin/dc/USD.doc/Makefile Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.usr.dist head/share/doc/usd/Makefile head/usr.bin/bc/Makefile head/usr.bin/dc/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Jan 22 23:19:33 2010 (r202842) +++ head/ObsoleteFiles.inc Fri Jan 22 23:19:48 2010 (r202843) @@ -14,6 +14,9 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100122: move BSDL bc/dc USD documents to /usr/share/doc/usd +OLD_FILES+=usr/share/doc/papers/bc.ascii.gz +OLD_FILES+=usr/share/doc/papers/dc.ascii.gz # 20100120: replacing GNU bc/dc with BSDL versions OLD_FILES+=usr/share/examples/bc/ckbook.b OLD_FILES+=usr/share/examples/bc/pi.b Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Fri Jan 22 23:19:33 2010 (r202842) +++ head/etc/mtree/BSD.usr.dist Fri Jan 22 23:19:48 2010 (r202843) @@ -160,6 +160,10 @@ usd 04.csh .. + 05.dc + .. + 06.bc + .. 07.mail .. 10.exref Added: head/share/doc/usd/05.dc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/usd/05.dc/Makefile Fri Jan 22 23:19:48 2010 (r202843) @@ -0,0 +1,9 @@ +# @(#)Makefile 8.1 (Berkeley) 6/8/93 +# $FreeBSD$ + +VOLUME= usd/05.dc +SRCS= dc +MACROS= -ms +SRCDIR= ${.CURDIR}/../../../../usr.bin/dc/USD.doc + +.include Added: head/share/doc/usd/06.bc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/usd/06.bc/Makefile Fri Jan 22 23:19:48 2010 (r202843) @@ -0,0 +1,9 @@ +# @(#)Makefile 8.1 (Berkeley) 6/8/93 +# $FreeBSD$ + +VOLUME= usd/06.bc +SRCS= bc +MACROS= -ms +SRCDIR= ${.CURDIR}/../../../../usr.bin/bc/USD.doc + +.include Modified: head/share/doc/usd/Makefile ============================================================================== --- head/share/doc/usd/Makefile Fri Jan 22 23:19:33 2010 (r202842) +++ head/share/doc/usd/Makefile Fri Jan 22 23:19:48 2010 (r202843) @@ -7,6 +7,8 @@ SUBDIR= title \ contents \ 04.csh \ + 05.dc \ + 06.bc \ 07.mail \ 10.exref \ 11.vitut \ Modified: head/usr.bin/bc/Makefile ============================================================================== --- head/usr.bin/bc/Makefile Fri Jan 22 23:19:33 2010 (r202842) +++ head/usr.bin/bc/Makefile Fri Jan 22 23:19:48 2010 (r202843) @@ -4,7 +4,6 @@ PROG= bc SRCS= bc.y scan.l CFLAGS+= -I. -I${.CURDIR} -SUBDIR+= USD.doc FILES+= bc.library FILESDIR= ${SHAREDIR}/misc Modified: head/usr.bin/dc/Makefile ============================================================================== --- head/usr.bin/dc/Makefile Fri Jan 22 23:19:33 2010 (r202842) +++ head/usr.bin/dc/Makefile Fri Jan 22 23:19:48 2010 (r202843) @@ -6,6 +6,4 @@ SRCS= dc.c bcode.c inout.c mem.c stack.c LDADD= -lcrypto DPADD= ${LIBCRYPTO} -SUBDIR+= USD.doc - .include From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 23:32:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07E9310656FE; Fri, 22 Jan 2010 23:32:11 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8E618FC0C; Fri, 22 Jan 2010 23:32:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNWAwh023820; Fri, 22 Jan 2010 23:32:10 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNWAk7023816; Fri, 22 Jan 2010 23:32:10 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <201001222332.o0MNWAk7023816@svn.freebsd.org> From: Florent Thoumie Date: Fri, 22 Jan 2010 23:32:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202844 - in head/usr.sbin/pkg_install: lib updating X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 23:32:11 -0000 Author: flz Date: Fri Jan 22 23:32:10 2010 New Revision: 202844 URL: http://svn.freebsd.org/changeset/base/202844 Log: - Add support for UPDATING remote fetching. - Reorganize EXAMPLES section in pkg_updating(1). - Style fixes. - Bump PKG_INSTALL_VERSION to 20100122. Submitted by: beat MFC after: 1 week Modified: head/usr.sbin/pkg_install/lib/lib.h head/usr.sbin/pkg_install/updating/main.c head/usr.sbin/pkg_install/updating/pkg_updating.1 Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 23:19:48 2010 (r202843) +++ head/usr.sbin/pkg_install/lib/lib.h Fri Jan 22 23:32:10 2010 (r202844) @@ -105,7 +105,7 @@ * Version of the package tools - increase whenever you make a change * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20090902 +#define PKG_INSTALL_VERSION 20100122 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: head/usr.sbin/pkg_install/updating/main.c ============================================================================== --- head/usr.sbin/pkg_install/updating/main.c Fri Jan 22 23:19:48 2010 (r202843) +++ head/usr.sbin/pkg_install/updating/main.c Fri Jan 22 23:32:10 2010 (r202844) @@ -10,7 +10,11 @@ #include __FBSDID("$FreeBSD$"); + +#include +#include #include +#include #include #include #include @@ -115,10 +119,10 @@ main(int argc, char *argv[]) if (argc != 0) { pflag = 1; while (*argv) { - if((curr = (INSTALLEDPORT *) + if ((curr = (INSTALLEDPORT *) malloc(sizeof(INSTALLEDPORT))) == NULL) (void)exit(EXIT_FAILURE); - strlcpy (curr->name, *argv, strlen(*argv) + 1); + strlcpy(curr->name, *argv, strlen(*argv) + 1); curr->next = head; head = curr; (void)*argv++; @@ -131,22 +135,22 @@ main(int argc, char *argv[]) */ if (pflag == 0) { /* Open /var/db/pkg and search for all installed ports. */ - if((dir = opendir(pkgdbpath)) != NULL) { + if ((dir = opendir(pkgdbpath)) != NULL) { while ((pkgdbdir = readdir(dir)) != NULL) { if (strcmp(pkgdbdir->d_name, ".") != 0 && - strcmp(pkgdbdir->d_name, "..") !=0) { + strcmp(pkgdbdir->d_name, "..") != 0) { /* Create path to +CONTENTS file for each installed port */ n = strlcpy(tmp_file, pkgdbpath, strlen(pkgdbpath)+1); n = strlcpy(tmp_file + n, "/", sizeof(tmp_file) - n); n = strlcat(tmp_file + n, pkgdbdir->d_name, sizeof(tmp_file) - n); - if(stat(tmp_file, &attribute) == -1) { + if (stat(tmp_file, &attribute) == -1) { fprintf(stderr, "can't open %s: %s\n", tmp_file, strerror(errno)); return EXIT_FAILURE; } - if(attribute.st_mode & S_IFREG) + if (attribute.st_mode & S_IFREG) continue; (void)strlcat(tmp_file + n, "/", sizeof(tmp_file) - n); @@ -155,7 +159,7 @@ main(int argc, char *argv[]) /* Open +CONTENT file */ fd = fopen(tmp_file, "r"); - if(fd == NULL) { + if (fd == NULL) { fprintf(stderr, "warning: can't open %s: %s\n", tmp_file, strerror(errno)); continue; @@ -165,14 +169,14 @@ main(int argc, char *argv[]) * Parses +CONTENT for ORIGIN line and * put element into linked list. */ - while(fgets(originline, maxcharperline, fd) != NULL) { + while (fgets(originline, maxcharperline, fd) != NULL) { tmpline1 = strstr(originline, origin); - if( tmpline1 != NULL ) { + if (tmpline1 != NULL) { /* Tmp variable to store port name. */ char *pname; pname = strrchr(originline, (int)':'); pname++; - if((curr = (INSTALLEDPORT *) + if ((curr = (INSTALLEDPORT *) malloc(sizeof(INSTALLEDPORT))) == NULL) (void)exit(EXIT_FAILURE); if (pname[strlen(pname) - 1] == '\n') @@ -183,7 +187,7 @@ main(int argc, char *argv[]) } } - if(ferror(fd)) { + if (ferror(fd)) { fprintf(stderr, "error reading input\n"); exit(EX_IOERR); } @@ -195,32 +199,41 @@ main(int argc, char *argv[]) } } - /* Open UPDATING file */ - fd = fopen(updatingfile, "r"); - if(fd == NULL) { + /* Fetch UPDATING file if needed and open file */ + if (isURL(updatingfile)) { + if ((fd = fetchGetURL(updatingfile, "")) == NULL) { + fprintf(stderr, "Error: Unable to get %s: %s\n", + updatingfile, fetchLastErrString); + exit(EX_UNAVAILABLE); + } + } + else { + fd = fopen(updatingfile, "r"); + } + if (fd == NULL) { fprintf(stderr, "can't open %s: %s\n", - updatingfile, strerror(errno)); + updatingfile, strerror(errno)); exit(EX_UNAVAILABLE); } /* Parse opened UPDATING file. */ - while(fgets(updatingline, maxcharperline, fd) != NULL) { + while (fgets(updatingline, maxcharperline, fd) != NULL) { /* No entry is found so far */ if (found == 0) { /* Search for AFFECTS line to parse the portname. */ tmpline1 = strstr(updatingline, affects); - if( tmpline1 != NULL ) { + if (tmpline1 != NULL) { curr = head; - while(curr != NULL) { + while (curr != NULL) { tmpline2 = strstr(updatingline, curr->name); - if( tmpline2 != NULL ) + if (tmpline2 != NULL) break; curr = curr->next; } - if( tmpline2 != NULL ) { + if (tmpline2 != NULL) { /* If -d is set, check if entry is newer than the date. */ - if ( (dflag == 1) && (strncmp(dateline, date, 8) < 0)) + if ((dflag == 1) && (strncmp(dateline, date, 8) < 0)) continue; printf("%s", dateline); printf("%s", updatingline); @@ -231,7 +244,7 @@ main(int argc, char *argv[]) /* Search for the end of an entry, if not found print the line. */ else { tmpline1 = strstr(updatingline, end); - if( tmpline1 == NULL ) + if (tmpline1 == NULL) printf("%s", updatingline); else { linelength = strlen(updatingline); @@ -245,7 +258,7 @@ main(int argc, char *argv[]) dateline = strdup(updatingline); } - if(ferror(fd)) { + if (ferror(fd)) { fprintf(stderr, "error reading input\n"); exit(EX_IOERR); } Modified: head/usr.sbin/pkg_install/updating/pkg_updating.1 ============================================================================== --- head/usr.sbin/pkg_install/updating/pkg_updating.1 Fri Jan 22 23:19:48 2010 (r202843) +++ head/usr.sbin/pkg_install/updating/pkg_updating.1 Fri Jan 22 23:32:10 2010 (r202844) @@ -45,26 +45,31 @@ Print help message. .El .Sh EXAMPLES .Bl -tag -width indent -.Dl pkg_updating +Shows all entries of all installed ports: .Pp -Shows all entries of all installed ports. +.Dl % pkg_updating .Pp -.Dl pkg_updating -d 20070101 +Shows all entries of all installed ports since 2007-01-01: .Pp -Shows all entries of all installed ports since 2007-01-01. +.Dl % pkg_updating -d 20070101 .Pp -.Dl pkg_updating apache mysql +Shows all entries for all apache and mysql ports: .Pp -Shows all entries for all apache and mysql ports. +.Dl % pkg_updating apache mysql .Pp -.Dl pkg_updating -d 20060101 apache +Shows all apache entries since 2006-01-01: .Pp -Shows all apache entries since 2006-01-01. -.Pp -.Dl pkg_updating -f /tmp/UPDATING +.Dl % pkg_updating -d 20060101 apache .Pp Defines that the UPDATING file is in /tmp and shows all entries of all -installed ports +installed ports: +.Pp +.Dl % pkg_updating -f /tmp/UPDATING +.Pp +Fetch UPDATING file from ftp mirror and show all entries of all +installed ports: +.Pp +.Dl % pkg_updating -f ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/UPDATING .Pp .El .Sh ENVIRONMENT From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 23:35:06 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DC581065670; Fri, 22 Jan 2010 23:35:06 +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 6402C8FC18; Fri, 22 Jan 2010 23:35:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNZ6PR024736; Fri, 22 Jan 2010 23:35:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNZ6ej024733; Fri, 22 Jan 2010 23:35:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001222335.o0MNZ6ej024733@svn.freebsd.org> From: Xin LI Date: Fri, 22 Jan 2010 23:35:06 +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: r202845 - head/usr.bin/bc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 23:35:06 -0000 Author: delphij Date: Fri Jan 22 23:35:06 2010 New Revision: 202845 URL: http://svn.freebsd.org/changeset/base/202845 Log: - Remove --debug option and intentionally undocument -d, which is only kept for compatibility with 4.4BSD behavior. - Sync SYNOPSIS with usage(). - Use an alternative way to represent short and long options which have same semantics. Reviewed by: gabor Modified: head/usr.bin/bc/bc.1 head/usr.bin/bc/bc.y Modified: head/usr.bin/bc/bc.1 ============================================================================== --- head/usr.bin/bc/bc.1 Fri Jan 22 23:32:10 2010 (r202844) +++ head/usr.bin/bc/bc.1 Fri Jan 22 23:35:06 2010 (r202845) @@ -35,7 +35,7 @@ .\" .\" @(#)bc.1 6.8 (Berkeley) 8/8/91 .\" -.Dd May 31 2007 +.Dd January 22, 2010 .Dt BC 1 .Os .Sh NAME @@ -43,7 +43,7 @@ .Nd arbitrary-precision arithmetic language and calculator .Sh SYNOPSIS .Nm bc -.Op Fl cl +.Op Fl chlqv .Op Fl e Ar expression .Op Ar file ... .Sh DESCRIPTION @@ -56,8 +56,6 @@ any files given, then reads the standard Options available: .Bl -tag -width Ds .It Fl c -.It Fl d -.It Fl Fl debug .Nm is actually a preprocessor for .Xr dc 1 , @@ -71,24 +69,22 @@ instructions are sent to the standard ou instead of being interpreted by a running .Xr dc 1 process. -.It Fl e Ar exp -.It Fl Fl expression Ar exp +.It Fl e Ar expression , Fl Fl expression Ar expression Evaluate .Ar expression . If multiple .Fl e options are specified, they are processed in the order given, separated by newlines. -.It Fl h -.It Fl Fl help +.It Fl h , Fl Fl help Prints usage information. -.It Fl l -.It Fl Fl mathlib +.It Fl l , Fl Fl mathlib Allow specification of an arbitrary precision math library. The definitions in the library are available to command line expressions. -.It Fl v -.It Fl Fl version +Synonym for +.Fl l . +.It Fl v , Fl Fl version Prints version information. .El .Pp @@ -373,7 +369,7 @@ are extensions to that specification. .Sh HISTORY The .Nm -first command appeared in +command first appeared in .At v6 . A complete rewrite of the .Nm Modified: head/usr.bin/bc/bc.y ============================================================================== --- head/usr.bin/bc/bc.y Fri Jan 22 23:32:10 2010 (r202844) +++ head/usr.bin/bc/bc.y Fri Jan 22 23:35:06 2010 (r202845) @@ -129,7 +129,6 @@ extern char *__progname; const struct option long_options[] = { - {"debug", no_argument, NULL, 'd'}, {"expression", required_argument, NULL, 'e'}, {"help", no_argument, NULL, 'h'}, {"mathlib", no_argument, NULL, 'l'}, @@ -1014,7 +1013,7 @@ init(void) static void usage(void) { - fprintf(stderr, "usage: %s [-cdhlqv] [-e expression] [file ...]\n", + fprintf(stderr, "usage: %s [-chlqv] [-e expression] [file ...]\n", __progname); exit(1); } From owner-svn-src-head@FreeBSD.ORG Fri Jan 22 23:50:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9128110656A3; Fri, 22 Jan 2010 23:50:46 +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 80C7A8FC18; Fri, 22 Jan 2010 23:50:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MNokBH029072; Fri, 22 Jan 2010 23:50:46 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MNok8b029070; Fri, 22 Jan 2010 23:50:46 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001222350.o0MNok8b029070@svn.freebsd.org> From: Xin LI Date: Fri, 22 Jan 2010 23:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202847 - head/usr.bin/dc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 23:50:46 -0000 Author: delphij Date: Fri Jan 22 23:50:46 2010 New Revision: 202847 URL: http://svn.freebsd.org/changeset/base/202847 Log: - Collapase short and long options together; - Use consistent marking up with bc(1)'s reference section. Reviewed by: gabor Modified: head/usr.bin/dc/dc.1 Modified: head/usr.bin/dc/dc.1 ============================================================================== --- head/usr.bin/dc/dc.1 Fri Jan 22 23:40:47 2010 (r202846) +++ head/usr.bin/dc/dc.1 Fri Jan 22 23:50:46 2010 (r202847) @@ -35,7 +35,7 @@ .\" .\" @(#)dc.1 8.1 (Berkeley) 6/6/93 .\" -.Dd Jan 28 2009 +.Dd January 22, 2010 .Dt DC 1 .Os .Sh NAME @@ -67,8 +67,7 @@ which implements functions and reasonabl structures for programs. The options are as follows: .Bl -tag -width Ds -.It Fl e Ar expr -.It Fl Fl expression Ar expr +.It Fl e Ar expr , Fl Fl expression Ar expr Evaluate .Ar expression . If multiple @@ -80,17 +79,14 @@ argument is given, execution will stop a given on the command line, otherwise processing will continue with the contents of .Ar filename . -.It Fl f Ar filename -.It Fl Fl file Ar filename +.It Fl f Ar filename , Fl Fl file Ar filename Process the content of the given file before further calculations are done. If multiple .Fl f options are specified, they will be processed in the order given. -.It Fl h -.It Fl Fl help +.It Fl h , Fl Fl help Print short usage info. -.It Fl V -.It Fl Fl version +.It Fl V , Fl Fl version Print version info. .It Fl x Enable extended register mode. @@ -513,12 +509,12 @@ operator. .El .Sh SEE ALSO .Xr bc 1 -.Rs -.%B USD:05 -.%A L. L. Cherry -.%A R. Morris -.%T "DC \- An Interactive Desk Calculator" -.Re +.Pp +.An -nosplit +.An L. L. Cherry , +.An R. Morris +"DC \- An Interactive Desk Calculator" +.Pa /usr/share/doc/usd/05.dc/ . .Sh STANDARDS The arithmetic operations of the .Nm From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 00:18:12 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB256106566C; Sat, 23 Jan 2010 00:18:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A0298FC14; Sat, 23 Jan 2010 00:18:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0ICii036778; Sat, 23 Jan 2010 00:18:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0ICmH036771; Sat, 23 Jan 2010 00:18:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001230018.o0N0ICmH036771@svn.freebsd.org> From: Warner Losh Date: Sat, 23 Jan 2010 00:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202849 - in head/sys/mips: adm5120 alchemy atheros idt malta sentry5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 00:18:12 -0000 Author: imp Date: Sat Jan 23 00:18:12 2010 New Revision: 202849 URL: http://svn.freebsd.org/changeset/base/202849 Log: Update from old DDB convetion to initialize debugger to new KDB way. Always call kdb_init(). If we have KDB enabled, then provide a handy place to break to the debugger. Modified: head/sys/mips/adm5120/adm5120_machdep.c head/sys/mips/alchemy/alchemy_machdep.c head/sys/mips/atheros/ar71xx_machdep.c head/sys/mips/idt/idt_machdep.c head/sys/mips/malta/malta_machdep.c head/sys/mips/sentry5/s5_machdep.c Modified: head/sys/mips/adm5120/adm5120_machdep.c ============================================================================== --- head/sys/mips/adm5120/adm5120_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/adm5120/adm5120_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -105,8 +105,10 @@ mips_init(void) pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } Modified: head/sys/mips/alchemy/alchemy_machdep.c ============================================================================== --- head/sys/mips/alchemy/alchemy_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/alchemy/alchemy_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -105,8 +105,11 @@ mips_init(void) pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB + kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } Modified: head/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- head/sys/mips/atheros/ar71xx_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/atheros/ar71xx_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -256,7 +256,9 @@ platform_start(__register_t a0 __unused, (32 << USB_CTRL_FLADJ_HOST_SHIFT) | (3 << USB_CTRL_FLADJ_A5_SHIFT)); DELAY(1000); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } Modified: head/sys/mips/idt/idt_machdep.c ============================================================================== --- head/sys/mips/idt/idt_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/idt/idt_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -191,7 +191,9 @@ platform_start(__register_t a0, __regist pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } Modified: head/sys/mips/malta/malta_machdep.c ============================================================================== --- head/sys/mips/malta/malta_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/malta/malta_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -189,8 +189,10 @@ mips_init(void) pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } Modified: head/sys/mips/sentry5/s5_machdep.c ============================================================================== --- head/sys/mips/sentry5/s5_machdep.c Fri Jan 22 23:56:46 2010 (r202848) +++ head/sys/mips/sentry5/s5_machdep.c Sat Jan 23 00:18:12 2010 (r202849) @@ -136,8 +136,10 @@ mips_init(void) pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif } From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 00:24:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 172281065731; Sat, 23 Jan 2010 00:24:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05BA38FC16; Sat, 23 Jan 2010 00:24:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N0OWXn038556; Sat, 23 Jan 2010 00:24:32 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N0OWEC038553; Sat, 23 Jan 2010 00:24:32 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001230024.o0N0OWEC038553@svn.freebsd.org> From: Warner Losh Date: Sat, 23 Jan 2010 00:24: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: r202850 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 00:24:33 -0000 Author: imp Date: Sat Jan 23 00:24:31 2010 New Revision: 202850 URL: http://svn.freebsd.org/changeset/base/202850 Log: Migrate from old "DDB" style debugger to newer KDB style. Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 00:18:12 2010 (r202849) +++ head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 00:24:31 2010 (r202850) @@ -110,7 +110,7 @@ platform_cpu_init() void platform_reset(void) { - ((void(*)(void))(long)0x9fc00000)(); /* Jump to MIPS reset vector */ + mips_generic_reset(); } @@ -757,8 +757,10 @@ platform_start(__register_t a0, __regist pmap_bootstrap(); mips_proc0_init(); mutex_init(); -#ifdef DDB kdb_init(); +#ifdef KDB + if (boothowto & RB_KDB) + kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); #endif platform_counter_freq = octeon_get_clock_rate(); mips_timer_init_params(platform_counter_freq, 1); From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 01:44:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F9101065679; Sat, 23 Jan 2010 01:44:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1088FC15; Sat, 23 Jan 2010 01:44:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N1iVi1059106; Sat, 23 Jan 2010 01:44:31 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N1iVed059104; Sat, 23 Jan 2010 01:44:31 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201001230144.o0N1iVed059104@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 23 Jan 2010 01:44:30 +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: r202863 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 01:44:31 -0000 Author: np Date: Sat Jan 23 01:44:30 2010 New Revision: 202863 URL: http://svn.freebsd.org/changeset/base/202863 Log: Don't forget to release the adapter lock for a no-op. Modified: head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Sat Jan 23 01:25:09 2010 (r202862) +++ head/sys/dev/cxgb/cxgb_main.c Sat Jan 23 01:44:30 2010 (r202863) @@ -2074,6 +2074,8 @@ fail: p->if_flags = ifp->if_flags; } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) error = cxgb_uninit_locked(p); + else + ADAPTER_UNLOCK(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); break; From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 03:19:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACD6A106566B; Sat, 23 Jan 2010 03:19:13 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 813018FC14; Sat, 23 Jan 2010 03:19:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N3JDGe080696; Sat, 23 Jan 2010 03:19:13 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N3JD36080692; Sat, 23 Jan 2010 03:19:13 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201001230319.o0N3JD36080692@svn.freebsd.org> From: Neel Natu Date: Sat, 23 Jan 2010 03:19:13 +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: r202864 - in head/sys/mips: include mips sibyte X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 03:19:13 -0000 Author: neel Date: Sat Jan 23 03:19:13 2010 New Revision: 202864 URL: http://svn.freebsd.org/changeset/base/202864 Log: Remove Sibyte specific code from locore.S that sets the k0seg coherency. Move it to platform_start() instead. Approved by: imp (mentor) Modified: head/sys/mips/include/cpu.h head/sys/mips/mips/locore.S head/sys/mips/sibyte/sb_machdep.c Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Sat Jan 23 01:44:30 2010 (r202863) +++ head/sys/mips/include/cpu.h Sat Jan 23 03:19:13 2010 (r202864) @@ -163,11 +163,8 @@ * The bits in the CONFIG register */ #define CFG_K0_UNCACHED 2 -#if defined(CPU_SB1) -#define CFG_K0_COHERENT 5 /* cacheable coherent */ -#else #define CFG_K0_CACHED 3 -#endif +#define CFG_K0_MASK 0x7 /* * The bits in the context register. Modified: head/sys/mips/mips/locore.S ============================================================================== --- head/sys/mips/mips/locore.S Sat Jan 23 01:44:30 2010 (r202863) +++ head/sys/mips/mips/locore.S Sat Jan 23 03:19:13 2010 (r202864) @@ -128,11 +128,7 @@ VECTOR(_locore, unknown) mtc0 t2, COP_0_STATUS_REG COP0_SYNC /* Make sure KSEG0 is cached */ -#ifdef CPU_SB1 - li t0, CFG_K0_COHERENT -#else li t0, CFG_K0_CACHED -#endif mtc0 t0, MIPS_COP_0_CONFIG COP0_SYNC Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Sat Jan 23 01:44:30 2010 (r202863) +++ head/sys/mips/sibyte/sb_machdep.c Sat Jan 23 03:19:13 2010 (r202864) @@ -230,12 +230,29 @@ platform_trap_exit(void) } +static void +kseg0_map_coherent(void) +{ + uint32_t config; + const int CFG_K0_COHERENT = 5; + + config = mips_rd_config(); + config &= ~CFG_K0_MASK; + config |= CFG_K0_COHERENT; + mips_wr_config(config); +} + void platform_start(__register_t a0, __register_t a1, __register_t a2, __register_t a3) { vm_offset_t kernend; + /* + * Make sure that kseg0 is mapped cacheable-coherent + */ + kseg0_map_coherent(); + /* clear the BSS and SBSS segments */ memset(&edata, 0, (vm_offset_t)&end - (vm_offset_t)&edata); kernend = round_page((vm_offset_t)&end); From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 05:59:10 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B51441065676; Sat, 23 Jan 2010 05:59:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A40118FC0C; Sat, 23 Jan 2010 05:59:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N5xA1c015699; Sat, 23 Jan 2010 05:59:10 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N5xAeN015697; Sat, 23 Jan 2010 05:59:10 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201001230559.o0N5xAeN015697@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 23 Jan 2010 05:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202865 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 05:59:10 -0000 Author: gonzo Date: Sat Jan 23 05:59:10 2010 New Revision: 202865 URL: http://svn.freebsd.org/changeset/base/202865 Log: - Move .text and all sections up to .bss inclusive to the beginning of the script. Trampoline kernel builder assumes that .text goes right after headers and places startup function first in .text segment. Modified: head/sys/conf/ldscript.mips Modified: head/sys/conf/ldscript.mips ============================================================================== --- head/sys/conf/ldscript.mips Sat Jan 23 03:19:13 2010 (r202864) +++ head/sys/conf/ldscript.mips Sat Jan 23 05:59:10 2010 (r202865) @@ -44,6 +44,25 @@ SECTIONS { /* Read-only sections, merged into text segment: */ . = KERNLOADADDR + SIZEOF_HEADERS; + .text : + { + *(.trap) + *(.text) + *(.text.*) + *(.stub) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t.*) + } =0x1000000 + .fini : + { + KEEP (*(.fini)) + } =0x1000000 + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } @@ -163,25 +182,6 @@ SECTIONS { KEEP (*(.init)) } =0x1000000 - .text : - { - *(.trap) - *(.text) - *(.text.*) - *(.stub) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - *(.gnu.linkonce.t.*) - } =0x1000000 - .fini : - { - KEEP (*(.fini)) - } =0x1000000 - PROVIDE (__etext = .); - PROVIDE (_etext = .); - PROVIDE (etext = .); - .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } - .rodata1 : { *(.rodata1) } .reginfo : { *(.reginfo) } .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) } .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) } From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 06:42:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D436F10656B3; Sat, 23 Jan 2010 06:42:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C35A88FC14; Sat, 23 Jan 2010 06:42:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N6gl3x025362; Sat, 23 Jan 2010 06:42:47 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N6glho025356; Sat, 23 Jan 2010 06:42:47 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001230642.o0N6glho025356@svn.freebsd.org> From: Warner Losh Date: Sat, 23 Jan 2010 06:42: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: r202867 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 06:42:47 -0000 Author: imp Date: Sat Jan 23 06:42:47 2010 New Revision: 202867 URL: http://svn.freebsd.org/changeset/base/202867 Log: Eliminate octeonregs.h. It was a copy of maltaregs.h with s/malta/octeon/gi done... Deleted: head/sys/mips/cavium/octeonreg.h Modified: head/sys/mips/cavium/obio.c head/sys/mips/cavium/octeon_machdep.c head/sys/mips/cavium/octeon_pcmap_regs.h head/sys/mips/cavium/uart_bus_octeonusart.c head/sys/mips/cavium/uart_cpu_octeonusart.c Modified: head/sys/mips/cavium/obio.c ============================================================================== --- head/sys/mips/cavium/obio.c Sat Jan 23 06:29:34 2010 (r202866) +++ head/sys/mips/cavium/obio.c Sat Jan 23 06:42:47 2010 (r202867) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include int obio_probe(device_t); @@ -81,7 +81,7 @@ obio_attach(device_t dev) struct obio_softc *sc = device_get_softc(dev); sc->oba_st = mips_bus_space_generic; - sc->oba_addr = OCTEON_UART0ADR; + sc->oba_addr = OCTEON_MIO_UART0; sc->oba_size = 0x10000; sc->oba_rman.rm_type = RMAN_ARRAY; sc->oba_rman.rm_descr = "OBIO I/O"; @@ -126,7 +126,8 @@ obio_alloc_resource(device_t bus, device case SYS_RES_IOPORT: rm = &sc->oba_rman; bt = sc->oba_st; - bh = device_get_unit(child) ? OCTEON_UART1ADR : OCTEON_UART0ADR; + bh = device_get_unit(child) ? + OCTEON_MIO_UART1 : OCTEON_MIO_UART0; start = bh; break; default: Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 06:29:34 2010 (r202866) +++ head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 06:42:47 2010 (r202867) @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/mips/cavium/octeon_pcmap_regs.h ============================================================================== --- head/sys/mips/cavium/octeon_pcmap_regs.h Sat Jan 23 06:29:34 2010 (r202866) +++ head/sys/mips/cavium/octeon_pcmap_regs.h Sat Jan 23 06:42:47 2010 (r202867) @@ -52,8 +52,7 @@ extern struct pcpu *cpuid_to_pcpu[]; #define OCTEON_SYNCW __asm __volatile (".word 0x10f" : : ) #define OCTEON_SYNCWS __asm __volatile (".word 0x14f" : : ) -//#if defined(__mips_n32) || defined(__mips_n64) -#if defined(__not_used) +#if defined(__mips_n32) || defined(__mips_n64) static inline void oct_write64 (uint64_t csr_addr, uint64_t val64) { @@ -951,6 +950,8 @@ typedef union { /* * Octeon UART unit */ +#define OCTEON_MIO_UART0 0x8001180000000800ull +#define OCTEON_MIO_UART1 0x8001180000000C00ull #define OCTEON_MIO_UART0_THR 0x8001180000000840ull #define OCTEON_MIO_UART1_THR 0x8001180000000C40ull #define OCTEON_MIO_UART0_LSR 0x8001180000000828ull @@ -960,6 +961,7 @@ typedef union { #define OCTEON_MIO_UART0_USR 0x8001180000000938ull #define OCTEON_MIO_UART1_USR 0x8001180000000D38ull #define OCTEON_MIO_ADDR_HI24 0x800118 +#define OCTEON_MIO_UART_SIZE 0x400ull /* Modified: head/sys/mips/cavium/uart_bus_octeonusart.c ============================================================================== --- head/sys/mips/cavium/uart_bus_octeonusart.c Sat Jan 23 06:29:34 2010 (r202866) +++ head/sys/mips/cavium/uart_bus_octeonusart.c Sat Jan 23 06:42:47 2010 (r202867) @@ -53,10 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include -/* - * XXXMIPS: - */ -#include +#include #include "uart_if.h" @@ -96,7 +93,6 @@ uart_octeon_probe(device_t dev) sc = device_get_softc(dev); sc->sc_class = &uart_oct16550_class; -#if 1 /* * We inherit the settings from the systme console. Note, the bst * bad bus_space_map are bogus here, but obio doesn't yet support @@ -105,10 +101,9 @@ uart_octeon_probe(device_t dev) sc->sc_sysdev = SLIST_FIRST(&uart_sysdevs); bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); sc->sc_bas.bst = uart_bus_space_mem; - if (bus_space_map(sc->sc_bas.bst, OCTEON_UART0ADR, OCTEON_UART_SIZE, + if (bus_space_map(sc->sc_bas.bst, OCTEON_MIO_UART0, OCTEON_MIO_UART_SIZE, 0, &sc->sc_bas.bsh) != 0) return (ENXIO); -#endif return (uart_bus_probe(dev, sc->sc_bas.regshft, 0, 0, unit)); } Modified: head/sys/mips/cavium/uart_cpu_octeonusart.c ============================================================================== --- head/sys/mips/cavium/uart_cpu_octeonusart.c Sat Jan 23 06:29:34 2010 (r202866) +++ head/sys/mips/cavium/uart_cpu_octeonusart.c Sat Jan 23 06:42:47 2010 (r202867) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include bus_space_tag_t uart_bus_space_io; @@ -177,7 +176,7 @@ uart_cpu_getdev(int devtype, struct uart */ di->ops = uart_getops(class); di->bas.chan = 0; - if (bus_space_map(di->bas.bst, OCTEON_UART0ADR, OCTEON_UART_SIZE, + if (bus_space_map(di->bas.bst, OCTEON_MIO_UART0, OCTEON_MIO_UART_SIZE, 0, &di->bas.bsh) != 0) return (ENXIO); di->bas.regshft = 0; From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 07:52:13 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E947106566C; Sat, 23 Jan 2010 07:52:13 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 751598FC14; Sat, 23 Jan 2010 07:52:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7qDJ8040484; Sat, 23 Jan 2010 07:52:13 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7qD5Q040482; Sat, 23 Jan 2010 07:52:13 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001230752.o0N7qD5Q040482@svn.freebsd.org> From: Tim Kientzle Date: Sat, 23 Jan 2010 07:52:13 +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: r202868 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 07:52:13 -0000 Author: kientzle Date: Sat Jan 23 07:52:13 2010 New Revision: 202868 URL: http://svn.freebsd.org/changeset/base/202868 Log: Fix a memory leak when a filter fails to initialize. Modified: head/lib/libarchive/archive_read.c Modified: head/lib/libarchive/archive_read.c ============================================================================== --- head/lib/libarchive/archive_read.c Sat Jan 23 06:42:47 2010 (r202867) +++ head/lib/libarchive/archive_read.c Sat Jan 23 07:52:13 2010 (r202868) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); static int build_stream(struct archive_read *); static int choose_format(struct archive_read *); +static int cleanup_filters(struct archive_read *); static struct archive_vtable *archive_read_vtable(void); static int _archive_read_close(struct archive *); static int _archive_read_finish(struct archive *); @@ -393,14 +394,13 @@ build_stream(struct archive_read *a) free(filter); return (r); } + a->filter = filter; /* Verify the filter by asking it for some data. */ __archive_read_filter_ahead(filter, 1, &avail); if (avail < 0) { - /* If the read failed, bail out now. */ - free(filter); - return (avail); + cleanup_filters(a); + return (ARCHIVE_FATAL); } - a->filter = filter; } } @@ -738,18 +738,10 @@ _archive_read_close(struct archive *_a) /* TODO: Clean up the formatters. */ - /* Clean up the filter pipeline. */ - while (a->filter != NULL) { - struct archive_read_filter *t = a->filter->upstream; - if (a->filter->close != NULL) { - r1 = (a->filter->close)(a->filter); - if (r1 < r) - r = r1; - } - free(a->filter->buffer); - free(a->filter); - a->filter = t; - } + /* Release the filter objects. */ + r1 = cleanup_filters(a); + if (r1 < r) + r = r1; /* Release the bidder objects. */ n = sizeof(a->bidders)/sizeof(a->bidders[0]); @@ -764,6 +756,25 @@ _archive_read_close(struct archive *_a) return (r); } +static int +cleanup_filters(struct archive_read *a) +{ + int r = ARCHIVE_OK; + /* Clean up the filter pipeline. */ + while (a->filter != NULL) { + struct archive_read_filter *t = a->filter->upstream; + if (a->filter->close != NULL) { + int r1 = (a->filter->close)(a->filter); + if (r1 < r) + r = r1; + } + free(a->filter->buffer); + free(a->filter); + a->filter = t; + } + return r; +} + /* * Release memory and other resources. */ From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 07:52:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5516C106568D; Sat, 23 Jan 2010 07:52:45 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 458F78FC27; Sat, 23 Jan 2010 07:52:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7qjw2040649; Sat, 23 Jan 2010 07:52:45 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7qjvS040647; Sat, 23 Jan 2010 07:52:45 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001230752.o0N7qjvS040647@svn.freebsd.org> From: Tim Kientzle Date: Sat, 23 Jan 2010 07:52:45 +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: r202869 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 07:52:45 -0000 Author: kientzle Date: Sat Jan 23 07:52:44 2010 New Revision: 202869 URL: http://svn.freebsd.org/changeset/base/202869 Log: Initialize the allocated 'struct zip'. Modified: head/lib/libarchive/archive_write_set_format_zip.c Modified: head/lib/libarchive/archive_write_set_format_zip.c ============================================================================== --- head/lib/libarchive/archive_write_set_format_zip.c Sat Jan 23 07:52:13 2010 (r202868) +++ head/lib/libarchive/archive_write_set_format_zip.c Sat Jan 23 07:52:44 2010 (r202869) @@ -231,7 +231,7 @@ archive_write_set_format_zip(struct arch if (a->format_destroy != NULL) (a->format_destroy)(a); - zip = (struct zip *) malloc(sizeof(*zip)); + zip = (struct zip *) calloc(1, sizeof(*zip)); if (zip == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate zip data"); return (ARCHIVE_FATAL); From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 07:54:07 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BF3D106568D; Sat, 23 Jan 2010 07:54:07 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B0058FC22; Sat, 23 Jan 2010 07:54:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7s753040991; Sat, 23 Jan 2010 07:54:07 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7s70b040987; Sat, 23 Jan 2010 07:54:07 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201001230754.o0N7s70b040987@svn.freebsd.org> From: Joerg Wunsch Date: Sat, 23 Jan 2010 07:54: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: r202870 - head/sys/dev/ieee488 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 07:54:07 -0000 Author: joerg Date: Sat Jan 23 07:54:06 2010 New Revision: 202870 URL: http://svn.freebsd.org/changeset/base/202870 Log: Overhaul of the pcii driver: . Properly allocate all IO space resources. These cards scatter their IO addresses over a range of 0x1600 bytes, and they require an additional address for "special interrupt handling". . Implement the "special interrupt handling" per the GPIB-PCIIA Technical Reference Manual; this was apparently not declared for the clone card this driver has been originally implemented for, but it turned out to be needed for both, an original NI brand PCII/PCIIA card as well as the Axiom AX5488 clone. . Add some diagnostic messages for various resource allocation etc. failures during probe. . Add some comments about the structure of the IO address space that is used by these cards. MFC after: 1 day Modified: head/sys/dev/ieee488/pcii.c head/sys/dev/ieee488/upd7210.c head/sys/dev/ieee488/upd7210.h Modified: head/sys/dev/ieee488/pcii.c ============================================================================== --- head/sys/dev/ieee488/pcii.c Sat Jan 23 07:52:44 2010 (r202869) +++ head/sys/dev/ieee488/pcii.c Sat Jan 23 07:54:06 2010 (r202870) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2005 Poul-Henning Kamp + * Copyright (c) 2010 Joerg Wunsch * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,6 +34,8 @@ * * Tested and known working: * "B&C Microsystems PC488A-0" + * "National Instruments GPIB-PCII/PCIIA" (in PCIIa mode) + * "Axiom AX5488" * */ @@ -56,7 +59,7 @@ __FBSDID("$FreeBSD$"); struct pcii_softc { int foo; - struct resource *res[3]; + struct resource *res[11]; void *intr_handler; struct upd7210 upd7210; }; @@ -79,6 +82,14 @@ static struct resource_spec pcii_res_spe { SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE}, { SYS_RES_DRQ, 0, RF_ACTIVE | RF_SHAREABLE | RF_OPTIONAL}, { SYS_RES_IOPORT, 0, RF_ACTIVE}, + { SYS_RES_IOPORT, 1, RF_ACTIVE}, + { SYS_RES_IOPORT, 2, RF_ACTIVE}, + { SYS_RES_IOPORT, 3, RF_ACTIVE}, + { SYS_RES_IOPORT, 4, RF_ACTIVE}, + { SYS_RES_IOPORT, 5, RF_ACTIVE}, + { SYS_RES_IOPORT, 6, RF_ACTIVE}, + { SYS_RES_IOPORT, 7, RF_ACTIVE}, + { SYS_RES_IOPORT, 8, RF_ACTIVE | RF_SHAREABLE}, { -1, 0, 0 } }; @@ -92,7 +103,7 @@ static int pcii_probe(device_t dev) { int rid, i, j; - u_long start, count; + u_long start, count, addr; int error = 0; struct pcii_softc *sc; @@ -102,30 +113,89 @@ pcii_probe(device_t dev) rid = 0; if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &start, &count) != 0) return ENXIO; - if ((start & 0x3ff) != 0x2e1) + /* + * The PCIIA decodes a fixed pattern of 0x2e1 for the lower 10 + * address bits A0 ... A9. Bits A10 through A12 are used by + * the µPD7210 register select lines. This makes the + * individual 7210 register being 0x400 bytes apart in the ISA + * bus address space. Address bits A13 and A14 are compared + * to a DIP switch setting on the card, allowing for up to 4 + * different cards being installed (at base addresses 0x2e1, + * 0x22e1, 0x42e1, and 0x62e1, respectively). A15 has been + * used to select an optional on-board time-of-day clock chip + * (MM58167A) on the original PCIIA rather than the µPD7210 + * (which is not implemented on later boards). The + * documentation states the respective addresses for that chip + * should be handled as reserved addresses, which we don't do + * (right now). Finally, the IO addresses 0x2f0 ... 0x2f7 for + * a "special interrupt handling feature" (re-enable + * interrupts so the IRQ can be shared). + * + * Usually, the user will only set the base address in the + * device hints, so we handle the rest here. + * + * (Source: GPIB-PCIIA Technical Reference Manual, September + * 1989 Edition, National Instruments.) + */ + if ((start & 0x3ff) != 0x2e1) { + printf("pcii_probe: PCIIA base address 0x%lx not " + "0x2e1/0x22e1/0x42e1/0x62e1\n", + start); return (ENXIO); - count = 1; - if (bus_set_resource(dev, SYS_RES_IOPORT, rid, start, count) != 0) + } + + for (rid = 0, addr = start; rid < 8; rid++, addr += 0x400) { + if (bus_set_resource(dev, SYS_RES_IOPORT, rid, addr, 1) != 0) { + printf("pcii_probe: could not set IO port 0x%lx\n", + addr); + return (ENXIO); + } + } + if (bus_get_resource(dev, SYS_RES_IRQ, 0, &start, &count) != 0) { + printf("pcii_probe: cannot obtain IRQ level\n"); + return ENXIO; + } + if (start > 7) { + printf("pcii_probe: IRQ level %lu too high\n", start); return ENXIO; + } + + if (bus_set_resource(dev, SYS_RES_IOPORT, 8, 0x2f0 + start, 1) != 0) { + printf("pcii_probe: could not set IO port 0x%3lx\n", + 0x2f0 + start); + return (ENXIO); + } + error = bus_alloc_resources(dev, pcii_res_spec, sc->res); - if (error) + if (error) { + printf("pcii_probe: Could not allocate resources\n"); return (error); + } error = ENXIO; + /* + * Perform some basic tests on the µPD7210 registers. At + * least *some* register must read different from 0x00 or + * 0xff. + */ for (i = 0; i < 8; i++) { - j = bus_read_1(sc->res[2], i * 0x400); + j = bus_read_1(sc->res[2 + i], 0); if (j != 0x00 && j != 0xff) error = 0; } + /* SPSR/SPMR read/write test */ if (!error) { - bus_write_1(sc->res[2], 3 * 0x400, 0x55); - if (bus_read_1(sc->res[2], 3 * 0x400) != 0x55) + bus_write_1(sc->res[2 + 3], 0, 0x55); + if (bus_read_1(sc->res[2 + 3], 0) != 0x55) error = ENXIO; } if (!error) { - bus_write_1(sc->res[2], 3 * 0x400, 0xaa); - if (bus_read_1(sc->res[2], 3 * 0x400) != 0xaa) + bus_write_1(sc->res[2 + 3], 0, 0xaa); + if (bus_read_1(sc->res[2 + 3], 0) != 0xaa) error = ENXIO; } + if (error) + printf("pcii_probe: probe failure\n"); + bus_release_resources(dev, pcii_res_spec, sc->res); return (error); } @@ -134,6 +204,7 @@ static int pcii_attach(device_t dev) { struct pcii_softc *sc; + u_long start, count; int unit; int rid; int error = 0; @@ -144,6 +215,11 @@ pcii_attach(device_t dev) device_set_desc(dev, "PCII IEEE-4888 controller"); + if (bus_get_resource(dev, SYS_RES_IRQ, 0, &start, &count) != 0) { + printf("pcii_attach: cannot obtain IRQ number\n"); + return ENXIO; + } + error = bus_alloc_resources(dev, pcii_res_spec, sc->res); if (error) return (error); @@ -157,9 +233,9 @@ pcii_attach(device_t dev) } for (rid = 0; rid < 8; rid++) { - sc->upd7210.reg_res[rid] = sc->res[2]; - sc->upd7210.reg_offset[rid] = 0x400 * rid; + sc->upd7210.reg_res[rid] = sc->res[2 + rid]; } + sc->upd7210.irq_clear_res = sc->res[10]; if (sc->res[1] == NULL) sc->upd7210.dmachan = -1; Modified: head/sys/dev/ieee488/upd7210.c ============================================================================== --- head/sys/dev/ieee488/upd7210.c Sat Jan 23 07:52:44 2010 (r202869) +++ head/sys/dev/ieee488/upd7210.c Sat Jan 23 07:54:06 2010 (r202870) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2005 Poul-Henning Kamp + * Copyright (c) 2010 Joerg Wunsch * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -71,7 +72,7 @@ upd7210_rd(struct upd7210 *u, enum upd72 { u_int r; - r = bus_read_1(u->reg_res[reg], u->reg_offset[reg]); + r = bus_read_1(u->reg_res[reg], 0); u->rreg[reg] = r; return (r); } @@ -80,7 +81,7 @@ void upd7210_wr(struct upd7210 *u, enum upd7210_wreg reg, u_int val) { - bus_write_1(u->reg_res[reg], u->reg_offset[reg], val); + bus_write_1(u->reg_res[reg], 0, val); u->wreg[reg] = val; if (reg == AUXMR) u->wreg[8 + (val >> 5)] = val & 0x1f; @@ -96,19 +97,35 @@ upd7210intr(void *arg) mtx_lock(&u->mutex); isr1 = upd7210_rd(u, ISR1); isr2 = upd7210_rd(u, ISR2); - if (u->busy == 0 || u->irq == NULL || !u->irq(u, 1)) { + if (isr1 != 0 || isr2 != 0) { + if (u->busy == 0 || u->irq == NULL || !u->irq(u, 1)) { #if 0 - printf("upd7210intr [%02x %02x %02x", - upd7210_rd(u, DIR), isr1, isr2); - printf(" %02x %02x %02x %02x %02x] ", - upd7210_rd(u, SPSR), - upd7210_rd(u, ADSR), - upd7210_rd(u, CPTR), - upd7210_rd(u, ADR0), + printf("upd7210intr [%02x %02x %02x", + upd7210_rd(u, DIR), isr1, isr2); + printf(" %02x %02x %02x %02x %02x] ", + upd7210_rd(u, SPSR), + upd7210_rd(u, ADSR), + upd7210_rd(u, CPTR), + upd7210_rd(u, ADR0), upd7210_rd(u, ADR1)); - upd7210_print_isr(isr1, isr2); - printf("\n"); + upd7210_print_isr(isr1, isr2); + printf("\n"); #endif + } + /* + * "special interrupt handling" + * + * In order to implement shared IRQs, the original + * PCIIa uses IO locations 0x2f0 + (IRQ#) as an output + * location. If an ISR for a particular card has + * detected this card triggered the IRQ, it must reset + * the card's IRQ by writing (anything) to that IO + * location. + * + * Some clones apparently don't implement this + * feature, but National Instrument cards do. + */ + bus_write_1(u->irq_clear_res, 0, 42); } mtx_unlock(&u->mutex); } Modified: head/sys/dev/ieee488/upd7210.h ============================================================================== --- head/sys/dev/ieee488/upd7210.h Sat Jan 23 07:52:44 2010 (r202869) +++ head/sys/dev/ieee488/upd7210.h Sat Jan 23 07:54:06 2010 (r202870) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2005 Poul-Henning Kamp + * Copyright (c) 2010 Joerg Wunsch * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,7 +49,7 @@ typedef int upd7210_irq_t(struct upd7210 struct upd7210 { struct resource *reg_res[8]; - u_int reg_offset[8]; + struct resource *irq_clear_res; int dmachan; int unit; From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 07:54:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DBC710657AB; Sat, 23 Jan 2010 07:54:16 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DAE98FC13; Sat, 23 Jan 2010 07:54:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7sGnX041060; Sat, 23 Jan 2010 07:54:16 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7sGuW041058; Sat, 23 Jan 2010 07:54:16 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001230754.o0N7sGuW041058@svn.freebsd.org> From: Tim Kientzle Date: Sat, 23 Jan 2010 07:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202871 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 07:54:16 -0000 Author: kientzle Date: Sat Jan 23 07:54:15 2010 New Revision: 202871 URL: http://svn.freebsd.org/changeset/base/202871 Log: If we can't stat a file, return the correct ARCHIVE_FAILED (this entry can't be processed any further) and a suitable error string. In particular, this improves the error-reporting when cpio -o is given a nonexistent filename. Modified: head/lib/libarchive/archive_read_disk_entry_from_file.c Modified: head/lib/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- head/lib/libarchive/archive_read_disk_entry_from_file.c Sat Jan 23 07:54:06 2010 (r202870) +++ head/lib/libarchive/archive_read_disk_entry_from_file.c Sat Jan 23 07:54:15 2010 (r202871) @@ -121,18 +121,27 @@ archive_read_disk_entry_from_file(struct */ #if HAVE_FSTAT if (fd >= 0) { - if (fstat(fd, &s) != 0) - return (ARCHIVE_FATAL); + if (fstat(fd, &s) != 0) { + archive_set_error(&a->archive, errno, + "Can't fstat"); + return (ARCHIVE_FAILED); + } } else #endif #if HAVE_LSTAT if (!a->follow_symlinks) { - if (lstat(path, &s) != 0) - return (ARCHIVE_FATAL); + if (lstat(path, &s) != 0) { + archive_set_error(&a->archive, errno, + "Can't lstat %s", path); + return (ARCHIVE_FAILED); + } } else #endif - if (stat(path, &s) != 0) - return (ARCHIVE_FATAL); + if (stat(path, &s) != 0) { + archive_set_error(&a->archive, errno, + "Can't stat %s", path); + return (ARCHIVE_FAILED); + } st = &s; } archive_entry_copy_stat(entry, st); @@ -159,7 +168,7 @@ archive_read_disk_entry_from_file(struct if (lnklen < 0) { archive_set_error(&a->archive, errno, "Couldn't read link data"); - return (ARCHIVE_WARN); + return (ARCHIVE_FAILED); } linkbuffer[lnklen] = 0; archive_entry_set_symlink(entry, linkbuffer); From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 07:55:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53514106568D; Sat, 23 Jan 2010 07:55:54 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42C3E8FC14; Sat, 23 Jan 2010 07:55:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7tsuk041443; Sat, 23 Jan 2010 07:55:54 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7tsx2041441; Sat, 23 Jan 2010 07:55:54 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001230755.o0N7tsx2041441@svn.freebsd.org> From: Tim Kientzle Date: Sat, 23 Jan 2010 07:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202872 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 07:55:54 -0000 Author: kientzle Date: Sat Jan 23 07:55:53 2010 New Revision: 202872 URL: http://svn.freebsd.org/changeset/base/202872 Log: Use a simpler memory-management strategy for the file objects. Instead of trying to reference-count them and free them as soon as they are no longer needed, we now just keep them around and free them all when we release the archive object. This fixes a number of minor memory leaks, especially when reading damaged archives. Modified: head/lib/libarchive/archive_read_support_format_iso9660.c Modified: head/lib/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- head/lib/libarchive/archive_read_support_format_iso9660.c Sat Jan 23 07:54:15 2010 (r202871) +++ head/lib/libarchive/archive_read_support_format_iso9660.c Sat Jan 23 07:55:53 2010 (r202872) @@ -258,9 +258,9 @@ struct content { /* In-memory storage for a directory record. */ struct file_info { + struct file_info *use_next; struct file_info *parent; struct file_info *next; - int refcount; int subdirs; uint64_t key; /* Heap Key. */ uint64_t offset; /* Offset on disk. */ @@ -331,6 +331,7 @@ struct iso9660 { int64_t previous_number; struct archive_string previous_pathname; + struct file_info *use_files; struct heap_queue pending_files; struct { struct file_info *first; @@ -396,7 +397,8 @@ static void parse_rockridge_TF1(struct f const unsigned char *, int); static void parse_rockridge_ZF1(struct file_info *, const unsigned char *, int); -static void release_file(struct iso9660 *, struct file_info *); +static void register_file(struct iso9660 *, struct file_info *); +static void release_files(struct iso9660 *); static unsigned toi(const void *p, int n); static inline void cache_add_entry(struct iso9660 *iso9660, struct file_info *file); @@ -980,7 +982,6 @@ read_children(struct archive_read *a, st } con = malloc(sizeof(struct content)); if (con == NULL) { - release_file(iso9660, child); archive_set_error( &a->archive, ENOMEM, "No memory for " @@ -998,7 +999,6 @@ read_children(struct archive_read *a, st multi->size += child->size; if (!child->multi_extent) multi = NULL; - release_file(iso9660, child); } } else add_entry(iso9660, child); @@ -1029,10 +1029,8 @@ relocate_dir(struct iso9660 *iso9660, st /* This case is wrong pattern. */ return (0); if (re->offset == file->cl_offset) { - re->parent->refcount--; re->parent->subdirs--; re->parent = file->parent; - re->parent->refcount++; re->parent->subdirs++; cache_add_to_next_of_parent(iso9660, re); return (1); @@ -1077,10 +1075,8 @@ read_entries(struct archive_read *a) /* * Relocate directory which rr_moved has. */ - while ((file = heap_get_entry(&(iso9660->cl_files))) != NULL) { + while ((file = heap_get_entry(&(iso9660->cl_files))) != NULL) relocate_dir(iso9660, file); - release_file(iso9660, file); - } /* If rr_moved directory still has children, * Add rr_moved into pending_files to show @@ -1092,10 +1088,8 @@ read_entries(struct archive_read *a) * is broken), the entries won't be exposed. */ while ((file = heap_get_entry(&(iso9660->re_dirs))) != NULL) cache_add_entry(iso9660, file); - } else { + } else iso9660->rr_moved->parent->subdirs--; - release_file(iso9660, iso9660->rr_moved); - } } else { /* * In case ISO image is broken. If the name of rr_moved @@ -1174,7 +1168,6 @@ archive_read_format_iso9660_read_header( if (vd == &(iso9660->primary) && !iso9660->seenRockridge && iso9660->seenJoliet) { /* Switch reading data from primary to joliet. */ - release_file(iso9660, file); vd = &(iso9660->joliet); skipsize = LOGICAL_BLOCK_SIZE * vd->location; skipsize -= iso9660->current_position; @@ -1214,10 +1207,8 @@ archive_read_format_iso9660_read_header( /* Get the next entry that appears after the current offset. */ r = next_entry_seek(a, iso9660, &file); - if (r != ARCHIVE_OK) { - release_file(iso9660, file); + if (r != ARCHIVE_OK) return (r); - } iso9660->entry_bytes_remaining = file->size; iso9660->entry_sparse_offset = 0; /* Offset for sparse-file-aware clients. */ @@ -1227,7 +1218,6 @@ archive_read_format_iso9660_read_header( "File is beyond end-of-media: %s", file->name); iso9660->entry_bytes_remaining = 0; iso9660->entry_sparse_offset = 0; - release_file(iso9660, file); return (ARCHIVE_WARN); } @@ -1263,7 +1253,6 @@ archive_read_format_iso9660_read_header( archive_entry_unset_size(entry); iso9660->entry_bytes_remaining = 0; iso9660->entry_sparse_offset = 0; - release_file(iso9660, file); return (ARCHIVE_OK); } @@ -1291,7 +1280,6 @@ archive_read_format_iso9660_read_header( file->offset, iso9660->current_position); iso9660->entry_bytes_remaining = 0; iso9660->entry_sparse_offset = 0; - release_file(iso9660, file); return (ARCHIVE_WARN); } @@ -1331,8 +1319,6 @@ archive_read_format_iso9660_read_header( file->exposed = 1; } - release_file(iso9660, file); - if (rd_r != ARCHIVE_OK) return (rd_r); return (ARCHIVE_OK); @@ -1648,14 +1634,10 @@ static int archive_read_format_iso9660_cleanup(struct archive_read *a) { struct iso9660 *iso9660; - struct file_info *file; int r = ARCHIVE_OK; iso9660 = (struct iso9660 *)(a->format->data); - while ((file = cache_get_entry(iso9660)) != NULL) - release_file(iso9660, file); - while ((file = next_entry(iso9660)) != NULL) - release_file(iso9660, file); + release_files(iso9660); free(iso9660->read_ce_req.reqs); archive_string_free(&iso9660->pathname); archive_string_free(&iso9660->previous_pathname); @@ -1736,8 +1718,6 @@ parse_file_info(struct archive_read *a, } memset(file, 0, sizeof(*file)); file->parent = parent; - if (parent != NULL) - parent->refcount++; file->offset = iso9660->logical_block_size * (uint64_t)location; file->size = toi(isodirrec + DR_size_offset, DR_size_size); file->mtime = isodate7(isodirrec + DR_date_offset); @@ -1869,8 +1849,6 @@ parse_file_info(struct archive_read *a, rr_start += iso9660->suspOffset; r = parse_rockridge(a, file, rr_start, rr_end); if (r != ARCHIVE_OK) { - if (parent != NULL) - parent->refcount--; free(file); return (NULL); } @@ -1880,6 +1858,7 @@ parse_file_info(struct archive_read *a, iso9660->opt_support_rockridge = 0; } + file->nlinks = 1;/* Reset nlink. we'll calculate it later. */ /* Tell file's parent how many children that parent has. */ if (parent != NULL && (flags & 0x02) && file->cl_offset == 0) parent->subdirs++; @@ -1908,6 +1887,7 @@ parse_file_info(struct archive_read *a, fprintf(stderr, "\n"); } #endif + register_file(iso9660, file); return (file); } @@ -2460,18 +2440,24 @@ parse_rockridge_ZF1(struct file_info *fi } } +static void +register_file(struct iso9660 *iso9660, struct file_info *file) +{ + + file->use_next = iso9660->use_files; + iso9660->use_files = file; +} static void -release_file(struct iso9660 *iso9660, struct file_info *file) +release_files(struct iso9660 *iso9660) { - struct file_info *parent; struct content *con, *connext; + struct file_info *file; - if (file == NULL) - return; + file = iso9660->use_files; + while (file != NULL) { + struct file_info *next = file->use_next; - if (file->refcount == 0) { - parent = file->parent; archive_string_free(&file->name); archive_string_free(&file->symlink); con = file->contents.first; @@ -2481,10 +2467,7 @@ release_file(struct iso9660 *iso9660, st con = connext; } free(file); - if (parent != NULL) { - parent->refcount--; - release_file(iso9660, parent); - } + file = next; } } @@ -2568,7 +2551,6 @@ next_cache_entry(struct iso9660 *iso9660 * happen. */ file->next = NULL; - file->refcount++; *empty_files.last = file; empty_files.last = &(file->next); } else { @@ -2611,7 +2593,6 @@ static inline void cache_add_entry(struct iso9660 *iso9660, struct file_info *file) { file->next = NULL; - file->refcount++; *iso9660->cache_files.last = file; iso9660->cache_files.last = &(file->next); } @@ -2621,7 +2602,6 @@ cache_add_to_next_of_parent(struct iso96 { file->next = file->parent->next; file->parent->next = file; - file->refcount++; if (iso9660->cache_files.last == &(file->parent->next)) iso9660->cache_files.last = &(file->next); } @@ -2633,7 +2613,6 @@ cache_get_entry(struct iso9660 *iso9660) if ((file = iso9660->cache_files.first) != NULL) { iso9660->cache_files.first = file->next; - file->refcount--; if (iso9660->cache_files.first == NULL) iso9660->cache_files.last = &(iso9660->cache_files.first); } @@ -2669,7 +2648,6 @@ heap_add_entry(struct heap_queue *heap, } file_key = file->key = key; - file->refcount++; /* * Start with hole at end, walk it up tree to find insertion point. @@ -2703,7 +2681,6 @@ heap_get_entry(struct heap_queue *heap) * The first file in the list is the earliest; we'll return this. */ r = heap->files[0]; - r->refcount--; /* * Move the last item in the heap to the root of the tree From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 07:57:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B41BE1065672; Sat, 23 Jan 2010 07:57:17 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A45808FC12; Sat, 23 Jan 2010 07:57:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7vHGM041805; Sat, 23 Jan 2010 07:57:17 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7vHTM041803; Sat, 23 Jan 2010 07:57:17 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001230757.o0N7vHTM041803@svn.freebsd.org> From: Tim Kientzle Date: Sat, 23 Jan 2010 07:57: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: r202873 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 07:57:17 -0000 Author: kientzle Date: Sat Jan 23 07:57:17 2010 New Revision: 202873 URL: http://svn.freebsd.org/changeset/base/202873 Log: Don't try to hardlink block or character device nodes that come out of cpio archives. Modified: head/lib/libarchive/archive_entry_link_resolver.c Modified: head/lib/libarchive/archive_entry_link_resolver.c ============================================================================== --- head/lib/libarchive/archive_entry_link_resolver.c Sat Jan 23 07:55:53 2010 (r202872) +++ head/lib/libarchive/archive_entry_link_resolver.c Sat Jan 23 07:57:17 2010 (r202873) @@ -181,8 +181,10 @@ archive_entry_linkify(struct archive_ent /* If it has only one link, then we're done. */ if (archive_entry_nlink(*e) == 1) return; - /* Directories never have hardlinks. */ - if (archive_entry_filetype(*e) == AE_IFDIR) + /* Directories, devices never have hardlinks. */ + if (archive_entry_filetype(*e) == AE_IFDIR + || archive_entry_filetype(*e) == AE_IFBLK + || archive_entry_filetype(*e) == AE_IFCHR) return; switch (res->strategy) { From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 08:15:11 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3787D106566C; Sat, 23 Jan 2010 08:15:11 +0000 (UTC) (envelope-from j@uriah.heep.sax.de) Received: from uriah.heep.sax.de (uriah.heep.sax.de [213.240.137.9]) by mx1.freebsd.org (Postfix) with ESMTP id D87CF8FC20; Sat, 23 Jan 2010 08:15:10 +0000 (UTC) Received: by uriah.heep.sax.de (Postfix, from userid 107) id 63DE613; Sat, 23 Jan 2010 08:56:39 +0100 (MET) Date: Sat, 23 Jan 2010 08:56:39 +0100 From: Joerg Wunsch To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100123075639.GA52582@uriah.heep.sax.de> References: <201001230754.o0N7s70b040987@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001230754.o0N7s70b040987@svn.freebsd.org> X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-GPG-Fingerprint: 5E84 F980 C3CA FD4B B584 1070 F48C A81B 69A8 5873 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r202870 - head/sys/dev/ieee488 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Joerg Wunsch List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 08:15:11 -0000 As Joerg Wunsch wrote: > . Implement the "special interrupt handling" per the GPIB-PCIIA > Technical Reference Manual; this was apparently not declared for the > clone card this driver has been originally implemented for, [...] s/declared/required/ -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 08:43:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5319106566C; Sat, 23 Jan 2010 08:43:21 +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 C59F38FC08; Sat, 23 Jan 2010 08:43:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N8hLpZ052183; Sat, 23 Jan 2010 08:43:21 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N8hLrY052179; Sat, 23 Jan 2010 08:43:21 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001230843.o0N8hLrY052179@svn.freebsd.org> From: Ed Schouten Date: Sat, 23 Jan 2010 08:43:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202876 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 08:43:21 -0000 Author: ed Date: Sat Jan 23 08:43:21 2010 New Revision: 202876 URL: http://svn.freebsd.org/changeset/base/202876 Log: Just ignore the timestamps given to pututxline(). I've noticed many applications do a bad job at timekeeping, for several reasons: - Applications like screen(1) don't update time records when restoring the old user login record. - Many applications only set ut_tv.tv_sec, not ut_tv.tv_usec. This causes many problems for tools such as ac(8), which require the timestamps to be properly ordered. This is why I've decided to let the utmpx code obtain valid timestamps itself. Modified: head/lib/libc/gen/getutxent.3 head/lib/libc/gen/pututxline.c head/lib/libc/gen/utxdb.c Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Sat Jan 23 08:43:11 2010 (r202875) +++ head/lib/libc/gen/getutxent.3 Sat Jan 23 08:43:21 2010 (r202876) @@ -311,13 +311,9 @@ will only be written to Entries of type .Dv USER_PROCESS will also be written to -.Pa /var/run/utx.active . -It will only be written to -.Pa /var/log/utx.lastlogin -if -.Fa ut_tv -for that user has a greater value than the existing entry or when no -entry for the user has been found. +.Pa /var/run/utx.active +and +.Pa /var/log/utx.lastlogin . .Pp Entries of type .Dv DEAD_PROCESS @@ -345,6 +341,8 @@ to be discarded. All entries whose type has not been mentioned previously, are discarded by this implementation of .Fn pututxline . +This implementation also ignores the value of +.Fa ut_tv . .Sh RETURN VALUES The .Fn getutxent , Modified: head/lib/libc/gen/pututxline.c ============================================================================== --- head/lib/libc/gen/pututxline.c Sat Jan 23 08:43:11 2010 (r202875) +++ head/lib/libc/gen/pututxline.c Sat Jan 23 08:43:21 2010 (r202876) @@ -132,13 +132,6 @@ utx_active_remove(struct futx *fu) if (memcmp(fu->fu_id, fe.fu_id, sizeof fe.fu_id) != 0) continue; - /* - * Prevent login sessions from having a negative - * timespan. - */ - if (be64toh(fu->fu_tv) < be64toh(fe.fu_tv)) - fu->fu_tv = fe.fu_tv; - /* Terminate session. */ fseeko(fp, -(off_t)sizeof fe, SEEK_CUR); fwrite(fu, sizeof *fu, 1, fp); @@ -175,17 +168,12 @@ utx_lastlogin_add(const struct futx *fu) while (fread(&fe, sizeof fe, 1, fp) == 1) { if (strncmp(fu->fu_user, fe.fu_user, sizeof fe.fu_user) != 0) continue; - - /* Prevent lowering the time value. */ - if (be64toh(fu->fu_tv) <= be64toh(fe.fu_tv)) - goto done; /* Found a previous lastlogin entry for this user. */ fseeko(fp, -(off_t)sizeof fe, SEEK_CUR); break; } fwrite(fu, sizeof *fu, 1, fp); -done: fclose(fp); } Modified: head/lib/libc/gen/utxdb.c ============================================================================== --- head/lib/libc/gen/utxdb.c Sat Jan 23 08:43:11 2010 (r202875) +++ head/lib/libc/gen/utxdb.c Sat Jan 23 08:43:21 2010 (r202876) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include #include #include #include @@ -50,9 +51,11 @@ __FBSDID("$FreeBSD$"); #define UTOF_TYPE(ut, fu) do { \ (fu)->fu_type = (ut)->ut_type; \ } while (0) -#define UTOF_TV(ut, fu) do { \ - (fu)->fu_tv = htobe64((uint64_t)(ut)->ut_tv.tv_sec * 1000000 + \ - (uint64_t)(ut)->ut_tv.tv_usec); \ +#define UTOF_TV(fu) do { \ + struct timeval tv; \ + gettimeofday(&tv, NULL); \ + (fu)->fu_tv = htobe64((uint64_t)tv.tv_sec * 1000000 + \ + (uint64_t)tv.tv_usec); \ } while (0) void @@ -96,7 +99,7 @@ utx_to_futx(const struct utmpx *ut, stru } UTOF_TYPE(ut, fu); - UTOF_TV(ut, fu); + UTOF_TV(fu); } #define FTOU_STRING(fu, ut, field) do { \ From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 11:42:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 880D2106568D; Sat, 23 Jan 2010 11:42:31 +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 774608FC1C; Sat, 23 Jan 2010 11:42:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NBgVYi094079; Sat, 23 Jan 2010 11:42:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NBgVxb094077; Sat, 23 Jan 2010 11:42:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001231142.o0NBgVxb094077@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Jan 2010 11:42: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: r202880 - head/etc/rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 11:42:31 -0000 Author: kib Date: Sat Jan 23 11:42:31 2010 New Revision: 202880 URL: http://svn.freebsd.org/changeset/base/202880 Log: Do not check for existence of symlink source for the link action. This does not work for link in subdirectory, and sometimes it is useful to create symlink in advance for dynamically created device node. MFC after: 1 week Modified: head/etc/rc.d/devfs Modified: head/etc/rc.d/devfs ============================================================================== --- head/etc/rc.d/devfs Sat Jan 23 11:10:26 2010 (r202879) +++ head/etc/rc.d/devfs Sat Jan 23 11:42:31 2010 (r202880) @@ -44,7 +44,7 @@ read_devfs_conf() while read action devicelist parameter; do case "${action}" in l*) for device in ${devicelist}; do - if [ -c ${device} -a ! -e ${parameter} ]; then + if [ ! -e ${parameter} ]; then ln -fs ${device} ${parameter} fi done From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 11:43:30 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD723106566C; Sat, 23 Jan 2010 11:43:30 +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 AC18B8FC08; Sat, 23 Jan 2010 11:43:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NBhUvq094344; Sat, 23 Jan 2010 11:43:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NBhUJI094341; Sat, 23 Jan 2010 11:43:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001231143.o0NBhUJI094341@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Jan 2010 11:43:30 +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: r202881 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 11:43:30 -0000 Author: kib Date: Sat Jan 23 11:43:30 2010 New Revision: 202881 URL: http://svn.freebsd.org/changeset/base/202881 Log: Staticise sigqueue manipulation functions used only in kern_sig.c. MFC after: 1 week Modified: head/sys/kern/kern_sig.c head/sys/sys/signalvar.h Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sat Jan 23 11:42:31 2010 (r202880) +++ head/sys/kern/kern_sig.c Sat Jan 23 11:43:30 2010 (r202881) @@ -279,7 +279,7 @@ sigqueue_init(sigqueue_t *list, struct p * 0 - signal not found * others - signal number */ -int +static int sigqueue_get(sigqueue_t *sq, int signo, ksiginfo_t *si) { struct proc *p = sq->sq_proc; @@ -341,7 +341,7 @@ sigqueue_take(ksiginfo_t *ksi) SIGDELSET(sq->sq_signals, ksi->ksi_signo); } -int +static int sigqueue_add(sigqueue_t *sq, int signo, ksiginfo_t *si) { struct proc *p = sq->sq_proc; @@ -426,7 +426,7 @@ sigqueue_flush(sigqueue_t *sq) SIGEMPTYSET(sq->sq_kill); } -void +static void sigqueue_collect_set(sigqueue_t *sq, sigset_t *set) { ksiginfo_t *ksi; @@ -438,7 +438,7 @@ sigqueue_collect_set(sigqueue_t *sq, sig SIGSETOR(*set, sq->sq_kill); } -void +static void sigqueue_move_set(sigqueue_t *src, sigqueue_t *dst, sigset_t *setp) { sigset_t tmp, set; @@ -482,7 +482,7 @@ sigqueue_move_set(sigqueue_t *src, sigqu sigqueue_collect_set(src, &src->sq_signals); } -void +static void sigqueue_move(sigqueue_t *src, sigqueue_t *dst, int signo) { sigset_t set; @@ -492,7 +492,7 @@ sigqueue_move(sigqueue_t *src, sigqueue_ sigqueue_move_set(src, dst, &set); } -void +static void sigqueue_delete_set(sigqueue_t *sq, sigset_t *set) { struct proc *p = sq->sq_proc; @@ -526,7 +526,7 @@ sigqueue_delete(sigqueue_t *sq, int sign } /* Remove a set of signals for a process */ -void +static void sigqueue_delete_set_proc(struct proc *p, sigset_t *set) { sigqueue_t worklist; @@ -553,7 +553,7 @@ sigqueue_delete_proc(struct proc *p, int sigqueue_delete_set_proc(p, &set); } -void +static void sigqueue_delete_stopmask_proc(struct proc *p) { sigset_t set; Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Sat Jan 23 11:42:31 2010 (r202880) +++ head/sys/sys/signalvar.h Sat Jan 23 11:43:30 2010 (r202881) @@ -355,18 +355,10 @@ void ksiginfo_free(ksiginfo_t *); void sigqueue_init(struct sigqueue *queue, struct proc *p); void sigqueue_flush(struct sigqueue *queue); void sigqueue_delete_proc(struct proc *p, int sig); -void sigqueue_delete_set(struct sigqueue *queue, sigset_t *set); void sigqueue_delete(struct sigqueue *queue, int sig); -void sigqueue_move_set(struct sigqueue *src, sigqueue_t *dst, sigset_t *); -int sigqueue_get(struct sigqueue *queue, int sig, ksiginfo_t *info); -int sigqueue_add(struct sigqueue *queue, int sig, ksiginfo_t *info); -void sigqueue_collect_set(struct sigqueue *queue, sigset_t *set); -void sigqueue_move(struct sigqueue *, struct sigqueue *, int sig); -void sigqueue_delete_set_proc(struct proc *, sigset_t *); -void sigqueue_delete_stopmask_proc(struct proc *); void sigqueue_take(ksiginfo_t *ksi); int kern_sigtimedwait(struct thread *, sigset_t, - ksiginfo_t *, struct timespec *); + ksiginfo_t *, struct timespec *); int kern_sigprocmask(struct thread *td, int how, sigset_t *set, sigset_t *oset, int flags); /* From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 11:45:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8B79106566B; Sat, 23 Jan 2010 11:45:35 +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 95E858FC31; Sat, 23 Jan 2010 11:45:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NBjZwn094869; Sat, 23 Jan 2010 11:45:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NBjZmS094863; Sat, 23 Jan 2010 11:45:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001231145.o0NBjZmS094863@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Jan 2010 11:45:35 +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: r202882 - in head/sys: amd64/amd64 amd64/ia32 i386/i386 kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 11:45:35 -0000 Author: kib Date: Sat Jan 23 11:45:35 2010 New Revision: 202882 URL: http://svn.freebsd.org/changeset/base/202882 Log: For PT_TO_SCE stop that stops the ptraced process upon syscall entry, syscall arguments are collected before ptracestop() is called. As a consequence, debugger cannot modify syscall or its arguments. For i386, amd64 and ia32 on amd64 MD syscall(), reread syscall number and arguments after ptracestop(), if debugger modified anything in the process environment. Since procfs stopeven requires number of syscall arguments in p_xstat, this cannot be solved by moving stop/trace point before argument fetching. Move the code to read arguments into separate function fetch_syscall_args() to avoid code duplication. Note that ktrace point for modified syscall is intentionally recorded twice, once with original arguments, and second time with the arguments set by debugger. PT_TO_SCX stop is executed after cpu_syscall_set_retval() already. Reported by: Ali Polatel Briefly discussed with: jhb MFC after: 3 weeks Modified: head/sys/amd64/amd64/trap.c head/sys/amd64/ia32/ia32_syscall.c head/sys/i386/i386/trap.c head/sys/kern/sys_process.c head/sys/sys/proc.h Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sat Jan 23 11:43:30 2010 (r202881) +++ head/sys/amd64/amd64/trap.c Sat Jan 23 11:45:35 2010 (r202882) @@ -885,95 +885,131 @@ dblfault_handler(struct trapframe *frame panic("double fault"); } -/* - * syscall - system call request C handler - * - * A system call is essentially treated as a trap. - */ -void -syscall(struct trapframe *frame) -{ - caddr_t params; +struct syscall_args { + u_int code; struct sysent *callp; - struct thread *td = curthread; - struct proc *p = td->td_proc; - register_t orig_tf_rflags; - int error; - int narg; register_t args[8]; register_t *argp; - u_int code; - int reg, regcnt; - ksiginfo_t ksi; - - PCPU_INC(cnt.v_syscall); + int narg; +}; -#ifdef DIAGNOSTIC - if (ISPL(frame->tf_cs) != SEL_UPL) { - panic("syscall"); - /* NOT REACHED */ - } -#endif +static int +fetch_syscall_args(struct thread *td, struct syscall_args *sa) +{ + struct proc *p; + struct trapframe *frame; + caddr_t params; + int reg, regcnt, error; + p = td->td_proc; + frame = td->td_frame; reg = 0; regcnt = 6; - td->td_pticks = 0; - td->td_frame = frame; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); + params = (caddr_t)frame->tf_rsp + sizeof(register_t); - code = frame->tf_rax; - orig_tf_rflags = frame->tf_rflags; + sa->code = frame->tf_rax; if (p->p_sysent->sv_prepsyscall) { - (*p->p_sysent->sv_prepsyscall)(frame, (int *)args, &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(frame, (int *)sa->args, + &sa->code, ¶ms); } else { - if (code == SYS_syscall || code == SYS___syscall) { - code = frame->tf_rdi; + if (sa->code == SYS_syscall || sa->code == SYS___syscall) { + sa->code = frame->tf_rdi; reg++; regcnt--; } } - if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; + sa->code &= p->p_sysent->sv_mask; - if (code >= p->p_sysent->sv_size) - callp = &p->p_sysent->sv_table[0]; + if (sa->code >= p->p_sysent->sv_size) + sa->callp = &p->p_sysent->sv_table[0]; else - callp = &p->p_sysent->sv_table[code]; + sa->callp = &p->p_sysent->sv_table[sa->code]; - narg = callp->sy_narg; - KASSERT(narg <= sizeof(args) / sizeof(args[0]), + sa->narg = sa->callp->sy_narg; + KASSERT(sa->narg <= sizeof(sa->args) / sizeof(sa->args[0]), ("Too many syscall arguments!")); error = 0; - argp = &frame->tf_rdi; - argp += reg; - bcopy(argp, args, sizeof(args[0]) * regcnt); - if (narg > regcnt) { + sa->argp = &frame->tf_rdi; + sa->argp += reg; + bcopy(sa->argp, sa->args, sizeof(sa->args[0]) * regcnt); + if (sa->narg > regcnt) { KASSERT(params != NULL, ("copyin args with no params!")); - error = copyin(params, &args[regcnt], - (narg - regcnt) * sizeof(args[0])); + error = copyin(params, &sa->args[regcnt], + (sa->narg - regcnt) * sizeof(sa->args[0])); } - argp = &args[0]; + sa->argp = &sa->args[0]; + /* + * This may result in two records if debugger modified + * registers or memory during sleep at stop/ptrace point. + */ #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(code, narg, argp); + ktrsyscall(sa->code, sa->narg, sa->argp); #endif + return (error); +} - CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_name, code); +/* + * syscall - system call request C handler + * + * A system call is essentially treated as a trap. + */ +void +syscall(struct trapframe *frame) +{ + struct thread *td; + struct proc *p; + struct syscall_args sa; + register_t orig_tf_rflags; + int error; + ksiginfo_t ksi; + PCPU_INC(cnt.v_syscall); + td = curthread; + p = td->td_proc; td->td_syscalls++; +#ifdef DIAGNOSTIC + if (ISPL(frame->tf_cs) != SEL_UPL) { + panic("syscall"); + /* NOT REACHED */ + } +#endif + + td->td_pticks = 0; + td->td_frame = frame; + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + orig_tf_rflags = frame->tf_rflags; + if (p->p_flag & P_TRACED) { + PROC_LOCK(p); + td->td_dbgflags &= ~TDB_USERWR; + PROC_UNLOCK(p); + } + error = fetch_syscall_args(td, &sa); + + CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td, + td->td_proc->p_pid, td->td_name, sa.code); + if (error == 0) { td->td_retval[0] = 0; td->td_retval[1] = frame->tf_rdx; - STOPEVENT(p, S_SCE, narg); - + STOPEVENT(p, S_SCE, sa.narg); PTRACESTOP_SC(p, td, S_PT_SCE); + if (td->td_dbgflags & TDB_USERWR) { + /* + * Reread syscall number and arguments if + * debugger modified registers or memory. + */ + error = fetch_syscall_args(td, &sa); + if (error != 0) + goto retval; + td->td_retval[1] = frame->tf_rdx; + } #ifdef KDTRACE_HOOKS /* @@ -981,13 +1017,13 @@ syscall(struct trapframe *frame) * callback and if there is a probe active for the * syscall 'entry', process the probe. */ - if (systrace_probe_func != NULL && callp->sy_entry != 0) - (*systrace_probe_func)(callp->sy_entry, code, callp, - args); + if (systrace_probe_func != NULL && sa.callp->sy_entry != 0) + (*systrace_probe_func)(sa.callp->sy_entry, sa.code, + sa.callp, sa.args); #endif - AUDIT_SYSCALL_ENTER(code, td); - error = (*callp->sy_call)(td, argp); + AUDIT_SYSCALL_ENTER(sa.code, td); + error = (*sa.callp->sy_call)(td, sa.argp); AUDIT_SYSCALL_EXIT(error, td); /* Save the latest error return value. */ @@ -999,12 +1035,12 @@ syscall(struct trapframe *frame) * callback and if there is a probe active for the * syscall 'return', process the probe. */ - if (systrace_probe_func != NULL && callp->sy_return != 0) - (*systrace_probe_func)(callp->sy_return, code, callp, - args); + if (systrace_probe_func != NULL && sa.callp->sy_return != 0) + (*systrace_probe_func)(sa.callp->sy_return, sa.code, + sa.callp, sa.args); #endif } - + retval: cpu_set_syscall_retval(td, error); /* @@ -1023,14 +1059,16 @@ syscall(struct trapframe *frame) * Check for misbehavior. */ WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???")); KASSERT(td->td_locks == 0, ("System call %s returning with %d locks held", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", - td->td_locks)); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???", td->td_locks)); /* * Handle reschedule and other end-of-syscall issues @@ -1038,11 +1076,11 @@ syscall(struct trapframe *frame) userret(td, frame); CTR4(KTR_SYSC, "syscall exit thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_name, code); + td->td_proc->p_pid, td->td_name, sa.code); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSRET)) - ktrsysret(code, error, td->td_retval[0]); + ktrsysret(sa.code, error, td->td_retval[0]); #endif /* @@ -1050,7 +1088,7 @@ syscall(struct trapframe *frame) * register set. If we ever support an emulation where this * is not the case, this code will need to be revisited. */ - STOPEVENT(p, S_SCX, code); + STOPEVENT(p, S_SCX, sa.code); PTRACESTOP_SC(p, td, S_PT_SCX); } Modified: head/sys/amd64/ia32/ia32_syscall.c ============================================================================== --- head/sys/amd64/ia32/ia32_syscall.c Sat Jan 23 11:43:30 2010 (r202881) +++ head/sys/amd64/ia32/ia32_syscall.c Sat Jan 23 11:45:35 2010 (r202882) @@ -88,101 +88,136 @@ extern const char *freebsd32_syscallname void ia32_syscall(struct trapframe *frame); /* Called from asm code */ -void -ia32_syscall(struct trapframe *frame) -{ +struct ia32_syscall_args { + u_int code; caddr_t params; - int i; struct sysent *callp; - struct thread *td = curthread; - struct proc *p = td->td_proc; - register_t orig_tf_rflags; - int error; + u_int64_t args64[8]; int narg; +}; + +static int +fetch_ia32_syscall_args(struct thread *td, struct ia32_syscall_args *sa) +{ + struct proc *p; + struct trapframe *frame; u_int32_t args[8]; - u_int64_t args64[8]; - u_int code; - ksiginfo_t ksi; + int error, i; - PCPU_INC(cnt.v_syscall); - td->td_pticks = 0; - td->td_frame = frame; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); - params = (caddr_t)frame->tf_rsp + sizeof(u_int32_t); - code = frame->tf_rax; - orig_tf_rflags = frame->tf_rflags; + p = td->td_proc; + frame = td->td_frame; + + sa->params = (caddr_t)frame->tf_rsp + sizeof(u_int32_t); + sa->code = frame->tf_rax; if (p->p_sysent->sv_prepsyscall) { /* * The prep code is MP aware. */ - (*p->p_sysent->sv_prepsyscall)(frame, args, &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(frame, args, &sa->code, + &sa->params); } else { /* * Need to check if this is a 32 bit or 64 bit syscall. * fuword is MP aware. */ - if (code == SYS_syscall) { + if (sa->code == SYS_syscall) { /* * Code is first argument, followed by actual args. */ - code = fuword32(params); - params += sizeof(int); - } else if (code == SYS___syscall) { + sa->code = fuword32(sa->params); + sa->params += sizeof(int); + } else if (sa->code == SYS___syscall) { /* * Like syscall, but code is a quad, so as to maintain * quad alignment for the rest of the arguments. * We use a 32-bit fetch in case params is not * aligned. */ - code = fuword32(params); - params += sizeof(quad_t); + sa->code = fuword32(sa->params); + sa->params += sizeof(quad_t); } } - if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; - - if (code >= p->p_sysent->sv_size) - callp = &p->p_sysent->sv_table[0]; + sa->code &= p->p_sysent->sv_mask; + if (sa->code >= p->p_sysent->sv_size) + sa->callp = &p->p_sysent->sv_table[0]; else - callp = &p->p_sysent->sv_table[code]; - - narg = callp->sy_narg; + sa->callp = &p->p_sysent->sv_table[sa->code]; + sa->narg = sa->callp->sy_narg; - /* - * copyin and the ktrsyscall()/ktrsysret() code is MP-aware - */ - if (params != NULL && narg != 0) - error = copyin(params, (caddr_t)args, - (u_int)(narg * sizeof(int))); + if (sa->params != NULL && sa->narg != 0) + error = copyin(sa->params, (caddr_t)args, + (u_int)(sa->narg * sizeof(int))); else error = 0; - for (i = 0; i < narg; i++) - args64[i] = args[i]; + for (i = 0; i < sa->narg; i++) + sa->args64[i] = args[i]; #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(code, narg, args64); + ktrsyscall(sa->code, sa->narg, sa->args64); #endif + + return (error); +} + +void +ia32_syscall(struct trapframe *frame) +{ + struct thread *td; + struct proc *p; + struct ia32_syscall_args sa; + register_t orig_tf_rflags; + int error; + ksiginfo_t ksi; + + PCPU_INC(cnt.v_syscall); + td = curthread; + p = td->td_proc; + td->td_syscalls++; + + td->td_pticks = 0; + td->td_frame = frame; + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + orig_tf_rflags = frame->tf_rflags; + if (p->p_flag & P_TRACED) { + PROC_LOCK(p); + td->td_dbgflags &= ~TDB_USERWR; + PROC_UNLOCK(p); + } + error = fetch_ia32_syscall_args(td, &sa); + CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_proc->p_comm, code); + td->td_proc->p_pid, td->td_name, sa.code); if (error == 0) { td->td_retval[0] = 0; td->td_retval[1] = frame->tf_rdx; - STOPEVENT(p, S_SCE, narg); - + STOPEVENT(p, S_SCE, sa.narg); PTRACESTOP_SC(p, td, S_PT_SCE); + if (td->td_dbgflags & TDB_USERWR) { + /* + * Reread syscall number and arguments if + * debugger modified registers or memory. + */ + error = fetch_ia32_syscall_args(td, &sa); + if (error != 0) + goto retval; + td->td_retval[1] = frame->tf_rdx; + } - AUDIT_SYSCALL_ENTER(code, td); - error = (*callp->sy_call)(td, args64); + AUDIT_SYSCALL_ENTER(sa.code, td); + error = (*sa.callp->sy_call)(td, sa.args64); AUDIT_SYSCALL_EXIT(error, td); - } + /* Save the latest error return value. */ + td->td_errno = error; + } + retval: cpu_set_syscall_retval(td, error); /* @@ -201,14 +236,16 @@ ia32_syscall(struct trapframe *frame) * Check for misbehavior. */ WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???"); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + freebsd32_syscallnames[sa.code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", - (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???")); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + freebsd32_syscallnames[sa.code] : "???")); KASSERT(td->td_locks == 0, ("System call %s returning with %d locks held", - (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???", - td->td_locks)); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + freebsd32_syscallnames[sa.code] : "???", td->td_locks)); /* * Handle reschedule and other end-of-syscall issues @@ -216,10 +253,10 @@ ia32_syscall(struct trapframe *frame) userret(td, frame); CTR4(KTR_SYSC, "syscall exit thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_proc->p_comm, code); + td->td_proc->p_pid, td->td_proc->p_comm, sa.code); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSRET)) - ktrsysret(code, error, td->td_retval[0]); + ktrsysret(sa.code, error, td->td_retval[0]); #endif /* @@ -227,7 +264,7 @@ ia32_syscall(struct trapframe *frame) * register set. If we ever support an emulation where this * is not the case, this code will need to be revisited. */ - STOPEVENT(p, S_SCX, code); + STOPEVENT(p, S_SCX, sa.code); PTRACESTOP_SC(p, td, S_PT_SCX); } Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Sat Jan 23 11:43:30 2010 (r202881) +++ head/sys/i386/i386/trap.c Sat Jan 23 11:45:35 2010 (r202882) @@ -969,97 +969,130 @@ dblfault_handler() panic("double fault"); } -/* - * syscall - system call request C handler - * - * A system call is essentially treated as a trap. - */ -void -syscall(struct trapframe *frame) -{ - caddr_t params; +struct syscall_args { + u_int code; struct sysent *callp; - struct thread *td = curthread; - struct proc *p = td->td_proc; - register_t orig_tf_eflags; - int error; - int narg; int args[8]; - u_int code; - ksiginfo_t ksi; + register_t *argp; + int narg; +}; - PCPU_INC(cnt.v_syscall); +static int +fetch_syscall_args(struct thread *td, struct syscall_args *sa) +{ + struct proc *p; + struct trapframe *frame; + caddr_t params; + int error; -#ifdef DIAGNOSTIC - if (ISPL(frame->tf_cs) != SEL_UPL) { - panic("syscall"); - /* NOT REACHED */ - } -#endif + p = td->td_proc; + frame = td->td_frame; - td->td_pticks = 0; - td->td_frame = frame; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); params = (caddr_t)frame->tf_esp + sizeof(int); - code = frame->tf_eax; - orig_tf_eflags = frame->tf_eflags; + sa->code = frame->tf_eax; if (p->p_sysent->sv_prepsyscall) { - (*p->p_sysent->sv_prepsyscall)(frame, args, &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(frame, sa->args, &sa->code, + ¶ms); } else { /* * Need to check if this is a 32 bit or 64 bit syscall. */ - if (code == SYS_syscall) { + if (sa->code == SYS_syscall) { /* * Code is first argument, followed by actual args. */ - code = fuword(params); + sa->code = fuword(params); params += sizeof(int); - } else if (code == SYS___syscall) { + } else if (sa->code == SYS___syscall) { /* * Like syscall, but code is a quad, so as to maintain * quad alignment for the rest of the arguments. */ - code = fuword(params); + sa->code = fuword(params); params += sizeof(quad_t); } } if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; - - if (code >= p->p_sysent->sv_size) - callp = &p->p_sysent->sv_table[0]; + sa->code &= p->p_sysent->sv_mask; + if (sa->code >= p->p_sysent->sv_size) + sa->callp = &p->p_sysent->sv_table[0]; else - callp = &p->p_sysent->sv_table[code]; + sa->callp = &p->p_sysent->sv_table[sa->code]; + sa->narg = sa->callp->sy_narg; - narg = callp->sy_narg; - - if (params != NULL && narg != 0) - error = copyin(params, (caddr_t)args, - (u_int)(narg * sizeof(int))); + if (params != NULL && sa->narg != 0) + error = copyin(params, (caddr_t)sa->args, + (u_int)(sa->narg * sizeof(int))); else error = 0; #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(code, narg, args); + ktrsyscall(sa->code, sa->narg, sa->args); #endif + return (error); +} - CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_name, code); +/* + * syscall - system call request C handler + * + * A system call is essentially treated as a trap. + */ +void +syscall(struct trapframe *frame) +{ + struct thread *td; + struct proc *p; + struct syscall_args sa; + register_t orig_tf_eflags; + int error; + ksiginfo_t ksi; + PCPU_INC(cnt.v_syscall); + td = curthread; + p = td->td_proc; td->td_syscalls++; +#ifdef DIAGNOSTIC + if (ISPL(frame->tf_cs) != SEL_UPL) { + panic("syscall"); + /* NOT REACHED */ + } +#endif + + td->td_pticks = 0; + td->td_frame = frame; + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + orig_tf_eflags = frame->tf_eflags; + if (p->p_flag & P_TRACED) { + PROC_LOCK(p); + td->td_dbgflags &= ~TDB_USERWR; + PROC_UNLOCK(p); + } + error = fetch_syscall_args(td, &sa); + + CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td, + td->td_proc->p_pid, td->td_name, sa.code); + if (error == 0) { td->td_retval[0] = 0; td->td_retval[1] = frame->tf_edx; - STOPEVENT(p, S_SCE, narg); - + STOPEVENT(p, S_SCE, sa.narg); PTRACESTOP_SC(p, td, S_PT_SCE); + if (td->td_dbgflags & TDB_USERWR) { + /* + * Reread syscall number and arguments if + * debugger modified registers or memory. + */ + error = fetch_syscall_args(td, &sa); + if (error != 0) + goto retval; + td->td_retval[1] = frame->tf_edx; + } #ifdef KDTRACE_HOOKS /* @@ -1067,13 +1100,13 @@ syscall(struct trapframe *frame) * callback and if there is a probe active for the * syscall 'entry', process the probe. */ - if (systrace_probe_func != NULL && callp->sy_entry != 0) - (*systrace_probe_func)(callp->sy_entry, code, callp, - args); + if (systrace_probe_func != NULL && sa.callp->sy_entry != 0) + (*systrace_probe_func)(sa.callp->sy_entry, sa.code, + sa.callp, sa.args); #endif - AUDIT_SYSCALL_ENTER(code, td); - error = (*callp->sy_call)(td, args); + AUDIT_SYSCALL_ENTER(sa.code, td); + error = (*sa.callp->sy_call)(td, sa.args); AUDIT_SYSCALL_EXIT(error, td); /* Save the latest error return value. */ @@ -1085,12 +1118,12 @@ syscall(struct trapframe *frame) * callback and if there is a probe active for the * syscall 'return', process the probe. */ - if (systrace_probe_func != NULL && callp->sy_return != 0) - (*systrace_probe_func)(callp->sy_return, code, callp, - args); + if (systrace_probe_func != NULL && sa.callp->sy_return != 0) + (*systrace_probe_func)(sa.callp->sy_return, sa.code, + sa.callp, sa.args); #endif } - + retval: cpu_set_syscall_retval(td, error); /* @@ -1109,14 +1142,16 @@ syscall(struct trapframe *frame) * Check for misbehavior. */ WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???")); KASSERT(td->td_locks == 0, ("System call %s returning with %d locks held", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", - td->td_locks)); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???", td->td_locks)); /* * Handle reschedule and other end-of-syscall issues @@ -1124,11 +1159,11 @@ syscall(struct trapframe *frame) userret(td, frame); CTR4(KTR_SYSC, "syscall exit thread %p pid %d proc %s code %d", td, - td->td_proc->p_pid, td->td_name, code); + td->td_proc->p_pid, td->td_name, sa.code); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSRET)) - ktrsysret(code, error, td->td_retval[0]); + ktrsysret(sa.code, error, td->td_retval[0]); #endif /* @@ -1136,7 +1171,7 @@ syscall(struct trapframe *frame) * register set. If we ever support an emulation where this * is not the case, this code will need to be revisited. */ - STOPEVENT(p, S_SCX, code); + STOPEVENT(p, S_SCX, sa.code); PTRACESTOP_SC(p, td, S_PT_SCX); } Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Sat Jan 23 11:43:30 2010 (r202881) +++ head/sys/kern/sys_process.c Sat Jan 23 11:45:35 2010 (r202882) @@ -816,6 +816,7 @@ kern_ptrace(struct thread *td, int req, case PT_WRITE_I: case PT_WRITE_D: + td2->td_dbgflags |= TDB_USERWR; write = 1; /* FALLTHROUGH */ case PT_READ_I: @@ -884,6 +885,7 @@ kern_ptrace(struct thread *td, int req, break; case PIOD_WRITE_D: case PIOD_WRITE_I: + td2->td_dbgflags |= TDB_USERWR; uio.uio_rw = UIO_WRITE; break; default: @@ -906,6 +908,7 @@ kern_ptrace(struct thread *td, int req, goto sendsig; /* in PT_CONTINUE above */ case PT_SETREGS: + td2->td_dbgflags |= TDB_USERWR; error = PROC_WRITE(regs, td2, addr); break; @@ -914,6 +917,7 @@ kern_ptrace(struct thread *td, int req, break; case PT_SETFPREGS: + td2->td_dbgflags |= TDB_USERWR; error = PROC_WRITE(fpregs, td2, addr); break; @@ -922,6 +926,7 @@ kern_ptrace(struct thread *td, int req, break; case PT_SETDBREGS: + td2->td_dbgflags |= TDB_USERWR; error = PROC_WRITE(dbregs, td2, addr); break; Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Jan 23 11:43:30 2010 (r202881) +++ head/sys/sys/proc.h Sat Jan 23 11:45:35 2010 (r202882) @@ -341,6 +341,7 @@ do { \ /* Userland debug flags */ #define TDB_SUSPEND 0x00000001 /* Thread is suspended by debugger */ #define TDB_XSIG 0x00000002 /* Thread is exchanging signal under trace */ +#define TDB_USERWR 0x00000004 /* Debugger modified memory or registers */ /* * "Private" flags kept in td_pflags: From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 11:51:31 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55AD01065672; Sat, 23 Jan 2010 11:51:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id B5A538FC15; Sat, 23 Jan 2010 11:51:30 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o0NBpHQr080652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Jan 2010 13:51:17 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o0NBpHOu099813; Sat, 23 Jan 2010 13:51:17 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0NBpHHq099812; Sat, 23 Jan 2010 13:51:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 23 Jan 2010 13:51:17 +0200 From: Kostik Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20100123115117.GH59590@deviant.kiev.zoral.com.ua> References: <201001231145.o0NBjZmS094863@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="A3bjmUvO/1DXpqhN" Content-Disposition: inline In-Reply-To: <201001231145.o0NBjZmS094863@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: Re: svn commit: r202882 - in head/sys: amd64/amd64 amd64/ia32 i386/i386 kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 11:51:31 -0000 --A3bjmUvO/1DXpqhN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 23, 2010 at 11:45:35AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sat Jan 23 11:45:35 2010 > New Revision: 202882 > URL: http://svn.freebsd.org/changeset/base/202882 >=20 > Log: > For PT_TO_SCE stop that stops the ptraced process upon syscall entry, > syscall arguments are collected before ptracestop() is called. As a > consequence, debugger cannot modify syscall or its arguments. > =20 > For i386, amd64 and ia32 on amd64 MD syscall(), reread syscall number > and arguments after ptracestop(), if debugger modified anything in the > process environment. Since procfs stopeven requires number of syscall > arguments in p_xstat, this cannot be solved by moving stop/trace point > before argument fetching. I am willing to help architecture maintainers to implement this for corresponding architectures, if any help is needed. --A3bjmUvO/1DXpqhN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkta4rQACgkQC3+MBN1Mb4gZBACg1cPe5dm46YV9QgWn8dmzr8hk TWQAoJl4uNHjVUEPe92WqFDq9FS/CA35 =xfZt -----END PGP SIGNATURE----- --A3bjmUvO/1DXpqhN-- From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 12:48:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F8C5106566C; Sat, 23 Jan 2010 12:48:47 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F29EA8FC0C; Sat, 23 Jan 2010 12:48:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NCmkaY008878; Sat, 23 Jan 2010 12:48:46 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NCmk4v008877; Sat, 23 Jan 2010 12:48:46 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001231248.o0NCmk4v008877@svn.freebsd.org> From: Antoine Brodin Date: Sat, 23 Jan 2010 12:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202883 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 12:48:47 -0000 Author: antoine Date: Sat Jan 23 12:48:46 2010 New Revision: 202883 URL: http://svn.freebsd.org/changeset/base/202883 Log: Reapply r201145 to lib/libc/gen/sem.c Modified: head/lib/libc/gen/sem.c Modified: head/lib/libc/gen/sem.c ============================================================================== --- head/lib/libc/gen/sem.c Sat Jan 23 11:45:35 2010 (r202882) +++ head/lib/libc/gen/sem.c Sat Jan 23 12:48:46 2010 (r202883) @@ -106,7 +106,7 @@ typedef struct sem* sem_t; static sem_t sem_alloc(unsigned int value, semid_t semid, int system_sem); static void sem_free(sem_t sem); -static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(&named_sems); +static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(named_sems); static pthread_mutex_t named_sems_mtx = PTHREAD_MUTEX_INITIALIZER; FB10_COMPAT(_libc_sem_init_compat, sem_init); From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 13:08:47 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D61A9106566B; Sat, 23 Jan 2010 13:08:47 +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 AB5798FC12; Sat, 23 Jan 2010 13:08:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0ND8liA013294; Sat, 23 Jan 2010 13:08:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0ND8lfd013292; Sat, 23 Jan 2010 13:08:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201001231308.o0ND8lfd013292@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 23 Jan 2010 13:08: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: r202884 - head/share/man/man3 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 13:08:47 -0000 Author: kib Date: Sat Jan 23 13:08:47 2010 New Revision: 202884 URL: http://svn.freebsd.org/changeset/base/202884 Log: Document pthread_timedjoin_np. Note implementation-defined EOPNOTSUPP error [1]. PR: threads/143115 [1] MFC after: 3 days Modified: head/share/man/man3/pthread_join.3 Modified: head/share/man/man3/pthread_join.3 ============================================================================== --- head/share/man/man3/pthread_join.3 Sat Jan 23 12:48:46 2010 (r202883) +++ head/share/man/man3/pthread_join.3 Sat Jan 23 13:08:47 2010 (r202884) @@ -30,11 +30,12 @@ .\" .\" $FreeBSD$ .\" -.Dd April 4, 1996 +.Dd January 23, 2010 .Dt PTHREAD_JOIN 3 .Os .Sh NAME -.Nm pthread_join +.Nm pthread_join , +.Nm pthread_timedjoin_np .Nd wait for thread termination .Sh LIBRARY .Lb libpthread @@ -42,6 +43,8 @@ .In pthread.h .Ft int .Fn pthread_join "pthread_t thread" "void **value_ptr" +.Ft int +.Fn pthread_timedjoin_np "pthread_t thread" "void **value_ptr" "const struct timespec *abstime" .Sh DESCRIPTION The .Fn pthread_join @@ -70,18 +73,30 @@ If the thread calling .Fn pthread_join is cancelled, then the target thread is not detached. .Pp +The +.Fn pthread_timedjoin_np +function is equivalent to the +.Fn pthread_join +function except it will return +.Er ETIMEDOUT +if target thread does not exit before specified absolute time passes. +.Pp A thread that has exited but remains unjoined counts against [_POSIX_THREAD_THREADS_MAX]. .Sh RETURN VALUES If successful, the .Fn pthread_join -function will return zero. +and +.Fn pthread_timedjoin_np +functions will return zero. Otherwise an error number will be returned to indicate the error. .Sh ERRORS The .Fn pthread_join -function will fail if: +and +.Fn pthread_timedjoin_np +functions will fail if: .Bl -tag -width Er .It Bq Er EINVAL The implementation has detected that the value specified by @@ -95,6 +110,19 @@ thread ID, A deadlock was detected or the value of .Fa thread specifies the calling thread. +.It Bq Er EOPNOTSUPP +The implementation detected that another caller is already waiting on +.Fa thread . +.El +.Pp +Additionally, the +.Fn pthread_join +function will fail if: +.Bl -tag -width Er +.It Bq Er ETIMEDOUT +The specified absolute time passed while +.Fn pthread_timedjoin_np +waited for thread exit. .El .Sh SEE ALSO .Xr wait 2 , @@ -104,3 +132,9 @@ The .Fn pthread_join function conforms to .St -p1003.1-96 . +The +.Fn pthread_timedjoin_np +is +.Fx +extension, first appeared in +.Fx 6.1 . From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 15:54:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50EAF1065670; Sat, 23 Jan 2010 15:54:22 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F7968FC0A; Sat, 23 Jan 2010 15:54:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NFsMFE049841; Sat, 23 Jan 2010 15:54:22 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NFsMbx049837; Sat, 23 Jan 2010 15:54:22 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201001231554.o0NFsMbx049837@svn.freebsd.org> From: Attilio Rao Date: Sat, 23 Jan 2010 15:54: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: r202889 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 15:54:22 -0000 Author: attilio Date: Sat Jan 23 15:54:21 2010 New Revision: 202889 URL: http://svn.freebsd.org/changeset/base/202889 Log: - Fix a race in sched_switch() of sched_4bsd. In the case of the thread being on a sleepqueue or a turnstile, the sched_lock was acquired (without the aid of the td_lock interface) and the td_lock was dropped. This was going to break locking rules on other threads willing to access to the thread (via the td_lock interface) and modify his flags (allowed as long as the container lock was different by the one used in sched_switch). In order to prevent this situation, while sched_lock is acquired there the td_lock gets blocked. [0] - Merge the ULE's internal function thread_block_switch() into the global thread_lock_block() and make the former semantic as the default for thread_lock_block(). This means that thread_lock_block() will not disable interrupts when called (and consequently thread_unlock_block() will not re-enabled them when called). This should be done manually when necessary. Note, however, that ULE's thread_unblock_switch() is not reaped because it does reflect a difference in semantic due in ULE (the td_lock may not be necessarilly still blocked_lock when calling this). While asymmetric, it does describe a remarkable difference in semantic that is good to keep in mind. [0] Reported by: Kohji Okuno Tested by: Giovanni Trematerra MFC: 2 weeks Modified: head/sys/kern/kern_mutex.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sat Jan 23 15:28:18 2010 (r202888) +++ head/sys/kern/kern_mutex.c Sat Jan 23 15:54:21 2010 (r202889) @@ -616,7 +616,6 @@ thread_lock_block(struct thread *td) { struct mtx *lock; - spinlock_enter(); THREAD_LOCK_ASSERT(td, MA_OWNED); lock = td->td_lock; td->td_lock = &blocked_lock; @@ -631,7 +630,6 @@ thread_lock_unblock(struct thread *td, s mtx_assert(new, MA_OWNED); MPASS(td->td_lock == &blocked_lock); atomic_store_rel_ptr((volatile void *)&td->td_lock, (uintptr_t)new); - spinlock_exit(); } void Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Sat Jan 23 15:28:18 2010 (r202888) +++ head/sys/kern/sched_4bsd.c Sat Jan 23 15:54:21 2010 (r202889) @@ -920,9 +920,11 @@ sched_sleep(struct thread *td, int pri) void sched_switch(struct thread *td, struct thread *newtd, int flags) { + struct mtx *tmtx; struct td_sched *ts; struct proc *p; + tmtx = NULL; ts = td->td_sched; p = td->td_proc; @@ -931,10 +933,11 @@ sched_switch(struct thread *td, struct t /* * Switch to the sched lock to fix things up and pick * a new thread. + * Block the td_lock in order to avoid breaking the critical path. */ if (td->td_lock != &sched_lock) { mtx_lock_spin(&sched_lock); - thread_unlock(td); + tmtx = thread_lock_block(td); } if ((td->td_flags & TDF_NOLOAD) == 0) @@ -1004,7 +1007,7 @@ sched_switch(struct thread *td, struct t (*dtrace_vtime_switch_func)(newtd); #endif - cpu_switch(td, newtd, td->td_lock); + cpu_switch(td, newtd, tmtx != NULL ? tmtx : td->td_lock); lock_profile_obtain_lock_success(&sched_lock.lock_object, 0, 0, __FILE__, __LINE__); /* Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Sat Jan 23 15:28:18 2010 (r202888) +++ head/sys/kern/sched_ule.c Sat Jan 23 15:54:21 2010 (r202889) @@ -301,7 +301,6 @@ static int sched_pickcpu(struct thread * static void sched_balance(void); static int sched_balance_pair(struct tdq *, struct tdq *); static inline struct tdq *sched_setcpu(struct thread *, int, int); -static inline struct mtx *thread_block_switch(struct thread *); static inline void thread_unblock_switch(struct thread *, struct mtx *); static struct mtx *sched_switch_migrate(struct tdq *, struct thread *, int); static int sysctl_kern_sched_topology_spec(SYSCTL_HANDLER_ARGS); @@ -1106,9 +1105,11 @@ sched_setcpu(struct thread *td, int cpu, * The hard case, migration, we need to block the thread first to * prevent order reversals with other cpus locks. */ + spinlock_enter(); thread_lock_block(td); TDQ_LOCK(tdq); thread_lock_unblock(td, TDQ_LOCKPTR(tdq)); + spinlock_exit(); return (tdq); } @@ -1715,23 +1716,6 @@ sched_unlend_user_prio(struct thread *td } /* - * Block a thread for switching. Similar to thread_block() but does not - * bump the spin count. - */ -static inline struct mtx * -thread_block_switch(struct thread *td) -{ - struct mtx *lock; - - THREAD_LOCK_ASSERT(td, MA_OWNED); - lock = td->td_lock; - td->td_lock = &blocked_lock; - mtx_unlock_spin(lock); - - return (lock); -} - -/* * Handle migration from sched_switch(). This happens only for * cpu binding. */ @@ -1749,7 +1733,7 @@ sched_switch_migrate(struct tdq *tdq, st * not holding either run-queue lock. */ spinlock_enter(); - thread_block_switch(td); /* This releases the lock on tdq. */ + thread_lock_block(td); /* This releases the lock on tdq. */ /* * Acquire both run-queue locks before placing the thread on the new @@ -1769,7 +1753,8 @@ sched_switch_migrate(struct tdq *tdq, st } /* - * Release a thread that was blocked with thread_block_switch(). + * Variadic version of thread_lock_unblock() that does not assume td_lock + * is blocked. */ static inline void thread_unblock_switch(struct thread *td, struct mtx *mtx) @@ -1825,7 +1810,7 @@ sched_switch(struct thread *td, struct t } else { /* This thread must be going to sleep. */ TDQ_LOCK(tdq); - mtx = thread_block_switch(td); + mtx = thread_lock_block(td); tdq_load_rem(tdq, td); } /* From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 17:00:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1006106566B; Sat, 23 Jan 2010 17:00:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 646488FC1C; Sat, 23 Jan 2010 17:00:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 64D8F41C751; Sat, 23 Jan 2010 18:00:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id dkT5Qeq1Sjjj; Sat, 23 Jan 2010 18:00:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 0756541C712; Sat, 23 Jan 2010 18:00:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 5B2C64448EC; Sat, 23 Jan 2010 16:58:27 +0000 (UTC) Date: Sat, 23 Jan 2010 16:58:27 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Joerg Wunsch In-Reply-To: <201001230754.o0N7s70b040987@svn.freebsd.org> Message-ID: <20100123165730.J50938@maildrop.int.zabbadoz.net> References: <201001230754.o0N7s70b040987@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 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: r202870 - head/sys/dev/ieee488 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 17:00:08 -0000 On Sat, 23 Jan 2010, Joerg Wunsch wrote: > Author: joerg > Date: Sat Jan 23 07:54:06 2010 > New Revision: 202870 > URL: http://svn.freebsd.org/changeset/base/202870 > > Log: > Overhaul of the pcii driver: > ... > > MFC after: 1 day If it's not security related - we don't do that and still use a minmium of 3 days to catch problems ... like that this seems to have broken HEAD. -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 17:31:14 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1071A106566C; Sat, 23 Jan 2010 17:31:14 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F3DAB8FC15; Sat, 23 Jan 2010 17:31:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NHVDKq071239; Sat, 23 Jan 2010 17:31:13 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NHVDNY071237; Sat, 23 Jan 2010 17:31:13 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001231731.o0NHVDNY071237@svn.freebsd.org> From: Antoine Brodin Date: Sat, 23 Jan 2010 17:31:13 +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: r202892 - head/usr.bin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 17:31:14 -0000 Author: antoine Date: Sat Jan 23 17:31:13 2010 New Revision: 202892 URL: http://svn.freebsd.org/changeset/base/202892 Log: Unbreak world WITHOUT_OPENSSL: the new dc(1) depends on crypto(3) and bc(1) depends on dc(1). Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sat Jan 23 16:40:35 2010 (r202891) +++ head/usr.bin/Makefile Sat Jan 23 17:31:13 2010 (r202892) @@ -18,7 +18,7 @@ SUBDIR= alias \ awk \ banner \ basename \ - bc \ + ${_bc} \ ${_biff} \ ${_bluetooth} \ brandelf \ @@ -50,7 +50,7 @@ SUBDIR= alias \ ${_csup} \ ${_ctags} \ cut \ - dc \ + ${_dc} \ ${_dig} \ dirname \ du \ @@ -280,7 +280,9 @@ _hesinfo= hesinfo .endif .if ${MK_OPENSSL} != "no" +_bc= bc _chkey= chkey +_dc= dc _newkey= newkey .if ${MK_LIBTHR} != "no" _csup= csup From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 17:58:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA25F1065672; Sat, 23 Jan 2010 17:58:40 +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 B9A5C8FC20; Sat, 23 Jan 2010 17:58:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NHweYA077273; Sat, 23 Jan 2010 17:58:40 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NHweYO077271; Sat, 23 Jan 2010 17:58:40 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001231758.o0NHweYO077271@svn.freebsd.org> From: Ed Schouten Date: Sat, 23 Jan 2010 17:58:40 +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: r202893 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 17:58:40 -0000 Author: ed Date: Sat Jan 23 17:58:40 2010 New Revision: 202893 URL: http://svn.freebsd.org/changeset/base/202893 Log: EMPTY records don't have a timestamp. Modified: head/lib/libc/gen/getutxent.3 Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Sat Jan 23 17:31:13 2010 (r202892) +++ head/lib/libc/gen/getutxent.3 Sat Jan 23 17:58:40 2010 (r202893) @@ -138,7 +138,8 @@ Other fields inside the structure are: .Bl -tag -width ut_user .It Fa ut_tv The time the event occured. -This field is used for all types of entries. +This field is used for all types of entries, except +.Dv EMPTY . .It Fa ut_id An identifier that is used to refer to the entry. This identifier can be used to remove or replace a login entry by From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 18:42:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16A9C1065676; Sat, 23 Jan 2010 18:42:29 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0576B8FC1C; Sat, 23 Jan 2010 18:42:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NIgSG1086960; Sat, 23 Jan 2010 18:42:28 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NIgSa5086957; Sat, 23 Jan 2010 18:42:28 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001231842.o0NIgSa5086957@svn.freebsd.org> From: Alan Cox Date: Sat, 23 Jan 2010 18:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202894 - in head/sys/i386: i386 include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 18:42:29 -0000 Author: alc Date: Sat Jan 23 18:42:28 2010 New Revision: 202894 URL: http://svn.freebsd.org/changeset/base/202894 Log: Handle a race between pmap_kextract() and pmap_promote_pde(). This race is known to cause a kernel crash in ZFS on i386 when superpage promotion is enabled. Tested by: netchild MFC after: 1 week Modified: head/sys/i386/i386/pmap.c head/sys/i386/include/pmap.h Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Jan 23 17:58:40 2010 (r202893) +++ head/sys/i386/i386/pmap.c Sat Jan 23 18:42:28 2010 (r202894) @@ -243,8 +243,9 @@ struct sysmaps { caddr_t CADDR2; }; static struct sysmaps sysmaps_pcpu[MAXCPU]; -pt_entry_t *CMAP1 = 0; +pt_entry_t *CMAP1 = 0, *KPTmap; static pt_entry_t *CMAP3; +static pd_entry_t *KPTD; caddr_t CADDR1 = 0, ptvmmap = 0; static caddr_t CADDR3; struct msgbuf *msgbufp = 0; @@ -421,6 +422,21 @@ pmap_bootstrap(vm_paddr_t firstaddr) SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(MSGBUF_SIZE))) /* + * KPTmap is used by pmap_kextract(). + */ + SYSMAP(pt_entry_t *, KPTD, KPTmap, KVA_PAGES) + + for (i = 0; i < NKPT; i++) + KPTD[i] = (KPTphys + (i << PAGE_SHIFT)) | PG_RW | PG_V; + + /* + * Adjust the start of the KPTD and KPTmap so that the implementation + * of pmap_kextract() and pmap_growkernel() can be made simpler. + */ + KPTD -= KPTDI; + KPTmap -= i386_btop(KPTDI << PDRSHIFT); + + /* * ptemap is used for pmap_pte_quick */ SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1); @@ -1839,6 +1855,7 @@ pmap_growkernel(vm_offset_t addr) vm_page_t nkpg; pd_entry_t newpdir; pt_entry_t *pde; + boolean_t updated_PTD; mtx_assert(&kernel_map->system_mtx, MA_OWNED); if (kernel_vm_end == 0) { @@ -1878,14 +1895,20 @@ pmap_growkernel(vm_offset_t addr) pmap_zero_page(nkpg); ptppaddr = VM_PAGE_TO_PHYS(nkpg); newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); - pdir_pde(PTD, kernel_vm_end) = newpdir; + pdir_pde(KPTD, kernel_vm_end) = newpdir; + updated_PTD = FALSE; mtx_lock_spin(&allpmaps_lock); LIST_FOREACH(pmap, &allpmaps, pm_list) { + if ((pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & + PG_FRAME)) + updated_PTD = TRUE; pde = pmap_pde(pmap, kernel_vm_end); pde_store(pde, newpdir); } mtx_unlock_spin(&allpmaps_lock); + KASSERT(updated_PTD, + ("pmap_growkernel: current page table is not in allpmaps")); kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); if (kernel_vm_end - 1 >= kernel_map->max_offset) { kernel_vm_end = kernel_map->max_offset; Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Sat Jan 23 17:58:40 2010 (r202893) +++ head/sys/i386/include/pmap.h Sat Jan 23 18:42:28 2010 (r202894) @@ -265,6 +265,16 @@ pte_load_store_ma(pt_entry_t *ptep, pt_e #define pde_store_ma(ptep, pte) pte_load_store_ma((ptep), (pt_entry_t)pte) #elif !defined(XEN) + +/* + * KPTmap is a linear mapping of the kernel page table. It differs from the + * recursive mapping in two ways: (1) it only provides access to kernel page + * table pages, and not user page table pages, and (2) it provides access to + * a kernel page table page after the corresponding virtual addresses have + * been promoted to a 2/4MB page mapping. + */ +extern pt_entry_t *KPTmap; + /* * Routine: pmap_kextract * Function: @@ -279,10 +289,17 @@ pmap_kextract(vm_offset_t va) if ((pa = PTD[va >> PDRSHIFT]) & PG_PS) { pa = (pa & PG_PS_FRAME) | (va & PDRMASK); } else { - pa = *vtopte(va); + /* + * Beware of a concurrent promotion that changes the PDE at + * this point! For example, vtopte() must not be used to + * access the PTE because it would use the new PDE. It is, + * however, safe to use the old PDE because the page table + * page is preserved by the promotion. + */ + pa = KPTmap[i386_btop(va)]; pa = (pa & PG_FRAME) | (va & PAGE_MASK); } - return pa; + return (pa); } #define PT_UPDATES_FLUSH() From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 19:29:43 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 404951065697; Sat, 23 Jan 2010 19:29:43 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F9C68FC15; Sat, 23 Jan 2010 19:29:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NJThSl097785; Sat, 23 Jan 2010 19:29:43 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NJTh3F097783; Sat, 23 Jan 2010 19:29:43 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201001231929.o0NJTh3F097783@svn.freebsd.org> From: Antoine Brodin Date: Sat, 23 Jan 2010 19:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202896 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 19:29:43 -0000 Author: antoine Date: Sat Jan 23 19:29:42 2010 New Revision: 202896 URL: http://svn.freebsd.org/changeset/base/202896 Log: Unbreak world: - WITHOUT_OPENSSH (and WITH_KERBEROS) - WITHOUT_KERBEROS and WITH_GSSAPI PR: 137483 Submitted by: bf MFC after: 2 weeks Note: this breaks harder world WITHOUT_GSSAPI (and WITH_KERBEROS), but well Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Jan 23 19:01:25 2010 (r202895) +++ head/Makefile.inc1 Sat Jan 23 19:29:42 2010 (r202896) @@ -1136,14 +1136,16 @@ _cddl_lib= cddl/lib _secure_lib_libcrypto= secure/lib/libcrypto _secure_lib_libssl= secure/lib/libssl lib/libradius__L secure/lib/libssl__L: secure/lib/libcrypto__L -.if ${MK_OPENSSH} != "no" -_secure_lib_libssh= secure/lib/libssh -secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L .if ${MK_KERBEROS} != "no" kerberos5/lib/libgssapi_krb5__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libmd__L kerberos5/lib/libroken__L secure/lib/libcrypto__L \ lib/libcrypt__L +.endif +.if ${MK_OPENSSH} != "no" +_secure_lib_libssh= secure/lib/libssh +secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L +.if ${MK_KERBEROS_SUPPORT} != "no" secure/lib/libssh__L: lib/libgssapi__L kerberos5/lib/libgssapi_krb5__L .endif .endif @@ -1151,6 +1153,10 @@ secure/lib/libssh__L: lib/libgssapi__L k _secure_lib= secure/lib .endif +.if ${MK_GSSAPI} != "no" +_lib_libgssapi= lib/libgssapi +.endif + .if ${MK_IPX} != "no" _lib_libipx= lib/libipx .endif @@ -1163,7 +1169,6 @@ _kerberos5_lib_libhx509= kerberos5/lib/l _kerberos5_lib_libroken= kerberos5/lib/libroken _kerberos5_lib_libheimntlm= kerberos5/lib/libheimntlm _kerberos5_lib_libgssapi_krb5= kerberos5/lib/libgssapi_krb5 -_lib_libgssapi= lib/libgssapi .endif .if ${MK_NIS} != "no" From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 20:04:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC4A71065672 for ; Sat, 23 Jan 2010 20:04:38 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 018978FC1E for ; Sat, 23 Jan 2010 20:04:37 +0000 (UTC) Received: (qmail 27173 invoked by uid 399); 23 Jan 2010 20:04:37 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 23 Jan 2010 20:04:37 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4B5B565C.3020604@FreeBSD.org> Date: Sat, 23 Jan 2010 12:04:44 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.5) Gecko/20100114 Thunderbird/3.0 MIME-Version: 1.0 To: Antoine Brodin References: <201001231731.o0NHVDNY071237@svn.freebsd.org> In-Reply-To: <201001231731.o0NHVDNY071237@svn.freebsd.org> X-Enigmail-Version: 1.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r202892 - head/usr.bin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 20:04:38 -0000 On 01/23/10 09:31, Antoine Brodin wrote: > Author: antoine > Date: Sat Jan 23 17:31:13 2010 > New Revision: 202892 > URL: http://svn.freebsd.org/changeset/base/202892 > > Log: > Unbreak world WITHOUT_OPENSSL: > the new dc(1) depends on crypto(3) and bc(1) depends on dc(1). The dependency on crytpo(3) seems problematic. What's the nature of the dependency and how hard would it be to work around? Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 20:28:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A9721065676; Sat, 23 Jan 2010 20:28:38 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 305048FC1C; Sat, 23 Jan 2010 20:28:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NKScK1010998; Sat, 23 Jan 2010 20:28:38 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NKScOx010995; Sat, 23 Jan 2010 20:28:38 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201001232028.o0NKScOx010995@svn.freebsd.org> From: Alan Cox Date: Sat, 23 Jan 2010 20:28:38 +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: r202897 - head/sys/amd64/amd64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 20:28:38 -0000 Author: alc Date: Sat Jan 23 20:28:37 2010 New Revision: 202897 URL: http://svn.freebsd.org/changeset/base/202897 Log: Simplify the mapping of the system message buffer. Use the direct map just like ia64 does. Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sat Jan 23 19:29:42 2010 (r202896) +++ head/sys/amd64/amd64/machdep.c Sat Jan 23 20:28:37 2010 (r202897) @@ -157,6 +157,8 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, extern vm_offset_t ksym_start, ksym_end; #endif +struct msgbuf *msgbufp; + /* Intel ICH registers */ #define ICH_PMBASE 0x400 #define ICH_SMI_EN ICH_PMBASE + 0x30 @@ -1275,7 +1277,7 @@ add_smap_entry(struct bios_smap *smap, v static void getmemsize(caddr_t kmdp, u_int64_t first) { - int i, off, physmap_idx, pa_indx, da_indx; + int i, physmap_idx, pa_indx, da_indx; vm_paddr_t pa, physmap[PHYSMAP_SIZE]; u_long physmem_tunable; pt_entry_t *pte; @@ -1508,9 +1510,7 @@ do_next: phys_avail[pa_indx] -= round_page(MSGBUF_SIZE); /* Map the message buffer. */ - for (off = 0; off < round_page(MSGBUF_SIZE); off += PAGE_SIZE) - pmap_kenter((vm_offset_t)msgbufp + off, phys_avail[pa_indx] + - off); + msgbufp = (struct msgbuf *)PHYS_TO_DMAP(phys_avail[pa_indx]); } u_int64_t Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Jan 23 19:29:42 2010 (r202896) +++ head/sys/amd64/amd64/pmap.c Sat Jan 23 20:28:37 2010 (r202897) @@ -105,7 +105,6 @@ __FBSDID("$FreeBSD$"); * and to when physical maps must be made correct. */ -#include "opt_msgbuf.h" #include "opt_pmap.h" #include "opt_vm.h" @@ -116,7 +115,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -206,7 +204,6 @@ static int shpgperproc = PMAP_SHPGPERPRO */ pt_entry_t *CMAP1 = 0; caddr_t CADDR1 = 0; -struct msgbuf *msgbufp = 0; /* * Crashdump maps. @@ -570,11 +567,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) */ SYSMAP(caddr_t, unused, crashdumpmap, MAXDUMPPGS) - /* - * msgbufp is used to map the system message buffer. - */ - SYSMAP(struct msgbuf *, unused, msgbufp, atop(round_page(MSGBUF_SIZE))) - virtual_avail = va; *CMAP1 = 0; From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 21:33:34 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05C10106566C; Sat, 23 Jan 2010 21:33:34 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E89C48FC0A; Sat, 23 Jan 2010 21:33:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NLXXRV025418; Sat, 23 Jan 2010 21:33:33 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NLXXNY025414; Sat, 23 Jan 2010 21:33:33 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201001232133.o0NLXXNY025414@svn.freebsd.org> From: Joerg Wunsch Date: Sat, 23 Jan 2010 21:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202898 - head/sys/dev/ieee488 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 21:33:34 -0000 Author: joerg Date: Sat Jan 23 21:33:33 2010 New Revision: 202898 URL: http://svn.freebsd.org/changeset/base/202898 Log: Fix breakage introduced to the tnt4882 driver in r202870. This PCI frontend uses the same uPD7210 backend as the pcii ISA frontend, so the backend has to cope with both situations. Also, hide the first printf in pcii_probe (address mismatch) behind bootverbose as the ISA bus parent tries to probe all configured ISA devices against each driver, so a the console has been cluttered with this message for a bunch of unrelated driver probes. MFC after: 3 days Modified: head/sys/dev/ieee488/pcii.c head/sys/dev/ieee488/tnt4882.c head/sys/dev/ieee488/upd7210.c head/sys/dev/ieee488/upd7210.h Modified: head/sys/dev/ieee488/pcii.c ============================================================================== --- head/sys/dev/ieee488/pcii.c Sat Jan 23 20:28:37 2010 (r202897) +++ head/sys/dev/ieee488/pcii.c Sat Jan 23 21:33:33 2010 (r202898) @@ -138,9 +138,10 @@ pcii_probe(device_t dev) * 1989 Edition, National Instruments.) */ if ((start & 0x3ff) != 0x2e1) { - printf("pcii_probe: PCIIA base address 0x%lx not " - "0x2e1/0x22e1/0x42e1/0x62e1\n", - start); + if (bootverbose) + printf("pcii_probe: PCIIA base address 0x%lx not " + "0x2e1/0x22e1/0x42e1/0x62e1\n", + start); return (ENXIO); } @@ -234,6 +235,7 @@ pcii_attach(device_t dev) for (rid = 0; rid < 8; rid++) { sc->upd7210.reg_res[rid] = sc->res[2 + rid]; + sc->upd7210.reg_offset[rid] = 0; } sc->upd7210.irq_clear_res = sc->res[10]; Modified: head/sys/dev/ieee488/tnt4882.c ============================================================================== --- head/sys/dev/ieee488/tnt4882.c Sat Jan 23 20:28:37 2010 (r202897) +++ head/sys/dev/ieee488/tnt4882.c Sat Jan 23 21:33:33 2010 (r202898) @@ -309,6 +309,9 @@ tnt_attach(device_t dev) /* No DMA help */ sc->upd7210.dmachan = -1; + /* No "special interrupt handling" needed here. */ + sc->upd7210.irq_clear_res = NULL; + upd7210attach(&sc->upd7210); return (0); Modified: head/sys/dev/ieee488/upd7210.c ============================================================================== --- head/sys/dev/ieee488/upd7210.c Sat Jan 23 20:28:37 2010 (r202897) +++ head/sys/dev/ieee488/upd7210.c Sat Jan 23 21:33:33 2010 (r202898) @@ -72,7 +72,7 @@ upd7210_rd(struct upd7210 *u, enum upd72 { u_int r; - r = bus_read_1(u->reg_res[reg], 0); + r = bus_read_1(u->reg_res[reg], u->reg_offset[reg]); u->rreg[reg] = r; return (r); } @@ -81,7 +81,7 @@ void upd7210_wr(struct upd7210 *u, enum upd7210_wreg reg, u_int val) { - bus_write_1(u->reg_res[reg], 0, val); + bus_write_1(u->reg_res[reg], u->reg_offset[reg], val); u->wreg[reg] = val; if (reg == AUXMR) u->wreg[8 + (val >> 5)] = val & 0x1f; @@ -125,7 +125,8 @@ upd7210intr(void *arg) * Some clones apparently don't implement this * feature, but National Instrument cards do. */ - bus_write_1(u->irq_clear_res, 0, 42); + if (u->irq_clear_res != NULL) + bus_write_1(u->irq_clear_res, 0, 42); } mtx_unlock(&u->mutex); } Modified: head/sys/dev/ieee488/upd7210.h ============================================================================== --- head/sys/dev/ieee488/upd7210.h Sat Jan 23 20:28:37 2010 (r202897) +++ head/sys/dev/ieee488/upd7210.h Sat Jan 23 21:33:33 2010 (r202898) @@ -50,6 +50,7 @@ typedef int upd7210_irq_t(struct upd7210 struct upd7210 { struct resource *reg_res[8]; struct resource *irq_clear_res; + u_int reg_offset[8]; int dmachan; int unit; From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 21:59:51 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6977106566C; Sat, 23 Jan 2010 21:59:51 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by mx1.freebsd.org (Postfix) with ESMTP id 606ED8FC1C; Sat, 23 Jan 2010 21:59:50 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-232-148.belrs3.nsw.optusnet.com.au [122.106.232.148]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o0NLxmBZ031827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 Jan 2010 08:59:49 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o0NLxjNW000329; Sun, 24 Jan 2010 08:59:45 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o0NLxjnb000328; Sun, 24 Jan 2010 08:59:45 +1100 (EST) (envelope-from peter) Date: Sun, 24 Jan 2010 08:59:45 +1100 From: Peter Jeremy To: Warner Losh Message-ID: <20100123215945.GF31243@server.vk2pj.dyndns.org> References: <201001230024.o0N0OWEC038553@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="l+goss899txtYvYf" Content-Disposition: inline In-Reply-To: <201001230024.o0N0OWEC038553@svn.freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202850 - head/sys/mips/cavium X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 21:59:51 -0000 --l+goss899txtYvYf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Jan-23 00:24:31 +0000, Warner Losh wrote: >Author: imp >Date: Sat Jan 23 00:24:31 2010 >New Revision: 202850 >URL: http://svn.freebsd.org/changeset/base/202850 > >Log: > Migrate from old "DDB" style debugger to newer KDB style. > >Modified: > head/sys/mips/cavium/octeon_machdep.c > >Modified: head/sys/mips/cavium/octeon_machdep.c >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >--- head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 00:18:12 2010 (r20284= 9) >+++ head/sys/mips/cavium/octeon_machdep.c Sat Jan 23 00:24:31 2010 (r20285= 0) >@@ -110,7 +110,7 @@ platform_cpu_init() > void > platform_reset(void) > { >- ((void(*)(void))(long)0x9fc00000)(); /* Jump to MIPS reset vector */ >+ mips_generic_reset(); > } Was this bit intended? It doesn't tally with the log message. --=20 Peter Jeremy --l+goss899txtYvYf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAktbcVEACgkQ/opHv/APuIeB4QCfc62/hljZfq08+RkBLDgnOmXQ QhkAoLnCRCx8+bQx43g6lmkqaF+pEaBX =aO3P -----END PGP SIGNATURE----- --l+goss899txtYvYf-- From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 22:11:18 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0F77106575B; Sat, 23 Jan 2010 22:11:18 +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 9EBCF8FC12; Sat, 23 Jan 2010 22:11:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NMBIAu033773; Sat, 23 Jan 2010 22:11:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NMBILS033771; Sat, 23 Jan 2010 22:11:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001232211.o0NMBILS033771@svn.freebsd.org> From: Marius Strobl Date: Sat, 23 Jan 2010 22:11:18 +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: r202900 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 22:11:18 -0000 Author: marius Date: Sat Jan 23 22:11:18 2010 New Revision: 202900 URL: http://svn.freebsd.org/changeset/base/202900 Log: Merge r202882 from amd64/i386: For PT_TO_SCE stop that stops the ptraced process upon syscall entry, syscall arguments are collected before ptracestop() is called. As a consequence, debugger cannot modify syscall or its arguments. In syscall(), reread syscall number and arguments after ptracestop(), if debugger modified anything in the process environment. Since procfs stopevent requires number of syscall arguments in p_xstat, this cannot be solved by moving stop/trace point before argument fetching. Move the code to read arguments into separate function fetch_syscall_args() to avoid code duplication. Note that ktrace point for modified syscall is intentionally recorded twice, once with original arguments, and second time with the arguments set by debugger. PT_TO_SCX stop is executed after cpu_syscall_set_retval() already. Reviewed by: kib Modified: head/sys/sparc64/sparc64/trap.c Modified: head/sys/sparc64/sparc64/trap.c ============================================================================== --- head/sys/sparc64/sparc64/trap.c Sat Jan 23 21:47:07 2010 (r202899) +++ head/sys/sparc64/sparc64/trap.c Sat Jan 23 22:11:18 2010 (r202900) @@ -93,9 +93,18 @@ __FBSDID("$FreeBSD$"); #include #include +struct syscall_args { + u_long code; + struct sysent *callp; + register_t args[8]; + register_t *argp; + int narg; +}; + void trap(struct trapframe *tf); void syscall(struct trapframe *tf); +static int fetch_syscall_args(struct thread *td, struct syscall_args *sa); static int trap_pfault(struct thread *td, struct trapframe *tf); extern char copy_fault[]; @@ -522,137 +531,163 @@ trap_pfault(struct thread *td, struct tr /* Maximum number of arguments that can be passed via the out registers. */ #define REG_MAXARGS 6 -/* - * Syscall handler. The arguments to the syscall are passed in the o registers - * by the caller, and are saved in the trap frame. The syscall number is passed - * in %g1 (and also saved in the trap frame). - */ -void -syscall(struct trapframe *tf) +static int +fetch_syscall_args(struct thread *td, struct syscall_args *sa) { - struct sysent *callp; - struct thread *td; - register_t args[8]; - register_t *argp; + struct trapframe *tf; struct proc *p; - u_long code; int reg; int regcnt; - int narg; int error; - td = curthread; - KASSERT(td != NULL, ("trap: curthread NULL")); - KASSERT(td->td_proc != NULL, ("trap: curproc NULL")); - p = td->td_proc; - - PCPU_INC(cnt.v_syscall); - - td->td_pticks = 0; - td->td_frame = tf; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); - code = tf->tf_global[1]; - - /* - * For syscalls, we don't want to retry the faulting instruction - * (usually), instead we need to advance one instruction. - */ - td->td_pcb->pcb_tpc = tf->tf_tpc; - TF_DONE(tf); - + tf = td->td_frame; reg = 0; regcnt = REG_MAXARGS; + + sa->code = tf->tf_global[1]; + if (p->p_sysent->sv_prepsyscall) { - /* - * The prep code is MP aware. - */ #if 0 - (*p->p_sysent->sv_prepsyscall)(tf, args, &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(tf, sa->args, &sa->code, + ¶ms); #endif - } else if (code == SYS_syscall || code == SYS___syscall) { - code = tf->tf_out[reg++]; + } else if (sa->code == SYS_syscall || sa->code == SYS___syscall) { + sa->code = tf->tf_out[reg++]; regcnt--; } if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; + sa->code &= p->p_sysent->sv_mask; - if (code >= p->p_sysent->sv_size) - callp = &p->p_sysent->sv_table[0]; + if (sa->code >= p->p_sysent->sv_size) + sa->callp = &p->p_sysent->sv_table[0]; else - callp = &p->p_sysent->sv_table[code]; - - narg = callp->sy_narg; + sa->callp = &p->p_sysent->sv_table[sa->code]; - KASSERT(narg <= sizeof(args) / sizeof(args[0]), + sa->narg = sa->callp->sy_narg; + KASSERT(sa->narg <= sizeof(sa->args) / sizeof(sa->args[0]), ("Too many syscall arguments!")); error = 0; - argp = args; - bcopy(&tf->tf_out[reg], args, sizeof(args[0]) * regcnt); - if (narg > regcnt) + sa->argp = sa->args; + bcopy(&tf->tf_out[reg], sa->args, sizeof(sa->args[0]) * regcnt); + if (sa->narg > regcnt) error = copyin((void *)(tf->tf_out[6] + SPOFF + - offsetof(struct frame, fr_pad[6])), - &args[regcnt], (narg - regcnt) * sizeof(args[0])); - - CTR5(KTR_SYSC, "syscall: td=%p %s(%#lx, %#lx, %#lx)", td, - syscallnames[code], argp[0], argp[1], argp[2]); + offsetof(struct frame, fr_pad[6])), &sa->args[regcnt], + (sa->narg - regcnt) * sizeof(sa->args[0])); + /* + * This may result in two records if debugger modified + * registers or memory during sleep at stop/ptrace point. + */ #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(code, narg, argp); + ktrsyscall(sa->code, sa->narg, sa->argp); #endif + return (error); +} +/* + * Syscall handler + * The arguments to the syscall are passed in the out registers by the caller, + * and are saved in the trap frame. The syscall number is passed in %g1 (and + * also saved in the trap frame). + */ +void +syscall(struct trapframe *tf) +{ + struct syscall_args sa; + struct thread *td; + struct proc *p; + int error; + + td = curthread; + KASSERT(td != NULL, ("trap: curthread NULL")); + KASSERT(td->td_proc != NULL, ("trap: curproc NULL")); + + PCPU_INC(cnt.v_syscall); + p = td->td_proc; td->td_syscalls++; + td->td_pticks = 0; + td->td_frame = tf; + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + if ((p->p_flag & P_TRACED) != 0) { + PROC_LOCK(p); + td->td_dbgflags &= ~TDB_USERWR; + PROC_UNLOCK(p); + } + + /* + * For syscalls, we don't want to retry the faulting instruction + * (usually), instead we need to advance one instruction. + */ + td->td_pcb->pcb_tpc = tf->tf_tpc; + TF_DONE(tf); + + error = fetch_syscall_args(td, &sa); + CTR5(KTR_SYSC, "syscall: td=%p %s(%#lx, %#lx, %#lx)", td, + syscallnames[sa.code], sa.argp[0], sa.argp[1], sa.argp[2]); + if (error == 0) { td->td_retval[0] = 0; td->td_retval[1] = 0; - STOPEVENT(p, S_SCE, narg); /* MP aware */ - + STOPEVENT(p, S_SCE, sa.narg); PTRACESTOP_SC(p, td, S_PT_SCE); + if ((td->td_dbgflags & TDB_USERWR) != 0) { + /* + * Reread syscall number and arguments if + * debugger modified registers or memory. + */ + error = fetch_syscall_args(td, &sa); + if (error != 0) + goto retval; + td->td_retval[1] = 0; + } - AUDIT_SYSCALL_ENTER(code, td); - error = (*callp->sy_call)(td, argp); + AUDIT_SYSCALL_ENTER(sa.code, td); + error = (*sa.callp->sy_call)(td, sa.argp); AUDIT_SYSCALL_EXIT(error, td); - CTR5(KTR_SYSC, "syscall: p=%p error=%d %s return %#lx %#lx ", p, - error, syscallnames[code], td->td_retval[0], + CTR5(KTR_SYSC, "syscall: p=%p error=%d %s return %#lx %#lx", + p, error, syscallnames[sa.code], td->td_retval[0], td->td_retval[1]); } - + retval: cpu_set_syscall_retval(td, error); /* * Check for misbehavior. */ WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???")); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???")); KASSERT(td->td_locks == 0, ("System call %s returning with %d locks held", - (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???", - td->td_locks)); + (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? + syscallnames[sa.code] : "???", td->td_locks)); /* - * Handle reschedule and other end-of-syscall issues + * Handle reschedule and other end-of-syscall issues. */ userret(td, tf); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSRET)) - ktrsysret(code, error, td->td_retval[0]); + ktrsysret(sa.code, error, td->td_retval[0]); #endif /* * This works because errno is findable through the * register set. If we ever support an emulation where this * is not the case, this code will need to be revisited. */ - STOPEVENT(p, S_SCX, code); + STOPEVENT(p, S_SCX, sa.code); PTRACESTOP_SC(p, td, S_PT_SCX); } From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 22:38:02 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14A7D1065670; Sat, 23 Jan 2010 22:38:02 +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 DE58F8FC08; Sat, 23 Jan 2010 22:38:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NMc1RI039661; Sat, 23 Jan 2010 22:38:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NMc17q039658; Sat, 23 Jan 2010 22:38:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201001232238.o0NMc17q039658@svn.freebsd.org> From: Marius Strobl Date: Sat, 23 Jan 2010 22:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202903 - head/sys/fs/cd9660 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 22:38:02 -0000 Author: marius Date: Sat Jan 23 22:38:01 2010 New Revision: 202903 URL: http://svn.freebsd.org/changeset/base/202903 Log: On LP64 struct ifid is 64-bit aligned while struct fid is 32-bit aligned so on architectures with strict alignment requirements we can't just simply cast the latter to the former but need to copy it bytewise instead. PR: 143010 MFC after: 3 days Modified: head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/cd9660/cd9660_vnops.c Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Sat Jan 23 22:37:34 2010 (r202902) +++ head/sys/fs/cd9660/cd9660_vfsops.c Sat Jan 23 22:38:01 2010 (r202903) @@ -589,17 +589,19 @@ cd9660_fhtovp(mp, fhp, vpp) struct fid *fhp; struct vnode **vpp; { - struct ifid *ifhp = (struct ifid *)fhp; + struct ifid ifh; struct iso_node *ip; struct vnode *nvp; int error; + memcpy(&ifh, fhp, sizeof(ifh)); + #ifdef ISOFS_DBG printf("fhtovp: ino %d, start %ld\n", - ifhp->ifid_ino, ifhp->ifid_start); + ifh.ifid_ino, ifh.ifid_start); #endif - if ((error = VFS_VGET(mp, ifhp->ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { + if ((error = VFS_VGET(mp, ifh.ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { *vpp = NULLVP; return (error); } Modified: head/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vnops.c Sat Jan 23 22:37:34 2010 (r202902) +++ head/sys/fs/cd9660/cd9660_vnops.c Sat Jan 23 22:38:01 2010 (r202903) @@ -819,20 +819,25 @@ cd9660_vptofh(ap) struct fid *a_fhp; } */ *ap; { + struct ifid ifh; struct iso_node *ip = VTOI(ap->a_vp); - struct ifid *ifhp; - ifhp = (struct ifid *)ap->a_fhp; - ifhp->ifid_len = sizeof(struct ifid); + ifh.ifid_len = sizeof(struct ifid); - ifhp->ifid_ino = ip->i_number; - ifhp->ifid_start = ip->iso_start; + ifh.ifid_ino = ip->i_number; + ifh.ifid_start = ip->iso_start; + /* + * This intentionally uses sizeof(ifh) in order to not copy stack + * garbage on ILP32. + */ + memcpy(ap->a_fhp, &ifh, sizeof(ifh)); #ifdef ISOFS_DBG printf("vptofh: ino %d, start %ld\n", - ifhp->ifid_ino,ifhp->ifid_start); + ifh.ifid_ino, ifh.ifid_start); #endif - return 0; + + return (0); } /* From owner-svn-src-head@FreeBSD.ORG Sat Jan 23 23:16:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 602CE106566B; Sat, 23 Jan 2010 23:16:50 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F1EA8FC0C; Sat, 23 Jan 2010 23:16:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0NNGo3Q048259; Sat, 23 Jan 2010 23:16:50 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0NNGovT048257; Sat, 23 Jan 2010 23:16:50 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201001232316.o0NNGovT048257@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 23 Jan 2010 23:16:50 +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: r202904 - head/sys/ia64/ia64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 23:16:50 -0000 Author: marcel Date: Sat Jan 23 23:16:50 2010 New Revision: 202904 URL: http://svn.freebsd.org/changeset/base/202904 Log: Remove cpu_boot() and call efi_reset_system() directly from cpu_reset(). Modified: head/sys/ia64/ia64/machdep.c Modified: head/sys/ia64/ia64/machdep.c ============================================================================== --- head/sys/ia64/ia64/machdep.c Sat Jan 23 22:38:01 2010 (r202903) +++ head/sys/ia64/ia64/machdep.c Sat Jan 23 23:16:50 2010 (r202904) @@ -373,13 +373,6 @@ cpu_startup(void *dummy) SYSINIT(cpu_startup, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); void -cpu_boot(int howto) -{ - - efi_reset_system(); -} - -void cpu_flush_dcache(void *ptr, size_t len) { vm_offset_t lim, va; @@ -434,7 +427,7 @@ void cpu_reset() { - cpu_boot(0); + efi_reset_system(); } void