From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 00:10:49 2011 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 E6A93106566C; Sun, 13 Nov 2011 00:10:49 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0B5AF8FC08; Sun, 13 Nov 2011 00:10:48 +0000 (UTC) Received: by bkbzs8 with SMTP id zs8so6358278bkb.13 for ; Sat, 12 Nov 2011 16:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=AP8CEcH7ZDAE0LTne8jXxHfHa7a1uGBTQxdChPbPZiE=; b=QItZ2jzpCL7rPHAakHfxKyq9mwztkYPgpgSDMVhxeKIeA+MLb/5QKyWRPutQaZvPQZ Bl/LK7pAMtuuqqYRlPgATUIO17pTEbYTn294Clnois10e3T+C2TmLtiRZ8MY04eEgeeo XqtH80aoRw9Aeu4mzG4MNuJOemb+JU9q/XfVQ= Received: by 10.204.143.148 with SMTP id v20mr5742342bku.104.1321143047769; Sat, 12 Nov 2011 16:10:47 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id m12sm11444429bkg.14.2011.11.12.16.10.46 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Nov 2011 16:10:46 -0800 (PST) Sender: Alexander Motin Message-ID: <4EBF0B04.40604@FreeBSD.org> Date: Sun, 13 Nov 2011 02:10:44 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111003 Thunderbird/7.0.1 MIME-Version: 1.0 To: Marius Strobl References: <201111012312.pA1NCNuY089112@svn.freebsd.org> <20111112210900.GJ56603@alchemy.franken.de> In-Reply-To: <20111112210900.GJ56603@alchemy.franken.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227009 - head/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, 13 Nov 2011 00:10:50 -0000 On 11/12/11 23:09, Marius Strobl wrote: > On Tue, Nov 01, 2011 at 11:12:23PM +0000, Alexander Motin wrote: >> Author: mav >> Date: Tue Nov 1 23:12:22 2011 >> New Revision: 227009 >> URL: http://svn.freebsd.org/changeset/base/227009 >> >> Log: >> Make orphan() method in geom_dev asynchronous using destroy_dev_sched_cb() >> instead of destroy_dev(). It moves device destruction waiting out of the >> topology lock and so fixes dead lock between orphanization and closing. >> Real provider and geom destruction called from swi context after device >> destroyed as callback of the destroy_dev_sched_cb(). >> > > This change causes fsck_ffs(8) and mount(8) to hang unkillably on > sparc64 when the kernel is built with either GEOM_PART_GPT or > GEOM_LABEL. When breaking into the kernel the backtrace so far > looked like one of these two ways: > g_wither_washer() at g_wither_washer+0x18 > g_run_events() at g_run_events+0x4dc > g_event_procbody() at g_event_procbody+0x8c > fork_exit() at fork_exit+0x9c > fork_trampoline() at fork_trampoline+0x8 > > find_instance() at find_instance+0x80 > _sx_xlock() at _sx_xlock+0xf0 > g_run_events() at g_run_events+0xb0 > g_event_procbody() at g_event_procbody+0x8c > fork_exit() at fork_exit+0x9c > fork_trampoline() at fork_trampoline+0x8 > > I've no clue about geom(4) so I also have no idea how to debug this. I think `show alllocks` in debugger and backtraces of related threads could be useful. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 01:03:30 2011 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 B82E0106564A; Sun, 13 Nov 2011 01:03:30 +0000 (UTC) (envelope-from benlaurie@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 348228FC0C; Sun, 13 Nov 2011 01:03:30 +0000 (UTC) Received: by vcbfo14 with SMTP id fo14so6306318vcb.13 for ; Sat, 12 Nov 2011 17:03:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WBsDetVpP5nOKQICrGb4ma5VmOCZC1HeZZDv9sxs/HU=; b=xZUdMbCoSi/UGtL+lKC+2RKXyzqOAk0l13DrgwqAkrSWRT553I7H6bE9wqXOoD3mzg u6RLWeo98Qe9h648oaGbVi+dbvOJ+OyxabNJgcN/EPIw/IqrUwv6AloePYjn2kavn1Bo fkh2dZ5t3sPoNjC1cCBOCwBkhxQUAejd0iefA= MIME-Version: 1.0 Received: by 10.52.112.74 with SMTP id io10mr28087178vdb.116.1321144416362; Sat, 12 Nov 2011 16:33:36 -0800 (PST) Sender: benlaurie@gmail.com Received: by 10.52.114.102 with HTTP; Sat, 12 Nov 2011 16:33:36 -0800 (PST) In-Reply-To: <201111112257.pABMvqjl012442@svn.freebsd.org> References: <201111112257.pABMvqjl012442@svn.freebsd.org> Date: Sat, 12 Nov 2011 16:33:36 -0800 X-Google-Sender-Auth: KgqDDQDKmTwO0iaSUuH-7yDRPn4 Message-ID: From: Ben Laurie To: Brooks Davis Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227459 - in head/sys: dev/lmc net netgraph 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, 13 Nov 2011 01:03:30 -0000 On Fri, Nov 11, 2011 at 2:57 PM, Brooks Davis wrote: > Author: brooks > Date: Fri Nov 11 22:57:52 2011 > New Revision: 227459 > URL: http://svn.freebsd.org/changeset/base/227459 > > Log: > =A0In r191367 the need for if_free_type() was removed and a new member > =A0if_alloctype was used to store the origional interface type. =A0Take > =A0advantage of this change by removing all existing uses of if_free_type= () > =A0in favor of if_free(). Just an observation: this change removes an annotation that could be useful for correctness checking. Do we care? > > =A0MFC after: =A0 =A01 Month > > Modified: > =A0head/sys/dev/lmc/if_lmc.c > =A0head/sys/net/if_bridge.c > =A0head/sys/net/if_lagg.c > =A0head/sys/net/if_tap.c > =A0head/sys/net/if_vlan.c > =A0head/sys/netgraph/ng_fec.c > =A0head/sys/netinet/ip_carp.c > > Modified: head/sys/dev/lmc/if_lmc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/lmc/if_lmc.c =A0 Fri Nov 11 22:27:09 2011 =A0 =A0 =A0 = =A0(r227458) > +++ head/sys/dev/lmc/if_lmc.c =A0 Fri Nov 11 22:57:52 2011 =A0 =A0 =A0 = =A0(r227459) > @@ -4945,7 +4945,9 @@ lmc_ifnet_detach(softc_t *sc) > =A0 /* Detach from the ifnet kernel interface. */ > =A0 if_detach(sc->ifp); > > -# if (__FreeBSD_version >=3D 600000) > +# if (defined(__FreeBSD__) && __FreeBSD_version >=3D 800082) > + =A0if_free(sc->ifp); > +# elif (defined(__FreeBSD__) && __FreeBSD_version >=3D 600000) > =A0 if_free_type(sc->ifp, NSPPP ? IFT_PPP : IFT_OTHER); > =A0# endif > =A0 } > > Modified: head/sys/net/if_bridge.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/net/if_bridge.c =A0 =A0Fri Nov 11 22:27:09 2011 =A0 =A0 =A0 = =A0(r227458) > +++ head/sys/net/if_bridge.c =A0 =A0Fri Nov 11 22:57:52 2011 =A0 =A0 =A0 = =A0(r227459) > @@ -676,7 +676,7 @@ bridge_clone_destroy(struct ifnet *ifp) > > =A0 =A0 =A0 =A0bstp_detach(&sc->sc_stp); > =A0 =A0 =A0 =A0ether_ifdetach(ifp); > - =A0 =A0 =A0 if_free_type(ifp, IFT_ETHER); > + =A0 =A0 =A0 if_free(ifp); > > =A0 =A0 =A0 =A0/* Tear down the routing table. */ > =A0 =A0 =A0 =A0bridge_rtable_fini(sc); > > Modified: head/sys/net/if_lagg.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/net/if_lagg.c =A0 =A0 =A0Fri Nov 11 22:27:09 2011 =A0 =A0 = =A0 =A0(r227458) > +++ head/sys/net/if_lagg.c =A0 =A0 =A0Fri Nov 11 22:57:52 2011 =A0 =A0 = =A0 =A0(r227459) > @@ -275,7 +275,7 @@ lagg_clone_create(struct if_clone *ifc, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (lagg_protos[i].ti_proto =3D=3D LAGG_PR= OTO_DEFAULT) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sc->sc_proto =3D lagg_prot= os[i].ti_proto; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if ((error =3D lagg_protos= [i].ti_attach(sc)) !=3D 0) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if_free_typ= e(ifp, IFT_ETHER); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if_free(ifp= ); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0free(sc, M= _DEVBUF); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return (er= ror); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > @@ -293,7 +293,6 @@ lagg_clone_create(struct if_clone *ifc, > =A0 =A0 =A0 =A0ifmedia_set(&sc->sc_media, IFM_ETHER | IFM_AUTO); > > =A0 =A0 =A0 =A0if_initname(ifp, ifc->ifc_name, unit); > - =A0 =A0 =A0 ifp->if_type =3D IFT_ETHER; > =A0 =A0 =A0 =A0ifp->if_softc =3D sc; > =A0 =A0 =A0 =A0ifp->if_start =3D lagg_start; > =A0 =A0 =A0 =A0ifp->if_init =3D lagg_init; > @@ -305,7 +304,7 @@ lagg_clone_create(struct if_clone *ifc, > =A0 =A0 =A0 =A0IFQ_SET_READY(&ifp->if_snd); > > =A0 =A0 =A0 =A0/* > - =A0 =A0 =A0 =A0* Attach as an ordinary ethernet device, childs will be = attached > + =A0 =A0 =A0 =A0* Attach as an ordinary ethernet device, children will b= e attached > =A0 =A0 =A0 =A0 * as special device IFT_IEEE8023ADLAG. > =A0 =A0 =A0 =A0 */ > =A0 =A0 =A0 =A0ether_ifattach(ifp, eaddr); > @@ -352,7 +351,7 @@ lagg_clone_destroy(struct ifnet *ifp) > > =A0 =A0 =A0 =A0ifmedia_removeall(&sc->sc_media); > =A0 =A0 =A0 =A0ether_ifdetach(ifp); > - =A0 =A0 =A0 if_free_type(ifp, IFT_ETHER); > + =A0 =A0 =A0 if_free(ifp); > > =A0 =A0 =A0 =A0mtx_lock(&lagg_list_mtx); > =A0 =A0 =A0 =A0SLIST_REMOVE(&lagg_list, sc, lagg_softc, sc_entries); > > Modified: head/sys/net/if_tap.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/net/if_tap.c =A0 =A0 =A0 Fri Nov 11 22:27:09 2011 =A0 =A0 = =A0 =A0(r227458) > +++ head/sys/net/if_tap.c =A0 =A0 =A0 Fri Nov 11 22:57:52 2011 =A0 =A0 = =A0 =A0(r227459) > @@ -218,7 +218,7 @@ tap_destroy(struct tap_softc *tp) > =A0 =A0 =A0 =A0knlist_destroy(&tp->tap_rsel.si_note); > =A0 =A0 =A0 =A0destroy_dev(tp->tap_dev); > =A0 =A0 =A0 =A0ether_ifdetach(ifp); > - =A0 =A0 =A0 if_free_type(ifp, IFT_ETHER); > + =A0 =A0 =A0 if_free(ifp); > > =A0 =A0 =A0 =A0mtx_destroy(&tp->tap_mtx); > =A0 =A0 =A0 =A0free(tp, M_TAP); > > Modified: head/sys/net/if_vlan.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/net/if_vlan.c =A0 =A0 =A0Fri Nov 11 22:27:09 2011 =A0 =A0 = =A0 =A0(r227458) > +++ head/sys/net/if_vlan.c =A0 =A0 =A0Fri Nov 11 22:57:52 2011 =A0 =A0 = =A0 =A0(r227459) > @@ -967,7 +967,7 @@ vlan_clone_create(struct if_clone *ifc, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 */ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ether_ifdetach(ifp); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0vlan_unconfig(ifp); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if_free_type(ifp, IFT_ETHER= ); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if_free(ifp); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ifc_free_unit(ifc, unit); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0free(ifv, M_VLAN); > > @@ -989,7 +989,7 @@ vlan_clone_destroy(struct if_clone *ifc, > > =A0 =A0 =A0 =A0ether_ifdetach(ifp); =A0 =A0/* first, remove it from syste= m-wide lists */ > =A0 =A0 =A0 =A0vlan_unconfig(ifp); =A0 =A0 /* now it can be unconfigured = and freed */ > - =A0 =A0 =A0 if_free_type(ifp, IFT_ETHER); > + =A0 =A0 =A0 if_free(ifp); > =A0 =A0 =A0 =A0free(ifv, M_VLAN); > =A0 =A0 =A0 =A0ifc_free_unit(ifc, unit); > > > Modified: head/sys/netgraph/ng_fec.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/netgraph/ng_fec.c =A0Fri Nov 11 22:27:09 2011 =A0 =A0 =A0 = =A0(r227458) > +++ head/sys/netgraph/ng_fec.c =A0Fri Nov 11 22:57:52 2011 =A0 =A0 =A0 = =A0(r227459) > @@ -1332,7 +1332,7 @@ ng_fec_shutdown(node_p node) > =A0 =A0 =A0 =A0} > > =A0 =A0 =A0 =A0ether_ifdetach(priv->ifp); > - =A0 =A0 =A0 if_free_type(priv->ifp, IFT_ETHER); > + =A0 =A0 =A0 if_free(priv->ifp); > =A0 =A0 =A0 =A0ifmedia_removeall(&priv->ifmedia); > =A0 =A0 =A0 =A0ng_fec_free_unit(priv->unit); > =A0 =A0 =A0 =A0free(priv, M_NETGRAPH); > > Modified: head/sys/netinet/ip_carp.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/netinet/ip_carp.c =A0Fri Nov 11 22:27:09 2011 =A0 =A0 =A0 = =A0(r227458) > +++ head/sys/netinet/ip_carp.c =A0Fri Nov 11 22:57:52 2011 =A0 =A0 =A0 = =A0(r227459) > @@ -472,7 +472,7 @@ carp_clone_destroy(struct ifnet *ifp) > =A0 =A0 =A0 =A0mtx_unlock(&carp_mtx); > =A0 =A0 =A0 =A0bpfdetach(ifp); > =A0 =A0 =A0 =A0if_detach(ifp); > - =A0 =A0 =A0 if_free_type(ifp, IFT_ETHER); > + =A0 =A0 =A0 if_free(ifp); > =A0#ifdef INET > =A0 =A0 =A0 =A0free(sc->sc_imo.imo_membership, M_CARP); > =A0#endif > From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 01:47:31 2011 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 684E6106566C; Sun, 13 Nov 2011 01:47:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 585C68FC08; Sun, 13 Nov 2011 01:47:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAD1lVWe070554; Sun, 13 Nov 2011 01:47:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAD1lVXc070552; Sun, 13 Nov 2011 01:47:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201111130147.pAD1lVXc070552@svn.freebsd.org> From: Glen Barber Date: Sun, 13 Nov 2011 01:47: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: r227480 - 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: Sun, 13 Nov 2011 01:47:31 -0000 Author: gjb (doc committer) Date: Sun Nov 13 01:47:31 2011 New Revision: 227480 URL: http://svn.freebsd.org/changeset/base/227480 Log: Revert 227466: - mvs.4 uses nested '.Bl' tags which appears to confuse man2hwnotes.pl for hardware note generation - mps.4 also breaks the build, but I haven't yet identified why 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 Sat Nov 12 23:30:57 2011 (r227479) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Sun Nov 13 01:47:31 2011 (r227480) @@ -798,12 +798,8 @@ &hwlist.mly; - &hwlist.mps; - &hwlist.mpt; - &hwlist.mvs; - &hwlist.ncr; &hwlist.ncv; From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 02:32:10 2011 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 E5F1A1065673; Sun, 13 Nov 2011 02:32:10 +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 D67B48FC0C; Sun, 13 Nov 2011 02:32:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAD2WAQZ072371; Sun, 13 Nov 2011 02:32:10 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAD2WAGM072369; Sun, 13 Nov 2011 02:32:10 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201111130232.pAD2WAGM072369@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 13 Nov 2011 02: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: r227481 - head/sys/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, 13 Nov 2011 02:32:11 -0000 Author: bz Date: Sun Nov 13 02:32:10 2011 New Revision: 227481 URL: http://svn.freebsd.org/changeset/base/227481 Log: Return the correct value for the IPV6_MULTICAST_HOPS getsockopt() call. Submitted by: rpaulo MFC after: 3 days Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Sun Nov 13 01:47:31 2011 (r227480) +++ head/sys/netinet6/in6_mcast.c Sun Nov 13 02:32:10 2011 (r227481) @@ -1714,7 +1714,7 @@ ip6_getmoptions(struct inpcb *inp, struc if (im6o == NULL) optval = V_ip6_defmcasthlim; else - optval = im6o->im6o_multicast_loop; + optval = im6o->im6o_multicast_hlim; INP_WUNLOCK(inp); error = sooptcopyout(sopt, &optval, sizeof(u_int)); break; From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 03:01:59 2011 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 644C71065675; Sun, 13 Nov 2011 03:01:59 +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 3B4998FC12; Sun, 13 Nov 2011 03:01:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAD31xjZ073445; Sun, 13 Nov 2011 03:01:59 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAD31xYK073443; Sun, 13 Nov 2011 03:01:59 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201111130301.pAD31xYK073443@svn.freebsd.org> From: Doug Barton Date: Sun, 13 Nov 2011 03:01: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: r227482 - head/etc/periodic/daily 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, 13 Nov 2011 03:01:59 -0000 Author: dougb Date: Sun Nov 13 03:01:58 2011 New Revision: 227482 URL: http://svn.freebsd.org/changeset/base/227482 Log: The default setting, daily_accounting_compress="NO", was causing only 1 old file to be saved, so fix this. Problem raised in the PR, but actually required a different solution. While I'm here, fix a very old off-by-one error causing 1 more file than specified in daily_accounting_save to be saved because acct.0 was not taken into account (pun intended). Change that, and use a more thorough method of finding old files to delete. Partly just because this is the right thing to do, but also to silently fix the extra log that would have been left behind forever with the previous method. PR: conf/160848 Submitted by: Andrey Zonov Modified: head/etc/periodic/daily/310.accounting Modified: head/etc/periodic/daily/310.accounting ============================================================================== --- head/etc/periodic/daily/310.accounting Sun Nov 13 02:32:10 2011 (r227481) +++ head/etc/periodic/daily/310.accounting Sun Nov 13 03:01:58 2011 (r227482) @@ -30,8 +30,13 @@ case "$daily_accounting_enable" in cd /var/account rc=0 - n=$daily_accounting_save - rm -f acct.$n.gz acct.$n || rc=3 + n=$(( $daily_accounting_save - 1 )) + for f in acct.*; do + case "$f" in acct.\*) continue ;; esac # No files match + m=${f%.gz} ; m=${m#acct.} + [ $m -ge $n ] && { rm $f || rc=3; } + done + m=$n n=$(($n - 1)) while [ $n -ge 0 ] @@ -44,13 +49,14 @@ case "$daily_accounting_enable" in /etc/rc.d/accounting rotate_log || rc=3 + rm -f acct.merge && cp acct.0 acct.merge || rc=3 + sa -s $daily_accounting_flags /var/account/acct.merge || rc=3 + rm acct.merge + case "$daily_accounting_compress" in [Yy][Ee][Ss]) - gzip --keep -f acct.0 || rc=3;; + gzip -f acct.0 || rc=3;; esac - - sa -s $daily_accounting_flags /var/account/acct.0 && - unlink acct.0 || rc=3 fi;; *) rc=0;; From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 03:18:58 2011 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 61AE31065672; Sun, 13 Nov 2011 03:18:58 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1892C8FC12; Sun, 13 Nov 2011 03:18:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAD3IvDO074146; Sun, 13 Nov 2011 03:18:57 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAD3IvGr074144; Sun, 13 Nov 2011 03:18:57 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201111130318.pAD3IvGr074144@svn.freebsd.org> From: Alfred Perlstein Date: Sun, 13 Nov 2011 03:18: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: r227483 - head/usr.sbin/portsnap/portsnap 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, 13 Nov 2011 03:18:58 -0000 Author: alfred Date: Sun Nov 13 03:18:57 2011 New Revision: 227483 URL: http://svn.freebsd.org/changeset/base/227483 Log: Utilize shell's IFS instead of forking ~6 processes to handle splitting input files on a '|'. This greatly reduces the time taken to process several databases during the update process. Additionally add some more debug logging. Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.sh Sun Nov 13 03:01:58 2011 (r227482) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Sun Nov 13 03:18:57 2011 (r227483) @@ -570,14 +570,16 @@ fetch_metadata_sanity() { # Take a list of ${oldhash}|${newhash} and output a list of needed patches fetch_make_patchlist() { - grep -vE "^([0-9a-f]{64})\|\1$" | - while read LINE; do - X=`echo ${LINE} | cut -f 1 -d '|'` - Y=`echo ${LINE} | cut -f 2 -d '|'` - if [ -f "files/${Y}.gz" ]; then continue; fi - if [ ! -f "files/${X}.gz" ]; then continue; fi - echo "${LINE}" + IFS='|' + echo "" 1>${QUIETREDIR} + grep -vE "^([0-9a-f]{64})\|\1$" | + while read X Y; do + printf "Processing: $X $Y ...\r" 1>${QUIETREDIR} + if [ -f "files/${Y}.gz" -o ! -f "files/${X}.gz" ]; then continue; fi + echo "${X}|${Y}" done + echo "" 1>${QUIETREDIR} + IFS= } # Print user-friendly progress statistics @@ -692,9 +694,8 @@ fetch_update() { # Attempt to apply metadata patches echo -n "Applying metadata patches... " - while read LINE; do - X=`echo ${LINE} | cut -f 1 -d '|'` - Y=`echo ${LINE} | cut -f 2 -d '|'` + IFS='|' + while read X Y; do if [ ! -f "${X}-${Y}.gz" ]; then continue; fi gunzip -c < ${X}-${Y}.gz > diff gunzip -c < files/${X}.gz > OLD @@ -707,6 +708,7 @@ fetch_update() { fi rm -f diff OLD NEW ${X}-${Y}.gz ptmp done < patchlist 2>${QUIETREDIR} + IFS= echo "done." # Update metadata without patches @@ -724,16 +726,19 @@ fetch_update() { 2>${QUIETREDIR} while read Y; do + echo -n "Verifying ${Y}... " 1>${QUIETREDIR} if [ `gunzip -c < ${Y}.gz | ${SHA256} -q` = ${Y} ]; then mv ${Y}.gz files/${Y}.gz else echo "metadata is corrupt." return 1 fi + echo "ok." 1>${QUIETREDIR} done < filelist echo "done." # Extract the index + echo -n "Extracting index... " 1>${QUIETREDIR} gunzip -c files/`look INDEX tINDEX.new | cut -f 2 -d '|'`.gz > INDEX.new fetch_index_sanity || return 1 @@ -754,8 +759,10 @@ fetch_update() { fi # Generate a list of wanted ports patches + echo -n "Generating list of wanted patches..." 1>${QUIETREDIR} join -t '|' -o 1.2,2.2 INDEX INDEX.new | fetch_make_patchlist > patchlist + echo " done." 1>${QUIETREDIR} # Attempt to fetch ports patches echo -n "Fetching `wc -l < patchlist | tr -d ' '` " @@ -766,11 +773,18 @@ fetch_update() { echo "done." # Attempt to apply ports patches - echo -n "Applying patches... " - while read LINE; do - X=`echo ${LINE} | cut -f 1 -d '|'` - Y=`echo ${LINE} | cut -f 2 -d '|'` - if [ ! -f "${X}-${Y}" ]; then continue; fi + PATCHCNT=`wc -l patchlist` + echo "Applying patches... " + IFS='|' + I=0 + while read X Y; do + I=$(($I + 1)) + F="${X}-${Y}" + if [ ! -f "${F}" ]; then + printf " Skipping ${F} (${I} of ${PATCHCNT}).\r" + continue; + fi + echo " Processing ${F}..." 1>${QUIETREDIR} gunzip -c < files/${X}.gz > OLD ${BSPATCH} OLD NEW ${X}-${Y} if [ `${SHA256} -q NEW` = ${Y} ]; then @@ -779,6 +793,7 @@ fetch_update() { fi rm -f diff OLD NEW ${X}-${Y} done < patchlist 2>${QUIETREDIR} + IFS= echo "done." # Update ports without patches @@ -795,7 +810,10 @@ fetch_update() { xargs ${XARGST} ${PHTTPGET} ${SERVERNAME} \ 2>${QUIETREDIR} + I=0 while read Y; do + I=$(($I + 1)) + printf " Processing ${Y} (${I} of ${PATCHCNT}).\r" 1>${QUIETREDIR} if [ `gunzip -c < ${Y}.gz | ${SHA256} -q` = ${Y} ]; then mv ${Y}.gz files/${Y}.gz else @@ -877,6 +895,7 @@ extract_metadata() { # Do the actual work involved in "extract" extract_run() { + local IFS='|' mkdir -p ${PORTSDIR} || return 1 if ! @@ -886,7 +905,7 @@ extract_run() { grep -vE "${REFUSE}" ${WORKDIR}/INDEX else cat ${WORKDIR}/INDEX - fi | tr '|' ' ' | while read FILE HASH; do + fi | while read FILE HASH; do echo ${PORTSDIR}/${FILE} if ! [ -r "${WORKDIR}/files/${HASH}.gz" ]; then echo "files/${HASH}.gz not found -- snapshot corrupt." @@ -916,35 +935,8 @@ extract_run() { extract_indices } -# Do the actual work involved in "update" -update_run() { - if ! [ -z "${INDEXONLY}" ]; then - extract_indices >/dev/null || return 1 - return 0 - fi - - if sort ${WORKDIR}/INDEX | - cmp -s ${PORTSDIR}/.portsnap.INDEX -; then - echo "Ports tree is already up to date." - return 0 - fi - -# If we are REFUSEing to touch certain directories, don't remove files -# from those directories (even if they are out of date) - echo -n "Removing old files and directories... " - if ! [ -z "${REFUSE}" ]; then - sort ${WORKDIR}/INDEX | - comm -23 ${PORTSDIR}/.portsnap.INDEX - | cut -f 1 -d '|' | - grep -vE "${REFUSE}" | - lam -s "${PORTSDIR}/" - | - sed -e 's|/$||' | xargs rm -rf - else - sort ${WORKDIR}/INDEX | - comm -23 ${PORTSDIR}/.portsnap.INDEX - | cut -f 1 -d '|' | - lam -s "${PORTSDIR}/" - | - sed -e 's|/$||' | xargs rm -rf - fi - echo "done." +update_run_exract() { + local IFS='|' # Install new files echo "Extracting new files:" @@ -955,9 +947,7 @@ update_run() { sort ${WORKDIR}/INDEX fi | comm -13 ${PORTSDIR}/.portsnap.INDEX - | - while read LINE; do - FILE=`echo ${LINE} | cut -f 1 -d '|'` - HASH=`echo ${LINE} | cut -f 2 -d '|'` + while read FILE HASH; do echo ${PORTSDIR}/${FILE} if ! [ -r "${WORKDIR}/files/${HASH}.gz" ]; then echo "files/${HASH}.gz not found -- snapshot corrupt." @@ -977,7 +967,39 @@ update_run() { done; then return 1 fi +} + +# Do the actual work involved in "update" +update_run() { + if ! [ -z "${INDEXONLY}" ]; then + extract_indices >/dev/null || return 1 + return 0 + fi + + if sort ${WORKDIR}/INDEX | + cmp -s ${PORTSDIR}/.portsnap.INDEX -; then + echo "Ports tree is already up to date." + return 0 + fi + +# If we are REFUSEing to touch certain directories, don't remove files +# from those directories (even if they are out of date) + echo -n "Removing old files and directories... " + if ! [ -z "${REFUSE}" ]; then + sort ${WORKDIR}/INDEX | + comm -23 ${PORTSDIR}/.portsnap.INDEX - | cut -f 1 -d '|' | + grep -vE "${REFUSE}" | + lam -s "${PORTSDIR}/" - | + sed -e 's|/$||' | xargs rm -rf + else + sort ${WORKDIR}/INDEX | + comm -23 ${PORTSDIR}/.portsnap.INDEX - | cut -f 1 -d '|' | + lam -s "${PORTSDIR}/" - | + sed -e 's|/$||' | xargs rm -rf + fi + echo "done." + update_run_exract || return 1 extract_metadata extract_indices } From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 03:25:28 2011 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 78FF7106566C; Sun, 13 Nov 2011 03:25:28 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id ED6AE8FC12; Sun, 13 Nov 2011 03:25:27 +0000 (UTC) Received: by pzk33 with SMTP id 33so17973845pzk.3 for ; Sat, 12 Nov 2011 19:25:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=r4qc0hdEx7LZIqZrBZKPcPJocNE+fsqkW7gQpwW4GVs=; b=CHpfSKOVkVe+O8iwkICSLuMzulXUdLpCuQbVOYL2pOu3tEHBMHl8vojkmTB2kbd1wB jo+vNY8OGAOdC8tnUiPjWw67Mcxxalm+TqPabppkdQOiX736mIKTMOcy82ZOYObnLPxA lZVGdywEK7kn0qQamopm24IBbnmfvwG04bv6k= Received: by 10.68.20.233 with SMTP id q9mr32555667pbe.99.1321154727285; Sat, 12 Nov 2011 19:25:27 -0800 (PST) Received: from [192.168.20.5] (c-24-6-49-154.hsd1.ca.comcast.net. [24.6.49.154]) by mx.google.com with ESMTPS id s4sm44234009pbq.8.2011.11.12.19.25.25 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Nov 2011 19:25:26 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Garrett Cooper In-Reply-To: <201111130318.pAD3IvGr074144@svn.freebsd.org> Date: Sat, 12 Nov 2011 19:25:23 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <32EF12FA-07AC-481C-A407-3C8B578484C4@gmail.com> References: <201111130318.pAD3IvGr074144@svn.freebsd.org> To: Alfred Perlstein X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227483 - head/usr.sbin/portsnap/portsnap 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, 13 Nov 2011 03:25:28 -0000 On Nov 12, 2011, at 7:18 PM, Alfred Perlstein wrote: > Author: alfred > Date: Sun Nov 13 03:18:57 2011 > New Revision: 227483 > URL: http://svn.freebsd.org/changeset/base/227483 >=20 > Log: > Utilize shell's IFS instead of forking ~6 processes to > handle splitting input files on a '|'. This greatly > reduces the time taken to process several databases > during the update process. >=20 > Additionally add some more debug logging. >=20 > Modified: > head/usr.sbin/portsnap/portsnap/portsnap.sh >=20 > Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/usr.sbin/portsnap/portsnap/portsnap.sh Sun Nov 13 = 03:01:58 2011 (r227482) > +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Sun Nov 13 = 03:18:57 2011 (r227483) > @@ -570,14 +570,16 @@ fetch_metadata_sanity() { >=20 > # Take a list of ${oldhash}|${newhash} and output a list of needed = patches > fetch_make_patchlist() { > - grep -vE "^([0-9a-f]{64})\|\1$" |=20 > - while read LINE; do > - X=3D`echo ${LINE} | cut -f 1 -d '|'` > - Y=3D`echo ${LINE} | cut -f 2 -d '|'` > - if [ -f "files/${Y}.gz" ]; then continue; fi > - if [ ! -f "files/${X}.gz" ]; then continue; fi > - echo "${LINE}" > + IFS=3D'|' > + echo "" 1>${QUIETREDIR} > + grep -vE "^([0-9a-f]{64})\|\1$" | > + while read X Y; do > + printf "Processing: $X $Y ...\r" 1>${QUIETREDIR} > + if [ -f "files/${Y}.gz" -o ! -f "files/${X}.gz" = ]; then continue; fi > + echo "${X}|${Y}" > done > + echo "" 1>${QUIETREDIR} > + IFS=3D > } >=20 > # Print user-friendly progress statistics > @@ -692,9 +694,8 @@ fetch_update() { >=20 > # Attempt to apply metadata patches > echo -n "Applying metadata patches... " > - while read LINE; do > - X=3D`echo ${LINE} | cut -f 1 -d '|'` > - Y=3D`echo ${LINE} | cut -f 2 -d '|'` > + IFS=3D'|' > + while read X Y; do > if [ ! -f "${X}-${Y}.gz" ]; then continue; fi > gunzip -c < ${X}-${Y}.gz > diff > gunzip -c < files/${X}.gz > OLD > @@ -707,6 +708,7 @@ fetch_update() { > fi > rm -f diff OLD NEW ${X}-${Y}.gz ptmp > done < patchlist 2>${QUIETREDIR} > + IFS=3D > echo "done." >=20 > # Update metadata without patches > @@ -724,16 +726,19 @@ fetch_update() { > 2>${QUIETREDIR} >=20 > while read Y; do > + echo -n "Verifying ${Y}... " 1>${QUIETREDIR} > if [ `gunzip -c < ${Y}.gz | ${SHA256} -q` =3D ${Y} ]; = then > mv ${Y}.gz files/${Y}.gz > else > echo "metadata is corrupt." > return 1 > fi > + echo "ok." 1>${QUIETREDIR} > done < filelist > echo "done." >=20 > # Extract the index > + echo -n "Extracting index... " 1>${QUIETREDIR} > gunzip -c files/`look INDEX tINDEX.new | > cut -f 2 -d '|'`.gz > INDEX.new > fetch_index_sanity || return 1 > @@ -754,8 +759,10 @@ fetch_update() { > fi >=20 > # Generate a list of wanted ports patches > + echo -n "Generating list of wanted patches..." 1>${QUIETREDIR} > join -t '|' -o 1.2,2.2 INDEX INDEX.new | > fetch_make_patchlist > patchlist > + echo " done." 1>${QUIETREDIR} >=20 > # Attempt to fetch ports patches > echo -n "Fetching `wc -l < patchlist | tr -d ' '` " > @@ -766,11 +773,18 @@ fetch_update() { > echo "done." >=20 > # Attempt to apply ports patches > - echo -n "Applying patches... " > - while read LINE; do > - X=3D`echo ${LINE} | cut -f 1 -d '|'` > - Y=3D`echo ${LINE} | cut -f 2 -d '|'` > - if [ ! -f "${X}-${Y}" ]; then continue; fi > + PATCHCNT=3D`wc -l patchlist` > + echo "Applying patches... " > + IFS=3D'|' > + I=3D0 > + while read X Y; do > + I=3D$(($I + 1)) > + F=3D"${X}-${Y}" > + if [ ! -f "${F}" ]; then > + printf " Skipping ${F} (${I} of = ${PATCHCNT}).\r" > + continue; > + fi > + echo " Processing ${F}..." 1>${QUIETREDIR} > gunzip -c < files/${X}.gz > OLD > ${BSPATCH} OLD NEW ${X}-${Y} > if [ `${SHA256} -q NEW` =3D ${Y} ]; then > @@ -779,6 +793,7 @@ fetch_update() { > fi > rm -f diff OLD NEW ${X}-${Y} > done < patchlist 2>${QUIETREDIR} > + IFS=3D > echo "done." >=20 > # Update ports without patches > @@ -795,7 +810,10 @@ fetch_update() { > xargs ${XARGST} ${PHTTPGET} ${SERVERNAME} \ > 2>${QUIETREDIR} >=20 > + I=3D0 > while read Y; do > + I=3D$(($I + 1)) > + printf " Processing ${Y} (${I} of ${PATCHCNT}).\r" = 1>${QUIETREDIR} > if [ `gunzip -c < ${Y}.gz | ${SHA256} -q` =3D ${Y} ]; = then > mv ${Y}.gz files/${Y}.gz > else > @@ -877,6 +895,7 @@ extract_metadata() { >=20 > # Do the actual work involved in "extract" > extract_run() { > + local IFS=3D'|' > mkdir -p ${PORTSDIR} || return 1 >=20 > if ! > @@ -886,7 +905,7 @@ extract_run() { > grep -vE "${REFUSE}" ${WORKDIR}/INDEX > else > cat ${WORKDIR}/INDEX > - fi | tr '|' ' ' | while read FILE HASH; do > + fi | while read FILE HASH; do > echo ${PORTSDIR}/${FILE} > if ! [ -r "${WORKDIR}/files/${HASH}.gz" ]; then > echo "files/${HASH}.gz not found -- snapshot = corrupt." > @@ -916,35 +935,8 @@ extract_run() { > extract_indices > } >=20 > -# Do the actual work involved in "update" > -update_run() { > - if ! [ -z "${INDEXONLY}" ]; then > - extract_indices >/dev/null || return 1 > - return 0 > - fi > - > - if sort ${WORKDIR}/INDEX | > - cmp -s ${PORTSDIR}/.portsnap.INDEX -; then > - echo "Ports tree is already up to date." > - return 0 > - fi > - > -# If we are REFUSEing to touch certain directories, don't remove = files > -# from those directories (even if they are out of date) > - echo -n "Removing old files and directories... " > - if ! [ -z "${REFUSE}" ]; then=20 > - sort ${WORKDIR}/INDEX | > - comm -23 ${PORTSDIR}/.portsnap.INDEX - | cut -f 1 -d = '|' | > - grep -vE "${REFUSE}" | > - lam -s "${PORTSDIR}/" - | > - sed -e 's|/$||' | xargs rm -rf > - else > - sort ${WORKDIR}/INDEX | > - comm -23 ${PORTSDIR}/.portsnap.INDEX - | cut -f 1 -d = '|' | > - lam -s "${PORTSDIR}/" - | > - sed -e 's|/$||' | xargs rm -rf > - fi > - echo "done." > +update_run_exract() { Consistent typo :)? > + local IFS=3D'|' >=20 > # Install new files > echo "Extracting new files:" > @@ -955,9 +947,7 @@ update_run() { > sort ${WORKDIR}/INDEX > fi | > comm -13 ${PORTSDIR}/.portsnap.INDEX - | > - while read LINE; do > - FILE=3D`echo ${LINE} | cut -f 1 -d '|'` > - HASH=3D`echo ${LINE} | cut -f 2 -d '|'` > + while read FILE HASH; do > echo ${PORTSDIR}/${FILE} > if ! [ -r "${WORKDIR}/files/${HASH}.gz" ]; then > echo "files/${HASH}.gz not found -- snapshot = corrupt." > @@ -977,7 +967,39 @@ update_run() { > done; then > return 1 > fi > +} > + > +# Do the actual work involved in "update" > +update_run() { > + if ! [ -z "${INDEXONLY}" ]; then > + extract_indices >/dev/null || return 1 > + return 0 > + fi > + > + if sort ${WORKDIR}/INDEX | > + cmp -s ${PORTSDIR}/.portsnap.INDEX -; then > + echo "Ports tree is already up to date." > + return 0 > + fi > + > +# If we are REFUSEing to touch certain directories, don't remove = files > +# from those directories (even if they are out of date) > + echo -n "Removing old files and directories... " > + if ! [ -z "${REFUSE}" ]; then=20 > + sort ${WORKDIR}/INDEX | > + comm -23 ${PORTSDIR}/.portsnap.INDEX - | cut -f 1 -d = '|' | > + grep -vE "${REFUSE}" | > + lam -s "${PORTSDIR}/" - | > + sed -e 's|/$||' | xargs rm -rf > + else > + sort ${WORKDIR}/INDEX | > + comm -23 ${PORTSDIR}/.portsnap.INDEX - | cut -f 1 -d = '|' | > + lam -s "${PORTSDIR}/" - | > + sed -e 's|/$||' | xargs rm -rf > + fi > + echo "done." >=20 > + update_run_exract || return 1 Wouldn't oldIFS=3D$IFS # Blah blah IFS=3D$oldIFS be better? -Garrett= From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 05:26:56 2011 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 B5732106564A; Sun, 13 Nov 2011 05:26:56 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id A3F2A8FC08; Sun, 13 Nov 2011 05:26:56 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id E31A61A3C84; Sat, 12 Nov 2011 21:11:07 -0800 (PST) Date: Sat, 12 Nov 2011 21:11:07 -0800 From: Alfred Perlstein To: Garrett Cooper Message-ID: <20111113051107.GA94817@elvis.mu.org> References: <201111130318.pAD3IvGr074144@svn.freebsd.org> <32EF12FA-07AC-481C-A407-3C8B578484C4@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32EF12FA-07AC-481C-A407-3C8B578484C4@gmail.com> 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: r227483 - head/usr.sbin/portsnap/portsnap 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, 13 Nov 2011 05:26:56 -0000 * Garrett Cooper [111112 19:25] wrote: > On Nov 12, 2011, at 7:18 PM, Alfred Perlstein wrote: > > > Author: alfred > > Date: Sun Nov 13 03:18:57 2011 > > New Revision: 227483 > > URL: http://svn.freebsd.org/changeset/base/227483 > > > > Log: > > Utilize shell's IFS instead of forking ~6 processes to > > handle splitting input files on a '|'. This greatly > > reduces the time taken to process several databases > > during the update process. > > > > Additionally add some more debug logging. > > > > Modified: > > head/usr.sbin/portsnap/portsnap/portsnap.sh > > > > Wouldn't > > oldIFS=$IFS > # Blah blah > IFS=$oldIFS > > be better? Meh, it's hard to do it in some of the code because of the 'return' in the middle of the logic and in the other places I didn't really care that much. That said, I'll happily take a patch to clean it up some. Just watch the logic, it's hairy in the places I used 'local'. -- - Alfred Perlstein .- VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 .- FreeBSD committer From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 06:39:50 2011 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 3B3E6106566B; Sun, 13 Nov 2011 06:39:50 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AD648FC0A; Sun, 13 Nov 2011 06:39:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAD6doJs080352; Sun, 13 Nov 2011 06:39:50 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAD6do5W080350; Sun, 13 Nov 2011 06:39:50 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201111130639.pAD6do5W080350@svn.freebsd.org> From: Alfred Perlstein Date: Sun, 13 Nov 2011 06:39: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: r227484 - head/usr.sbin/portsnap/portsnap 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, 13 Nov 2011 06:39:50 -0000 Author: alfred Date: Sun Nov 13 06:39:49 2011 New Revision: 227484 URL: http://svn.freebsd.org/changeset/base/227484 Log: Fix spelling of extract. Pointed out by: gcooper Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.sh Sun Nov 13 03:18:57 2011 (r227483) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Sun Nov 13 06:39:49 2011 (r227484) @@ -935,7 +935,7 @@ extract_run() { extract_indices } -update_run_exract() { +update_run_extract() { local IFS='|' # Install new files @@ -999,7 +999,7 @@ update_run() { fi echo "done." - update_run_exract || return 1 + update_run_extract || return 1 extract_metadata extract_indices } From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 08:08:41 2011 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 94263106564A; Sun, 13 Nov 2011 08:08:41 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id D05B68FC0C; Sun, 13 Nov 2011 08:08:40 +0000 (UTC) Received: by wwg14 with SMTP id 14so5013324wwg.31 for ; Sun, 13 Nov 2011 00:08:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=ou5HzcfBk1nwgPuj7kCzff7naBbQBLi5xiGwk/lZ3xs=; b=E76p8nxm/GfgXuJLs6tLwDYuDvjtgBbXUNDJZ+zpqzHG9XZBRgs/xVGkMw4pSBA9pG DxcsQ66hpRcor1qOgzrPj8dTnM3DBri5hGsRH9+/13EnKDOKWUkkPdd6UXFc7Bcm2KZN TJkalreqZ0W1vIlNnFcbYfyPQZshX7s4kQOCc= Received: by 10.216.133.165 with SMTP id q37mr3185338wei.11.1321170039264; Sat, 12 Nov 2011 23:40:39 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.216.21.133 with HTTP; Sat, 12 Nov 2011 23:40:08 -0800 (PST) In-Reply-To: References: <201111112224.pABMOG0R011302@svn.freebsd.org> From: Eitan Adler Date: Sun, 13 Nov 2011 02:40:08 -0500 X-Google-Sender-Auth: 47J7mCZekqsmfmJfWEUfaVL3SyI Message-ID: To: Dmitry Morozovsky Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227457 - head/sys/dev/puc 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, 13 Nov 2011 08:08:41 -0000 On Sat, Nov 12, 2011 at 5:23 AM, Dmitry Morozovsky wrote: > this change seems to be non-intrusive, could we please have it in 9.0-R? I've sent a request to re@ -- Eitan Adler Ports committer X11, Bugbusting teams From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 10:28:02 2011 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 ED7DA106566C; Sun, 13 Nov 2011 10:28:01 +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 DCE5A8FC12; Sun, 13 Nov 2011 10:28:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pADAS1cn087282; Sun, 13 Nov 2011 10:28:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pADAS1Ip087280; Sun, 13 Nov 2011 10:28:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111131028.pADAS1Ip087280@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 13 Nov 2011 10:28: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: r227485 - 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: Sun, 13 Nov 2011 10:28:02 -0000 Author: kib Date: Sun Nov 13 10:28:01 2011 New Revision: 227485 URL: http://svn.freebsd.org/changeset/base/227485 Log: To limit amount of the kernel memory allocated, and to optimize the iteration over the fdsets, kern_select() limits the length of the fdsets copied in by the last valid file descriptor index. If any bit is set in a mask above the limit, current implementation ignores the filedescriptor, instead of returning EBADF. Fix the issue by scanning the tails of fdset before entering the select loop and returning EBADF if any bit above last valid filedescriptor index is set. The performance impact of the additional check is only imposed on the (somewhat) buggy applications that pass bad file descriptors to select(2) or pselect(2). PR: kern/155606, kern/162379 Discussed with: cognet, glebius Tested by: andreast (powerpc, all 64/32bit ABI combinations, big-endian), marius (sparc64, big-endian) MFC after: 2 weeks Modified: head/sys/kern/sys_generic.c Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Sun Nov 13 06:39:49 2011 (r227484) +++ head/sys/kern/sys_generic.c Sun Nov 13 10:28:01 2011 (r227485) @@ -831,6 +831,54 @@ sys_select(struct thread *td, struct sel NFDBITS)); } +/* + * In the unlikely case when user specified n greater then the last + * open file descriptor, check that no bits are set after the last + * valid fd. We must return EBADF if any is set. + * + * There are applications that rely on the behaviour. + * + * nd is fd_lastfile + 1. + */ +static int +select_check_badfd(fd_set *fd_in, int nd, int ndu, int abi_nfdbits) +{ + char *addr, *oaddr; + int b, i, res; + uint8_t bits; + + if (nd >= ndu || fd_in == NULL) + return (0); + + oaddr = NULL; + bits = 0; /* silence gcc */ + for (i = nd; i < ndu; i++) { + b = i / NBBY; +#if BYTE_ORDER == LITTLE_ENDIAN + addr = (char *)fd_in + b; +#else + addr = (char *)fd_in; + if (abi_nfdbits == NFDBITS) { + addr += rounddown(b, sizeof(fd_mask)) + + sizeof(fd_mask) - 1 - b % sizeof(fd_mask); + } else { + addr += rounddown(b, sizeof(uint32_t)) + + sizeof(uint32_t) - 1 - b % sizeof(uint32_t); + } +#endif + if (addr != oaddr) { + res = fubyte(addr); + if (res == -1) + return (EFAULT); + oaddr = addr; + bits = res; + } + if ((bits & (1 << (i % NBBY))) != 0) + return (EBADF); + } + return (0); +} + int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, fd_set *fd_ex, struct timeval *tvp, int abi_nfdbits) @@ -845,14 +893,26 @@ kern_select(struct thread *td, int nd, f fd_mask s_selbits[howmany(2048, NFDBITS)]; fd_mask *ibits[3], *obits[3], *selbits, *sbp; struct timeval atv, rtv, ttv; - int error, timo; + int error, lf, ndu, timo; u_int nbufbytes, ncpbytes, ncpubytes, nfdbits; if (nd < 0) return (EINVAL); fdp = td->td_proc->p_fd; - if (nd > fdp->fd_lastfile + 1) - nd = fdp->fd_lastfile + 1; + ndu = nd; + lf = fdp->fd_lastfile; + if (nd > lf + 1) + nd = lf + 1; + + error = select_check_badfd(fd_in, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); + error = select_check_badfd(fd_ou, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); + error = select_check_badfd(fd_ex, nd, ndu, abi_nfdbits); + if (error != 0) + return (error); /* * Allocate just enough bits for the non-null fd_sets. Use the From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 11:53:18 2011 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 DEF581065672; Sun, 13 Nov 2011 11:53:18 +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 CE57A8FC08; Sun, 13 Nov 2011 11:53:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pADBrIOv091627; Sun, 13 Nov 2011 11:53:18 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pADBrIeJ091625; Sun, 13 Nov 2011 11:53:18 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201111131153.pADBrIeJ091625@svn.freebsd.org> From: Michael Tuexen Date: Sun, 13 Nov 2011 11:53: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: r227486 - 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, 13 Nov 2011 11:53:19 -0000 Author: tuexen Date: Sun Nov 13 11:53:18 2011 New Revision: 227486 URL: http://svn.freebsd.org/changeset/base/227486 Log: Don't copy uninitialized memory. Also simplify the comparison of interface names. MFC after: 3 days. Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Nov 13 10:28:01 2011 (r227485) +++ head/sys/netinet/sctp_pcb.c Sun Nov 13 11:53:18 2011 (r227486) @@ -559,9 +559,9 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, vo atomic_add_int(&vrf->refcount, 1); sctp_ifnp->ifn_mtu = SCTP_GATHER_MTU_FROM_IFN_INFO(ifn, ifn_index, addr->sa_family); if (if_name != NULL) { - memcpy(sctp_ifnp->ifn_name, if_name, SCTP_IFNAMSIZ); + snprintf(sctp_ifnp->ifn_name, SCTP_IFNAMSIZ, "%s", if_name); } else { - memcpy(sctp_ifnp->ifn_name, "unknown", min(7, SCTP_IFNAMSIZ)); + snprintf(sctp_ifnp->ifn_name, SCTP_IFNAMSIZ, "%s", "unknown"); } hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))]; LIST_INIT(&sctp_ifnp->ifalist); @@ -768,19 +768,9 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, * panda who might recycle indexes fast. */ if (if_name) { - int len1, len2; - - len1 = min(SCTP_IFNAMSIZ, strlen(if_name)); - len2 = min(SCTP_IFNAMSIZ, strlen(sctp_ifap->ifn_p->ifn_name)); - if (len1 && len2 && (len1 == len2)) { - /* we can compare them */ - if (strncmp(if_name, sctp_ifap->ifn_p->ifn_name, len1) == 0) { - /* - * They match its a correct - * delete - */ - valid = 1; - } + if (strncmp(if_name, sctp_ifap->ifn_p->ifn_name, SCTP_IFNAMSIZ) == 0) { + /* They match its a correct delete */ + valid = 1; } } if (!valid) { From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 12:21:52 2011 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 7E391106566B; Sun, 13 Nov 2011 12:21:52 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 1A8BB8FC08; Sun, 13 Nov 2011 12:21:52 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 198691DD757; Sun, 13 Nov 2011 13:21:51 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 0012C28468; Sun, 13 Nov 2011 13:21:50 +0100 (CET) Date: Sun, 13 Nov 2011 13:21:50 +0100 From: Jilles Tjoelker To: Garrett Cooper Message-ID: <20111113122150.GA62828@stack.nl> References: <201111130318.pAD3IvGr074144@svn.freebsd.org> <32EF12FA-07AC-481C-A407-3C8B578484C4@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32EF12FA-07AC-481C-A407-3C8B578484C4@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r227483 - head/usr.sbin/portsnap/portsnap 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, 13 Nov 2011 12:21:52 -0000 On Sat, Nov 12, 2011 at 07:25:23PM -0800, Garrett Cooper wrote: > On Nov 12, 2011, at 7:18 PM, Alfred Perlstein wrote: > > Author: alfred > > Date: Sun Nov 13 03:18:57 2011 > > New Revision: 227483 > > URL: http://svn.freebsd.org/changeset/base/227483 [snip] > > Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh > > ============================================================================== > > --- head/usr.sbin/portsnap/portsnap/portsnap.sh Sun Nov 13 03:01:58 2011 (r227482) > > +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Sun Nov 13 03:18:57 2011 (r227483) > > @@ -570,14 +570,16 @@ fetch_metadata_sanity() { [snip] > > + IFS='|' > > + echo "" 1>${QUIETREDIR} > > + grep -vE "^([0-9a-f]{64})\|\1$" | > > + while read X Y; do > > + printf "Processing: $X $Y ...\r" 1>${QUIETREDIR} > > + if [ -f "files/${Y}.gz" -o ! -f "files/${X}.gz" ]; then continue; fi > > + echo "${X}|${Y}" > > done > > + echo "" 1>${QUIETREDIR} > > + IFS= [snip] > > + IFS='|' > > + while read X Y; do > > if [ ! -f "${X}-${Y}.gz" ]; then continue; fi > > gunzip -c < ${X}-${Y}.gz > diff > > gunzip -c < files/${X}.gz > OLD > > @@ -707,6 +708,7 @@ fetch_update() { > > fi > > rm -f diff OLD NEW ${X}-${Y}.gz ptmp > > done < patchlist 2>${QUIETREDIR} > > + IFS= > > echo "done." [snip] > > + update_run_exract || return 1 > Wouldn't > oldIFS=$IFS > # Blah blah > IFS=$oldIFS > be better? That's too simple, it will change an unset IFS to a null IFS and the difference between those is major. If IFS is unset, it behaves the same as IFS=$' \t\n' and if IFS='' it disables field splitting. Given that you are already using 'local', why not use it everywhere? You may need to split up some functions to do this. -- Jilles Tjoelker From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 16:18:48 2011 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 97CA7106566C; Sun, 13 Nov 2011 16:18:48 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8746A8FC13; Sun, 13 Nov 2011 16:18:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pADGImJ6099699; Sun, 13 Nov 2011 16:18:48 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pADGIm2n099696; Sun, 13 Nov 2011 16:18:48 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201111131618.pADGIm2n099696@svn.freebsd.org> From: David Chisnall Date: Sun, 13 Nov 2011 16:18: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: r227487 - head/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: Sun, 13 Nov 2011 16:18:48 -0000 Author: theraven Date: Sun Nov 13 16:18:48 2011 New Revision: 227487 URL: http://svn.freebsd.org/changeset/base/227487 Log: The spec says that FILE must be defined in wchar.h, but it wasn't. It is now. Also hide some macros in C++ mode that will break C++ namespaced calls. Approved by: dim (mentor) Modified: head/include/stdio.h head/include/wchar.h Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Sun Nov 13 11:53:18 2011 (r227486) +++ head/include/stdio.h Sun Nov 13 16:18:48 2011 (r227487) @@ -107,7 +107,7 @@ struct __sbuf { * inline functions. To preserve ABI compat, these members must not * be disturbed. These members are marked below with (*). */ -typedef struct __sFILE { +struct __sFILE { unsigned char *_p; /* (*) current position in (some) buffer */ int _r; /* (*) read space left for getc() */ int _w; /* (*) write space left for putc() */ @@ -144,8 +144,11 @@ typedef struct __sFILE { int _fl_count; /* recursive lock count */ int _orientation; /* orientation for fwide() */ __mbstate_t _mbstate; /* multibyte conversion state */ -} FILE; - +}; +#ifndef _STDFILE_DECLARED +#define _STDFILE_DECLARED +typedef struct __sFILE FILE; +#endif #ifndef _STDSTREAM_DECLARED __BEGIN_DECLS extern FILE *__stdinp; @@ -467,6 +470,7 @@ static __inline int __sputc(int _c, FILE __swbuf((int)(c), p) : \ (*(p)->_p = (c), (int)*(p)->_p++)) #endif +#ifndef __cplusplus #define __sfeof(p) (((p)->_flags & __SEOF) != 0) #define __sferror(p) (((p)->_flags & __SERR) != 0) @@ -506,6 +510,7 @@ extern int __isthreaded; #define getchar_unlocked() getc_unlocked(stdin) #define putchar_unlocked(x) putc_unlocked(x, stdout) #endif +#endif /* __cplusplus */ __END_DECLS #endif /* !_STDIO_H_ */ Modified: head/include/wchar.h ============================================================================== --- head/include/wchar.h Sun Nov 13 11:53:18 2011 (r227486) +++ head/include/wchar.h Sun Nov 13 16:18:48 2011 (r227487) @@ -97,20 +97,23 @@ typedef __wint_t wint_t; #define WEOF ((wint_t)-1) #endif -struct __sFILE; +#ifndef _STDFILE_DECLARED +#define _STDFILE_DECLARED +typedef struct __sFILE FILE; +#endif struct tm; __BEGIN_DECLS wint_t btowc(int); -wint_t fgetwc(struct __sFILE *); +wint_t fgetwc(FILE *); wchar_t * - fgetws(wchar_t * __restrict, int, struct __sFILE * __restrict); -wint_t fputwc(wchar_t, struct __sFILE *); -int fputws(const wchar_t * __restrict, struct __sFILE * __restrict); -int fwide(struct __sFILE *, int); -int fwprintf(struct __sFILE * __restrict, const wchar_t * __restrict, ...); -int fwscanf(struct __sFILE * __restrict, const wchar_t * __restrict, ...); -wint_t getwc(struct __sFILE *); + fgetws(wchar_t * __restrict, int, FILE * __restrict); +wint_t fputwc(wchar_t, FILE *); +int fputws(const wchar_t * __restrict, FILE * __restrict); +int fwide(FILE *, int); +int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); +int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); +wint_t getwc(FILE *); wint_t getwchar(void); size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict); size_t mbrtowc(wchar_t * __restrict, const char * __restrict, size_t, @@ -118,13 +121,13 @@ size_t mbrtowc(wchar_t * __restrict, con int mbsinit(const mbstate_t *); size_t mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, mbstate_t * __restrict); -wint_t putwc(wchar_t, struct __sFILE *); +wint_t putwc(wchar_t, FILE *); wint_t putwchar(wchar_t); int swprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict, ...); int swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...); -wint_t ungetwc(wint_t, struct __sFILE *); -int vfwprintf(struct __sFILE * __restrict, const wchar_t * __restrict, +wint_t ungetwc(wint_t, FILE *); +int vfwprintf(FILE * __restrict, const wchar_t * __restrict, __va_list); int vswprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict, __va_list); @@ -167,9 +170,9 @@ int wprintf(const wchar_t * __restrict, int wscanf(const wchar_t * __restrict, ...); #ifndef _STDSTREAM_DECLARED -extern struct __sFILE *__stdinp; -extern struct __sFILE *__stdoutp; -extern struct __sFILE *__stderrp; +extern FILE *__stdinp; +extern FILE *__stdoutp; +extern FILE *__stderrp; #define _STDSTREAM_DECLARED #endif @@ -179,7 +182,7 @@ extern struct __sFILE *__stderrp; #define putwchar(wc) fputwc(wc, __stdoutp) #if __ISO_C_VISIBLE >= 1999 -int vfwscanf(struct __sFILE * __restrict, const wchar_t * __restrict, +int vfwscanf(FILE * __restrict, const wchar_t * __restrict, __va_list); int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict, __va_list); @@ -217,7 +220,7 @@ size_t wcsnrtombs(char * __restrict, con #endif #if __BSD_VISIBLE -wchar_t *fgetwln(struct __sFILE * __restrict, size_t * __restrict); +wchar_t *fgetwln(FILE * __restrict, size_t * __restrict); size_t wcslcat(wchar_t *, const wchar_t *, size_t); size_t wcslcpy(wchar_t *, const wchar_t *, size_t); #endif From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 16:35:48 2011 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 E7BD7106566B; Sun, 13 Nov 2011 16:35:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD6798FC08; Sun, 13 Nov 2011 16:35:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pADGZlqV000359; Sun, 13 Nov 2011 16:35:47 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pADGZlsG000356; Sun, 13 Nov 2011 16:35:47 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201111131635.pADGZlsG000356@svn.freebsd.org> From: Eitan Adler Date: Sun, 13 Nov 2011 16:35: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: r227488 - head/sbin/md5 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, 13 Nov 2011 16:35:48 -0000 Author: eadler (ports committer) Date: Sun Nov 13 16:35:47 2011 New Revision: 227488 URL: http://svn.freebsd.org/changeset/base/227488 Log: - add "check" option to MD5 and friends to compare files against known hash. PR: bin/146541 Submitted by: eadler Reviewed by: jhell@dataix.net Approved by: secteam (cperciva) Approved by: cperciva MFC after: 3 weeks Modified: head/sbin/md5/md5.1 head/sbin/md5/md5.c Modified: head/sbin/md5/md5.1 ============================================================================== --- head/sbin/md5/md5.1 Sun Nov 13 16:18:48 2011 (r227487) +++ head/sbin/md5/md5.1 Sun Nov 13 16:35:47 2011 (r227488) @@ -8,18 +8,22 @@ .Sh SYNOPSIS .Nm md5 .Op Fl pqrtx +.Op Fl c Ar string .Op Fl s Ar string .Op Ar .Nm sha1 .Op Fl pqrtx +.Op Fl c Ar string .Op Fl s Ar string .Op Ar .Nm sha256 .Op Fl pqrtx +.Op Fl c Ar string .Op Fl s Ar string .Op Ar .Nm rmd160 .Op Fl pqrtx +.Op Fl c Ar string .Op Fl s Ar string .Op Ar .Sh DESCRIPTION @@ -73,6 +77,9 @@ precede any files named on the command l The hexadecimal checksum of each file listed on the command line is printed after the options are processed. .Bl -tag -width indent +.It Fl c Ar string +Compare files to this md5 string. (Note that this option is not yet useful +if multiple files are specified.) .It Fl s Ar string Print a checksum of the given .Ar string . @@ -101,7 +108,8 @@ The and .Nm rmd160 utilities exit 0 on success, -and 1 if at least one of the input files could not be read. +1 if at least one of the input files could not be read, +and 2 if at least one file does not have the same hash as the -c option. .Sh SEE ALSO .Xr cksum 1 , .Xr md5 3 , Modified: head/sbin/md5/md5.c ============================================================================== --- head/sbin/md5/md5.c Sun Nov 13 16:18:48 2011 (r227487) +++ head/sbin/md5/md5.c Sun Nov 13 16:35:47 2011 (r227488) @@ -44,6 +44,8 @@ __FBSDID("$FreeBSD$"); int qflag; int rflag; int sflag; +unsigned char* checkAgainst; +int checksFailed; typedef void (DIGEST_Init)(void *); typedef void (DIGEST_Update)(void *, const unsigned char *, size_t); @@ -138,8 +140,13 @@ main(int argc, char *argv[]) digest = 0; failed = 0; - while ((ch = getopt(argc, argv, "pqrs:tx")) != -1) + checkAgainst = NULL; + checksFailed = 0; + while ((ch = getopt(argc, argv, "c:pqrs:tx")) != -1) switch (ch) { + case 'c': + checkAgainst = optarg; + break; case 'p': MDFilter(&Algorithm[digest], 1); break; @@ -173,12 +180,19 @@ main(int argc, char *argv[]) failed++; } else { if (qflag) - printf("%s\n", p); + printf("%s", p); else if (rflag) - printf("%s %s\n", p, *argv); + printf("%s %s", p, *argv); else - printf("%s (%s) = %s\n", + printf("%s (%s) = %s", Algorithm[digest].name, *argv, p); + if (checkAgainst && strcmp(checkAgainst,p)) + { + checksFailed++; + if (!qflag) + printf(" [ Failed ]"); + } + printf("\n"); } } while (*++argv); } else if (!sflag && (optind == 1 || qflag || rflag)) @@ -186,6 +200,8 @@ main(int argc, char *argv[]) if (failed != 0) return (1); + if (checksFailed != 0) + return (2); return (0); } @@ -198,12 +214,20 @@ MDString(Algorithm_t *alg, const char *s size_t len = strlen(string); char buf[HEX_DIGEST_LENGTH]; + alg->Data(string,len,buf); if (qflag) - printf("%s\n", alg->Data(string, len, buf)); + printf("%s", buf); else if (rflag) - printf("%s \"%s\"\n", alg->Data(string, len, buf), string); + printf("%s \"%s\"", buf, string); else - printf("%s (\"%s\") = %s\n", alg->name, string, alg->Data(string, len, buf)); + printf("%s (\"%s\") = %s", alg->name, string, buf); + if (checkAgainst && strcmp(buf,checkAgainst)) + { + checksFailed++; + if (!qflag) + printf(" [ failed ]"); + } + printf("\n"); } /* * Measures the time to digest TEST_BLOCK_COUNT TEST_BLOCK_LEN-byte blocks. From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 17:06:34 2011 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 23A62106566B; Sun, 13 Nov 2011 17:06:34 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11EAC8FC0C; Sun, 13 Nov 2011 17:06:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pADH6X9V001417; Sun, 13 Nov 2011 17:06:33 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pADH6X8c001407; Sun, 13 Nov 2011 17:06:33 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201111131706.pADH6X8c001407@svn.freebsd.org> From: Eitan Adler Date: Sun, 13 Nov 2011 17:06: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: r227489 - in head: sbin/gvinum sbin/ipfw sys/cam/scsi sys/fs/devfs sys/netinet usr.sbin/mtree usr.sbin/pmcstat 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, 13 Nov 2011 17:06:34 -0000 Author: eadler (ports committer) Date: Sun Nov 13 17:06:33 2011 New Revision: 227489 URL: http://svn.freebsd.org/changeset/base/227489 Log: - fix duplicate "a a" in some comments Submitted by: eadler Approved by: simon MFC after: 3 days Modified: head/sbin/gvinum/gvinum.c head/sbin/ipfw/main.c head/sys/cam/scsi/scsi_ch.h head/sys/cam/scsi/scsi_ses.c head/sys/fs/devfs/devfs_rule.c head/sys/netinet/sctp_structs.h head/usr.sbin/mtree/mtree.5 head/usr.sbin/pmcstat/pmcstat.c Modified: head/sbin/gvinum/gvinum.c ============================================================================== --- head/sbin/gvinum/gvinum.c Sun Nov 13 16:35:47 2011 (r227488) +++ head/sbin/gvinum/gvinum.c Sun Nov 13 17:06:33 2011 (r227489) @@ -557,7 +557,7 @@ find_pattern(char *line, char *pattern) return (NULL); } -/* Find a free name for an object given a a prefix. */ +/* Find a free name for an object given a prefix. */ char * find_name(const char *prefix, int type, int namelen) { Modified: head/sbin/ipfw/main.c ============================================================================== --- head/sbin/ipfw/main.c Sun Nov 13 16:35:47 2011 (r227488) +++ head/sbin/ipfw/main.c Sun Nov 13 17:06:33 2011 (r227489) @@ -87,7 +87,7 @@ help(void) * which includes the program name and a NULL entry at the end. * If we are called with a single string, we split it on whitespace. * Also, arguments with a trailing ',' are joined to the next one. - * The pointers (av[]) and data are in a a single chunk of memory. + * The pointers (av[]) and data are in a single chunk of memory. * av[0] points to the original program name, all other entries * point into the allocated chunk. */ Modified: head/sys/cam/scsi/scsi_ch.h ============================================================================== --- head/sys/cam/scsi/scsi_ch.h Sun Nov 13 16:35:47 2011 (r227488) +++ head/sys/cam/scsi/scsi_ch.h Sun Nov 13 17:06:33 2011 (r227489) @@ -359,7 +359,7 @@ struct page_device_capabilities { * Some of these fields can be a little confusing, so an explanation * is in order. * - * Each component within a a medium changer apparatus is called an + * Each component within a medium changer apparatus is called an * "element". * * The "medium transport element address" is the address of the first Modified: head/sys/cam/scsi/scsi_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_ses.c Sun Nov 13 16:35:47 2011 (r227488) +++ head/sys/cam/scsi/scsi_ses.c Sun Nov 13 17:06:33 2011 (r227489) @@ -714,7 +714,7 @@ ses_log(struct ses_softc *ssc, const cha /* * Is this a device that supports enclosure services? * - * It's a a pretty simple ruleset- if it is device type 0x0D (13), it's + * It's a pretty simple ruleset- if it is device type 0x0D (13), it's * an SES device. If it happens to be an old UNISYS SEN device, we can * handle that too. */ Modified: head/sys/fs/devfs/devfs_rule.c ============================================================================== --- head/sys/fs/devfs/devfs_rule.c Sun Nov 13 16:35:47 2011 (r227488) +++ head/sys/fs/devfs/devfs_rule.c Sun Nov 13 17:06:33 2011 (r227489) @@ -617,7 +617,7 @@ devfs_rule_run(struct devfs_krule *dk, s * XXX: not work as this is called when devices are created * XXX: long time after the rules were instantiated. * XXX: a printf() would probably give too much noise, or - * XXX: DoS the machine. I guess a a rate-limited message + * XXX: DoS the machine. I guess a rate-limited message * XXX: might work. */ if (depth > 0) { Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Sun Nov 13 16:35:47 2011 (r227488) +++ head/sys/netinet/sctp_structs.h Sun Nov 13 17:06:33 2011 (r227489) @@ -416,7 +416,7 @@ TAILQ_HEAD(sctpchunk_listhead, sctp_tmit #define CHUNK_FLAGS_PR_SCTP_BUF SCTP_PR_SCTP_BUF #define CHUNK_FLAGS_PR_SCTP_RTX SCTP_PR_SCTP_RTX -/* The upper byte is used a a bit mask */ +/* The upper byte is used as a bit mask */ #define CHUNK_FLAGS_FRAGMENT_OK 0x0100 struct chk_id { Modified: head/usr.sbin/mtree/mtree.5 ============================================================================== --- head/usr.sbin/mtree/mtree.5 Sun Nov 13 16:35:47 2011 (r227488) +++ head/usr.sbin/mtree/mtree.5 Sun Nov 13 17:06:33 2011 (r227489) @@ -48,7 +48,7 @@ Leading whitespace is always ignored. .Pp When encoding file or pathnames, any backslash character or character outside of the 95 printable ASCII characters must be -encoded as a a backslash followed by three +encoded as a backslash followed by three octal digits. When reading mtree files, any appearance of a backslash followed by three octal digits should be converted into the Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Sun Nov 13 16:35:47 2011 (r227488) +++ head/usr.sbin/pmcstat/pmcstat.c Sun Nov 13 17:06:33 2011 (r227489) @@ -1022,7 +1022,7 @@ main(int argc, char **argv) /* * Check if "-k kerneldir" was specified, and if whether - * 'kerneldir' actually refers to a a file. If so, use + * 'kerneldir' actually refers to a file. If so, use * `dirname path` to determine the kernel directory. */ if (args.pa_flags & FLAG_HAS_KERNELPATH) { From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 17:07:27 2011 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 2B9FE106564A; Sun, 13 Nov 2011 17:07:27 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C1938FC17; Sun, 13 Nov 2011 17:07:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pADH7QPl001474; Sun, 13 Nov 2011 17:07:26 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pADH7QnD001472; Sun, 13 Nov 2011 17:07:26 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201111131707.pADH7QnD001472@svn.freebsd.org> From: David Chisnall Date: Sun, 13 Nov 2011 17:07:26 +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: r227490 - head/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: Sun, 13 Nov 2011 17:07:27 -0000 Author: theraven Date: Sun Nov 13 17:07:26 2011 New Revision: 227490 URL: http://svn.freebsd.org/changeset/base/227490 Log: Hide some more macros that will break C++ when compiling in C++ mode. Approved by: dim (mentor) Modified: head/include/ctype.h Modified: head/include/ctype.h ============================================================================== --- head/include/ctype.h Sun Nov 13 17:06:33 2011 (r227489) +++ head/include/ctype.h Sun Nov 13 17:07:26 2011 (r227490) @@ -80,6 +80,7 @@ int isspecial(int); #endif __END_DECLS +#ifndef __cplusplus #define isalnum(c) __sbistype((c), _CTYPE_A|_CTYPE_D) #define isalpha(c) __sbistype((c), _CTYPE_A) #define iscntrl(c) __sbistype((c), _CTYPE_C) @@ -93,6 +94,7 @@ __END_DECLS #define isxdigit(c) __isctype((c), _CTYPE_X) /* ANSI -- locale independent */ #define tolower(c) __sbtolower(c) #define toupper(c) __sbtoupper(c) +#endif /* !__cplusplus */ #if __XSI_VISIBLE /* @@ -112,7 +114,7 @@ __END_DECLS #define toascii(c) ((c) & 0x7F) #endif -#if __ISO_C_VISIBLE >= 1999 +#if __ISO_C_VISIBLE >= 1999 && !defined(__cplusplus) #define isblank(c) __sbistype((c), _CTYPE_B) #endif From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 17:07:43 2011 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 D26991065670; Sun, 13 Nov 2011 17:07:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2F6D8FC14; Sun, 13 Nov 2011 17:07:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pADH7hNa001517; Sun, 13 Nov 2011 17:07:43 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pADH7h98001515; Sun, 13 Nov 2011 17:07:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201111131707.pADH7h98001515@svn.freebsd.org> From: Eitan Adler Date: Sun, 13 Nov 2011 17:07: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: r227491 - head/sbin/md5 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, 13 Nov 2011 17:07:43 -0000 Author: eadler (ports committer) Date: Sun Nov 13 17:07:43 2011 New Revision: 227491 URL: http://svn.freebsd.org/changeset/base/227491 Log: - new sentence should start on new line. PR: bin/146541 Submitted by: bjk Approved by: bjk Modified: head/sbin/md5/md5.1 Modified: head/sbin/md5/md5.1 ============================================================================== --- head/sbin/md5/md5.1 Sun Nov 13 17:07:26 2011 (r227490) +++ head/sbin/md5/md5.1 Sun Nov 13 17:07:43 2011 (r227491) @@ -78,8 +78,8 @@ The hexadecimal checksum of each file li after the options are processed. .Bl -tag -width indent .It Fl c Ar string -Compare files to this md5 string. (Note that this option is not yet useful -if multiple files are specified.) +Compare files to this md5 string. +(Note that this option is not yet useful if multiple files are specified.) .It Fl s Ar string Print a checksum of the given .Ar string . From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 18:26:11 2011 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 CAB5E1065680; Sun, 13 Nov 2011 18:26:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2AC418FC17; Sun, 13 Nov 2011 18:26:10 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pADIQ5h0008524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 13 Nov 2011 20:26:05 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pADIQ5gE095014; Sun, 13 Nov 2011 20:26:05 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pADIQ51r095013; Sun, 13 Nov 2011 20:26:05 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 13 Nov 2011 20:26:05 +0200 From: Kostik Belousov To: Eitan Adler Message-ID: <20111113182605.GA50300@deviant.kiev.zoral.com.ua> References: <201111131707.pADH7h98001515@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YO/4IGSS/EY2lHf5" Content-Disposition: inline In-Reply-To: <201111131707.pADH7h98001515@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=-3.9 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: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227491 - head/sbin/md5 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, 13 Nov 2011 18:26:11 -0000 --YO/4IGSS/EY2lHf5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 13, 2011 at 05:07:43PM +0000, Eitan Adler wrote: > Author: eadler (ports committer) > Date: Sun Nov 13 17:07:43 2011 > New Revision: 227491 > URL: http://svn.freebsd.org/changeset/base/227491 >=20 > Log: > - new sentence should start on new line. > =20 > PR: bin/146541 > Submitted by: bjk > Approved by: bjk >=20 > Modified: > head/sbin/md5/md5.1 >=20 > Modified: head/sbin/md5/md5.1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/sbin/md5/md5.1 Sun Nov 13 17:07:26 2011 (r227490) > +++ head/sbin/md5/md5.1 Sun Nov 13 17:07:43 2011 (r227491) > @@ -78,8 +78,8 @@ The hexadecimal checksum of each file li > after the options are processed. > .Bl -tag -width indent > .It Fl c Ar string > -Compare files to this md5 string. (Note that this option is not yet usef= ul > -if multiple files are specified.) > +Compare files to this md5 string. > +(Note that this option is not yet useful if multiple files are specified= .) I doubt that you compare files to md5 hash. Rather, you compare the md5 hash of file with provided string. > .It Fl s Ar string > Print a checksum of the given > .Ar string . --YO/4IGSS/EY2lHf5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7AC70ACgkQC3+MBN1Mb4hkAgCfVIxnWkant4bKzpaxrx+P6TYv /kYAn3ksV342fBntgi4f4ywmARFDAwJ/ =yMn+ -----END PGP SIGNATURE----- --YO/4IGSS/EY2lHf5-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 20:17:54 2011 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 2E7EB1065670; Sun, 13 Nov 2011 20:17:54 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp2.one.com (csmtp2.one.com [91.198.169.22]) by mx1.freebsd.org (Postfix) with ESMTP id E73D48FC08; Sun, 13 Nov 2011 20:17:53 +0000 (UTC) Received: from [192.168.1.104] (unknown [217.74.213.42]) by csmtp2.one.com (Postfix) with ESMTPA id E7DAF3043825; Sun, 13 Nov 2011 19:59:09 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Erik Cederstrand In-Reply-To: <201111121439.pACEdKrN048887@svn.freebsd.org> Date: Sun, 13 Nov 2011 20:59:09 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201111121439.pACEdKrN048887@svn.freebsd.org> To: David Chisnall X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227467 - head/share/monetdef 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, 13 Nov 2011 20:17:54 -0000 Hi David, Those aren't Swiss Francs. They're yuan renminbi (CNY). It does seen = they have 2 digits, though. Thanks, Erik Den 12/11/2011 kl. 15.39 skrev David Chisnall: > Author: theraven > Date: Sat Nov 12 14:39:20 2011 > New Revision: 227467 > URL: http://svn.freebsd.org/changeset/base/227467 >=20 > Log: > Fix the number of decimal digits used for Swiss Francs (0 -> 2). = Found by the libc++ test suite. If there is some locale test suite = somewhere, it might be worth running it... >=20 > Approved by: dim (mentor) >=20 > Modified: > head/share/monetdef/zh_CN.UTF-8.src >=20 > Modified: head/share/monetdef/zh_CN.UTF-8.src > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/share/monetdef/zh_CN.UTF-8.src Sat Nov 12 10:30:14 2011 = (r227466) > +++ head/share/monetdef/zh_CN.UTF-8.src Sat Nov 12 14:39:20 2011 = (r227467) > @@ -18,9 +18,9 @@ CNY=20 > # negative_sign > - > # int_frac_digits > -0 > +2 > # frac_digits > -0 > +2 > # p_cs_precedes > 1 > # p_sep_by_space From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 20:32:39 2011 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 C32B31065675; Sun, 13 Nov 2011 20:32:39 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id 62E578FC14; Sun, 13 Nov 2011 20:32:36 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cwma5-0-0-cust875.7-3.cable.virginmedia.com [86.11.39.108]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id pADKKoYF023880 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 13 Nov 2011 20:20:51 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: Date: Sun, 13 Nov 2011 20:20:45 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <7E35F996-F0E2-4972-8E7C-3FAB2004C52D@FreeBSD.org> References: <201111121439.pACEdKrN048887@svn.freebsd.org> To: Erik Cederstrand X-Mailer: Apple Mail (2.1251.1) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r227467 - head/share/monetdef 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, 13 Nov 2011 20:32:39 -0000 Hmm, apparently I can't tell the difference between H and N. Still, as = long as the fix is right, even if the explanation isn't... David On 13 Nov 2011, at 19:59, Erik Cederstrand wrote: > Hi David, >=20 > Those aren't Swiss Francs. They're yuan renminbi (CNY). It does seen = they have 2 digits, though. >=20 > Thanks, > Erik >=20 > Den 12/11/2011 kl. 15.39 skrev David Chisnall: >=20 >> Author: theraven >> Date: Sat Nov 12 14:39:20 2011 >> New Revision: 227467 >> URL: http://svn.freebsd.org/changeset/base/227467 >>=20 >> Log: >> Fix the number of decimal digits used for Swiss Francs (0 -> 2). = Found by the libc++ test suite. If there is some locale test suite = somewhere, it might be worth running it... >>=20 >> Approved by: dim (mentor) >>=20 >> Modified: >> head/share/monetdef/zh_CN.UTF-8.src >>=20 >> Modified: head/share/monetdef/zh_CN.UTF-8.src >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/share/monetdef/zh_CN.UTF-8.src Sat Nov 12 10:30:14 2011 = (r227466) >> +++ head/share/monetdef/zh_CN.UTF-8.src Sat Nov 12 14:39:20 2011 = (r227467) >> @@ -18,9 +18,9 @@ CNY=20 >> # negative_sign >> - >> # int_frac_digits >> -0 >> +2 >> # frac_digits >> -0 >> +2 >> # p_cs_precedes >> 1 >> # p_sep_by_space >=20 >=20 From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 21:26:33 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 4ECF11065672; Sun, 13 Nov 2011 21:26:33 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id DEE2914EE7B; Sun, 13 Nov 2011 21:26:32 +0000 (UTC) Message-ID: <4EC03608.1050807@FreeBSD.org> Date: Sun, 13 Nov 2011 13:26:32 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Jilles Tjoelker References: <201111130318.pAD3IvGr074144@svn.freebsd.org> <32EF12FA-07AC-481C-A407-3C8B578484C4@gmail.com> <20111113122150.GA62828@stack.nl> In-Reply-To: <20111113122150.GA62828@stack.nl> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Garrett Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r227483 - head/usr.sbin/portsnap/portsnap 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, 13 Nov 2011 21:26:33 -0000 On 11/13/2011 04:21, Jilles Tjoelker wrote: > Given that you are already using 'local', why not use it everywhere? You > may need to split up some functions to do this. You might want to look more deeply at the portsnap code before you recommend that Alfred take responsibility for roto-tilling it. :) I looked at it, and ran away screaming. The fact that Alfred is willing to take on the task of making some incremental improvements is a feature. Doug -- "We could put the whole Internet into a book." "Too practical." Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 22:09:13 2011 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 6BC0A106564A; Sun, 13 Nov 2011 22:09:13 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id E593E8FC0A; Sun, 13 Nov 2011 22:09:12 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id AB5C4D97; Sun, 13 Nov 2011 23:09:10 +0100 (CET) Date: Sun, 13 Nov 2011 23:08:17 +0100 From: Pawel Jakub Dawidek To: Garrett Cooper Message-ID: <20111113220817.GC1677@garage.freebsd.pl> References: <201111122001.pACK1UML059238@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7iMSBzlTiPOCCT2k" Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r227473 - head/sbin/geom/class/multipath 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, 13 Nov 2011 22:09:13 -0000 --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 12, 2011 at 12:16:23PM -0800, Garrett Cooper wrote: > On Sat, Nov 12, 2011 at 12:01 PM, Alexander Motin wrote: > > Author: mav > > Date: Sat Nov 12 20:01:30 2011 > > New Revision: 227473 > > URL: http://svn.freebsd.org/changeset/base/227473 > > > > Log: > > =A0Fix build on some archs after r227464. > > > > Modified: > > =A0head/sbin/geom/class/multipath/geom_multipath.c > > > > Modified: head/sbin/geom/class/multipath/geom_multipath.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/sbin/geom/class/multipath/geom_multipath.c =A0 =A0 Sat Nov 12 = 19:55:48 2011 =A0 =A0 =A0 =A0(r227472) > > +++ head/sbin/geom/class/multipath/geom_multipath.c =A0 =A0 Sat Nov 12 = 20:01:30 2011 =A0 =A0 =A0 =A0(r227473) > > @@ -133,7 +133,8 @@ mp_label(struct gctl_req *req) > > =A0 =A0 =A0 =A0uint8_t *sector, *rsector; > > =A0 =A0 =A0 =A0char *ptr; > > =A0 =A0 =A0 =A0uuid_t uuid; > > - =A0 =A0 =A0 uint32_t secsize =3D 0, ssize, status; > > + =A0 =A0 =A0 ssize_t secsize =3D 0, ssize; > > + =A0 =A0 =A0 uint32_t status; > > =A0 =A0 =A0 =A0const char *name, *name2, *mpname; > > =A0 =A0 =A0 =A0int error, i, nargs, fd; > > > > @@ -161,8 +162,8 @@ mp_label(struct gctl_req *req) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0disksize =3D msize; > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} else { > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (secsize !=3D ssize) { > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gctl_erro= r(req, "%s sector size %u different.", > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 n= ame, ssize); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gctl_erro= r(req, "%s sector size %ju different.", > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 n= ame, (intmax_t)ssize); >=20 > Shouldn't that be uintmax_t, not intmax_t ? No, ssize_t is signed. Although the best would be to use %zd for ssize_t. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --7iMSBzlTiPOCCT2k Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk7AP9EACgkQForvXbEpPzQ7wwCffcAZNzJKHhNaOOqM/9MdR97D lw8AoPMt9npvACECUTj0pj+Olpw4XVb9 =pE42 -----END PGP SIGNATURE----- --7iMSBzlTiPOCCT2k-- From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 22:46:40 2011 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 5F1ED106564A; Sun, 13 Nov 2011 22:46:40 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7CBCD8FC0A; Sun, 13 Nov 2011 22:46:39 +0000 (UTC) Received: by ggnk3 with SMTP id k3so7975510ggn.13 for ; Sun, 13 Nov 2011 14:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=J82XRQKOrWK5K56xXBL4bOLJd17p0E09W6jF2FQtpLA=; b=kQEUs+XhP1IVl2OZip6ch2q/wtzvn78OXOzF1v41s6jlDQ8dp/ND67EYsljktf1k92 /rTix4A/ke9AjVRf2jGtgRqTRWwwXZ3TrmuQ+tyMnzOSi/OZdAMBnWIwdtc9NKK7Hol+ JDKOenUtM9KQAJpzkWNs53uAGaHZLE+S7lMQU= MIME-Version: 1.0 Received: by 10.182.216.105 with SMTP id op9mr4473401obc.57.1321224398914; Sun, 13 Nov 2011 14:46:38 -0800 (PST) Received: by 10.182.7.34 with HTTP; Sun, 13 Nov 2011 14:46:38 -0800 (PST) In-Reply-To: <20111113220817.GC1677@garage.freebsd.pl> References: <201111122001.pACK1UML059238@svn.freebsd.org> <20111113220817.GC1677@garage.freebsd.pl> Date: Sun, 13 Nov 2011 14:46:38 -0800 Message-ID: From: Garrett Cooper To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r227473 - head/sbin/geom/class/multipath 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, 13 Nov 2011 22:46:40 -0000 On Sun, Nov 13, 2011 at 2:08 PM, Pawel Jakub Dawidek wrot= e: > On Sat, Nov 12, 2011 at 12:16:23PM -0800, Garrett Cooper wrote: >> On Sat, Nov 12, 2011 at 12:01 PM, Alexander Motin wrot= e: >> > Author: mav >> > Date: Sat Nov 12 20:01:30 2011 >> > New Revision: 227473 >> > URL: http://svn.freebsd.org/changeset/base/227473 >> > >> > Log: >> > =A0Fix build on some archs after r227464. >> > >> > Modified: >> > =A0head/sbin/geom/class/multipath/geom_multipath.c >> > >> > Modified: head/sbin/geom/class/multipath/geom_multipath.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/sbin/geom/class/multipath/geom_multipath.c =A0 =A0 Sat Nov 12= 19:55:48 2011 =A0 =A0 =A0 =A0(r227472) >> > +++ head/sbin/geom/class/multipath/geom_multipath.c =A0 =A0 Sat Nov 12= 20:01:30 2011 =A0 =A0 =A0 =A0(r227473) >> > @@ -133,7 +133,8 @@ mp_label(struct gctl_req *req) >> > =A0 =A0 =A0 =A0uint8_t *sector, *rsector; >> > =A0 =A0 =A0 =A0char *ptr; >> > =A0 =A0 =A0 =A0uuid_t uuid; >> > - =A0 =A0 =A0 uint32_t secsize =3D 0, ssize, status; >> > + =A0 =A0 =A0 ssize_t secsize =3D 0, ssize; >> > + =A0 =A0 =A0 uint32_t status; >> > =A0 =A0 =A0 =A0const char *name, *name2, *mpname; >> > =A0 =A0 =A0 =A0int error, i, nargs, fd; >> > >> > @@ -161,8 +162,8 @@ mp_label(struct gctl_req *req) >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0disksize =3D msize; >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} else { >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (secsize !=3D ssize)= { >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gctl_err= or(req, "%s sector size %u different.", >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = name, ssize); >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gctl_err= or(req, "%s sector size %ju different.", >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = name, (intmax_t)ssize); >> >> Shouldn't that be uintmax_t, not intmax_t ? > > No, ssize_t is signed. Although the best would be to use %zd for > ssize_t. Thanks... Missed the leading s. -Garrett From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 23:09:26 2011 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 DF6BC106564A; Sun, 13 Nov 2011 23:09:26 +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 CF8728FC12; Sun, 13 Nov 2011 23:09:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pADN9Qrv012600; Sun, 13 Nov 2011 23:09:26 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pADN9QQ8012598; Sun, 13 Nov 2011 23:09:26 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201111132309.pADN9QQ8012598@svn.freebsd.org> From: Rick Macklem Date: Sun, 13 Nov 2011 23:09:26 +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: r227493 - head/sys/fs/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: Sun, 13 Nov 2011 23:09:27 -0000 Author: rmacklem Date: Sun Nov 13 23:09:26 2011 New Revision: 227493 URL: http://svn.freebsd.org/changeset/base/227493 Log: Move the assignment of default values for some mount options to before the nfs_decode_args() call in the new NFS client, so they don't overwrite the value specified on the command line. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sun Nov 13 21:36:20 2011 (r227492) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sun Nov 13 23:09:26 2011 (r227493) @@ -1212,7 +1212,16 @@ mountnfs(struct nfs_args *argp, struct m vfs_getnewfsid(mp); nmp->nm_mountp = mp; mtx_init(&nmp->nm_mtx, "NFSmount lock", NULL, MTX_DEF | MTX_DUPOK); + + /* + * Since nfs_decode_args() might optionally set them, these need to + * set to defaults before the call, so that the optional settings + * aren't overwritten. + */ nmp->nm_negnametimeo = negnametimeo; + nmp->nm_timeo = NFS_TIMEO; + nmp->nm_retry = NFS_RETRANS; + nmp->nm_readahead = NFS_DEFRAHEAD; nfs_decode_args(mp, nmp, argp, hst, cred, td); @@ -1231,8 +1240,6 @@ mountnfs(struct nfs_args *argp, struct m else nmp->nm_maxfilesize = OFF_MAX; - nmp->nm_timeo = NFS_TIMEO; - nmp->nm_retry = NFS_RETRANS; if ((argp->flags & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) == 0) { nmp->nm_wsize = NFS_WSIZE; nmp->nm_rsize = NFS_RSIZE; @@ -1240,7 +1247,6 @@ mountnfs(struct nfs_args *argp, struct m } nmp->nm_wcommitsize = hibufspace / (desiredvnodes / 1000); nmp->nm_numgrps = NFS_MAXGRPS; - nmp->nm_readahead = NFS_DEFRAHEAD; nmp->nm_tprintf_delay = nfs_tprintf_delay; if (nmp->nm_tprintf_delay < 0) nmp->nm_tprintf_delay = 0; From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 23:20:55 2011 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 3BBD51065690; Sun, 13 Nov 2011 23:20:55 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id F00518FC13; Sun, 13 Nov 2011 23:20:54 +0000 (UTC) Received: by pzk33 with SMTP id 33so21959612pzk.3 for ; Sun, 13 Nov 2011 15:20:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=CTUo3LOxDv+/lCRpkPZ2mABkar/vdA6uTfkdeJi+HEE=; b=RECKfmPM0xY6Ivdai5lm7cdKm6PXR56Gkj4rNB6Jov1+fAZbSbsRQd6Ta/uwfxUXNE yWfNdQbt1XD3T9LDWMD3jRqWaX9/U8Hnda/QvJSxYDLXcjOfyOUv8MWlxq68IHUkbrnD j4YsAcrOCI1XNiqYKy4YOOk20npKZQ0y5kDuk= MIME-Version: 1.0 Received: by 10.68.27.166 with SMTP id u6mr44332803pbg.59.1321225029628; Sun, 13 Nov 2011 14:57:09 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.68.56.97 with HTTP; Sun, 13 Nov 2011 14:57:09 -0800 (PST) In-Reply-To: References: <201111122001.pACK1UML059238@svn.freebsd.org> <20111113220817.GC1677@garage.freebsd.pl> Date: Sun, 13 Nov 2011 14:57:09 -0800 X-Google-Sender-Auth: OejJTDKKnAYD1w85Q5siyHo2EWA Message-ID: From: mdf@FreeBSD.org To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, Pawel Jakub Dawidek , svn-src-all@freebsd.org Subject: Re: svn commit: r227473 - head/sbin/geom/class/multipath 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, 13 Nov 2011 23:20:55 -0000 On Sun, Nov 13, 2011 at 2:46 PM, Garrett Cooper wrote: > On Sun, Nov 13, 2011 at 2:08 PM, Pawel Jakub Dawidek wr= ote: >> On Sat, Nov 12, 2011 at 12:16:23PM -0800, Garrett Cooper wrote: >>> On Sat, Nov 12, 2011 at 12:01 PM, Alexander Motin wro= te: >>> > Author: mav >>> > Date: Sat Nov 12 20:01:30 2011 >>> > New Revision: 227473 >>> > URL: http://svn.freebsd.org/changeset/base/227473 >>> > >>> > Log: >>> > =A0Fix build on some archs after r227464. >>> > >>> > Modified: >>> > =A0head/sbin/geom/class/multipath/geom_multipath.c >>> > >>> > Modified: head/sbin/geom/class/multipath/geom_multipath.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/sbin/geom/class/multipath/geom_multipath.c =A0 =A0 Sat Nov 1= 2 19:55:48 2011 =A0 =A0 =A0 =A0(r227472) >>> > +++ head/sbin/geom/class/multipath/geom_multipath.c =A0 =A0 Sat Nov 1= 2 20:01:30 2011 =A0 =A0 =A0 =A0(r227473) >>> > @@ -133,7 +133,8 @@ mp_label(struct gctl_req *req) >>> > =A0 =A0 =A0 =A0uint8_t *sector, *rsector; >>> > =A0 =A0 =A0 =A0char *ptr; >>> > =A0 =A0 =A0 =A0uuid_t uuid; >>> > - =A0 =A0 =A0 uint32_t secsize =3D 0, ssize, status; >>> > + =A0 =A0 =A0 ssize_t secsize =3D 0, ssize; >>> > + =A0 =A0 =A0 uint32_t status; >>> > =A0 =A0 =A0 =A0const char *name, *name2, *mpname; >>> > =A0 =A0 =A0 =A0int error, i, nargs, fd; >>> > >>> > @@ -161,8 +162,8 @@ mp_label(struct gctl_req *req) >>> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0disksize =3D msize; >>> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} else { >>> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (secsize !=3D ssize= ) { >>> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gctl_er= ror(req, "%s sector size %u different.", >>> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= name, ssize); >>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gctl_er= ror(req, "%s sector size %ju different.", >>> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= name, (intmax_t)ssize); >>> >>> Shouldn't that be uintmax_t, not intmax_t ? >> >> No, ssize_t is signed. Although the best would be to use %zd for >> ssize_t. > > Thanks... Missed the leading s. ... except that the cast and conversion specifier aren't in sync. The cast is signed; the conversion specifier is unsigned. %zd is still best, since it's the conversion specifier for the variable's type. Next best is %jd and cast to intmax_t, since the signedness is preserved. But in the end it doesn't matter a lot since whatever is printed in the error message, it's likely derivable from reading the code what the actual value used was. Cheers, matthew From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 00:10:12 2011 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 096D7106566C; Mon, 14 Nov 2011 00:10:12 +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 EDCEC8FC0A; Mon, 14 Nov 2011 00:10:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAE0ABcA014647; Mon, 14 Nov 2011 00:10:11 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAE0ABvg014645; Mon, 14 Nov 2011 00:10:11 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201111140010.pAE0ABvg014645@svn.freebsd.org> From: Rick Macklem Date: Mon, 14 Nov 2011 00:10: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: r227494 - head/sys/fs/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: Mon, 14 Nov 2011 00:10:12 -0000 Author: rmacklem Date: Mon Nov 14 00:10:11 2011 New Revision: 227494 URL: http://svn.freebsd.org/changeset/base/227494 Log: Since NFSv4 byte range locking only works for regular files, add a sanity check for the vnode type to the NFSv4 client. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sun Nov 13 23:09:26 2011 (r227493) +++ head/sys/fs/nfsclient/nfs_clvnops.c Mon Nov 14 00:10:11 2011 (r227494) @@ -2941,6 +2941,8 @@ nfs_advlock(struct vop_advlock_args *ap) u_quad_t size; if (NFS_ISV4(vp) && (ap->a_flags & (F_POSIX | F_FLOCK)) != 0) { + if (vp->v_type != VREG) + return (EINVAL); if ((ap->a_flags & F_POSIX) != 0) cred = p->p_ucred; else From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 05:31:26 2011 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 76E61106566C; Mon, 14 Nov 2011 05:31:26 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by mx1.freebsd.org (Postfix) with ESMTP id 079D98FC0C; Mon, 14 Nov 2011 05:31:25 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail17.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pAE5VHBH019707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 14 Nov 2011 16:31:18 +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.5/8.14.4) with ESMTP id pAE5VHZh091333; Mon, 14 Nov 2011 16:31:17 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.5/8.14.4/Submit) id pAE5VG2O091332; Mon, 14 Nov 2011 16:31:16 +1100 (EST) (envelope-from peter) Date: Mon, 14 Nov 2011 16:31:16 +1100 From: Peter Jeremy To: David Chisnall Message-ID: <20111114053116.GA91295@server.vk2pj.dyndns.org> References: <201111122016.pACKG7sr059722@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <201111122016.pACKG7sr059722@svn.freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r227474 - head/sys/amd64/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: Mon, 14 Nov 2011 05:31:26 -0000 --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-Nov-12 20:16:07 +0000, David Chisnall wrote: > Fix SIGATOMIC_M{IN,AX} on x86-64. Thanks for that. I have two comments: 1) Could you please wrap your log messages so that lines do not exceed 80 characters. > /* Limits of sig_atomic_t. */ >-#define SIG_ATOMIC_MIN INT32_MIN >-#define SIG_ATOMIC_MAX INT32_MAX >+#define SIG_ATOMIC_MIN LONG_MIN >+#define SIG_ATOMIC_MAX LONG_MAX 2) As far as I can see, all other defines in _stdint.h, across all architectures, have explicit lengths, so I believe this would be better specified as: #define SIG_ATOMIC_MIN INT64_MIN #define SIG_ATOMIC_MAX INT64_MAX --=20 Peter Jeremy --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7Ap6QACgkQ/opHv/APuIeRbQCfW2Y3QbNypiPI6v6jRgmbyguG ehgAnAgE/wPsM63+QkKLT3tmatXX/ini =/kNB -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY-- From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 07:12:10 2011 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 9908D106564A; Mon, 14 Nov 2011 07:12:10 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 882578FC16; Mon, 14 Nov 2011 07:12:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAE7CAsU031300; Mon, 14 Nov 2011 07:12:10 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAE7CARc031296; Mon, 14 Nov 2011 07:12:10 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201111140712.pAE7CARc031296@svn.freebsd.org> From: Alfred Perlstein Date: Mon, 14 Nov 2011 07:12: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: r227496 - 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: Mon, 14 Nov 2011 07:12:10 -0000 Author: alfred Date: Mon Nov 14 07:12:10 2011 New Revision: 227496 URL: http://svn.freebsd.org/changeset/base/227496 Log: Constify args to copyiniov and copyinuio. Modified: head/sys/kern/subr_uio.c head/sys/sys/uio.h Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Mon Nov 14 00:45:25 2011 (r227495) +++ head/sys/kern/subr_uio.c Mon Nov 14 07:12:10 2011 (r227496) @@ -437,7 +437,7 @@ copyinstrfrom(const void * __restrict sr } int -copyiniov(struct iovec *iovp, u_int iovcnt, struct iovec **iov, int error) +copyiniov(const struct iovec *iovp, u_int iovcnt, struct iovec **iov, int error) { u_int iovlen; @@ -455,7 +455,7 @@ copyiniov(struct iovec *iovp, u_int iovc } int -copyinuio(struct iovec *iovp, u_int iovcnt, struct uio **uiop) +copyinuio(const struct iovec *iovp, u_int iovcnt, struct uio **uiop) { struct iovec *iov; struct uio *uio; Modified: head/sys/sys/uio.h ============================================================================== --- head/sys/sys/uio.h Mon Nov 14 00:45:25 2011 (r227495) +++ head/sys/sys/uio.h Mon Nov 14 07:12:10 2011 (r227496) @@ -89,11 +89,11 @@ struct vm_page; struct uio *cloneuio(struct uio *uiop); int copyinfrom(const void * __restrict src, void * __restrict dst, size_t len, int seg); -int copyiniov(struct iovec *iovp, u_int iovcnt, struct iovec **iov, +int copyiniov(const struct iovec *iovp, u_int iovcnt, struct iovec **iov, int error); int copyinstrfrom(const void * __restrict src, void * __restrict dst, size_t len, size_t * __restrict copied, int seg); -int copyinuio(struct iovec *iovp, u_int iovcnt, struct uio **uiop); +int copyinuio(const struct iovec *iovp, u_int iovcnt, struct uio **uiop); int copyout_map(struct thread *td, vm_offset_t *addr, size_t sz); int copyout_unmap(struct thread *td, vm_offset_t addr, size_t sz); int uiomove(void *cp, int n, struct uio *uio); From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 08:01:23 2011 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 C7030106566B; Mon, 14 Nov 2011 08:01:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 860C18FC12; Mon, 14 Nov 2011 08:01:23 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:d8ac:9806:a63d:a8d4] (unknown [IPv6:2001:7b8:3a7:0:d8ac:9806:a63d:a8d4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id AD8D95C59; Mon, 14 Nov 2011 09:01:22 +0100 (CET) Message-ID: <4EC0CAD0.1070100@FreeBSD.org> Date: Mon, 14 Nov 2011 09:01:20 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Peter Jeremy References: <201111122016.pACKG7sr059722@svn.freebsd.org> <20111114053116.GA91295@server.vk2pj.dyndns.org> In-Reply-To: <20111114053116.GA91295@server.vk2pj.dyndns.org> X-Enigmail-Version: 1.3.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, David Chisnall Subject: Re: svn commit: r227474 - head/sys/amd64/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: Mon, 14 Nov 2011 08:01:23 -0000 On 2011-11-14 06:31, Peter Jeremy wrote: > On 2011-Nov-12 20:16:07 +0000, David Chisnall wrote: ... >> +#define SIG_ATOMIC_MIN LONG_MIN >> +#define SIG_ATOMIC_MAX LONG_MAX > > 2) As far as I can see, all other defines in _stdint.h, across all > architectures, have explicit lengths, so I believe this would be > better specified as: > > #define SIG_ATOMIC_MIN INT64_MIN > #define SIG_ATOMIC_MAX INT64_MAX Why? On amd64, sig_atomic_t is defined as long, so LONG_MIN and LONG_MAX are more logical. In fact, for all architectures, sig_atomic_t is either int or long, so INTnn_MIN/MAX is rather strangely chosen. From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 08:21:35 2011 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 0D4AC1065670; Mon, 14 Nov 2011 08:21:35 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep18.mx.upcmail.net (fep18.mx.upcmail.net [62.179.121.38]) by mx1.freebsd.org (Postfix) with ESMTP id C5D9E8FC16; Mon, 14 Nov 2011 08:21:33 +0000 (UTC) Received: from edge01.upcmail.net ([192.168.13.236]) by viefep18-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20111114082131.EDTG1564.viefep18-int.chello.at@edge01.upcmail.net>; Mon, 14 Nov 2011 09:21:31 +0100 Received: from mole.fafoe.narf.at ([213.47.85.26]) by edge01.upcmail.net with edge id wwMW1h0120a5KZh01wMXFp; Mon, 14 Nov 2011 09:21:31 +0100 X-SourceIP: 213.47.85.26 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 485DE6D421; Mon, 14 Nov 2011 09:21:30 +0100 (CET) Date: Mon, 14 Nov 2011 09:21:30 +0100 From: Stefan Farfeleder To: David Chisnall Message-ID: <20111114082129.GA1596@mole.fafoe.narf.at> References: <201111131618.pADGIm2n099696@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201111131618.pADGIm2n099696@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Cloudmark-Analysis: v=1.1 cv=h6X7fkn2Y8psEldlT1JduSyVgv7YVLWttKdqKtnr7ik= c=1 sm=0 a=wom5GMh1gUkA:10 a=f7SxzaMzl38A:10 a=dBRESv0yCI8A:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=Y-fD9IKKHXjQ9bP-RQgA:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227487 - head/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: Mon, 14 Nov 2011 08:21:35 -0000 On Sun, Nov 13, 2011 at 04:18:48PM +0000, David Chisnall wrote: > Author: theraven > Date: Sun Nov 13 16:18:48 2011 > New Revision: 227487 > URL: http://svn.freebsd.org/changeset/base/227487 > > Log: > The spec says that FILE must be defined in wchar.h, but it wasn't. It > is now. Also hide some macros in C++ mode that will break C++ > namespaced calls. > > Approved by: dim (mentor) I think this change is wrong. Whic spec are you referring to? C99 defines FILE only in 7.19.1#2 (stdio.h). In other headers FILE is used as parameter type for functions but that does not mean it is exported to user space. Stefan From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 08:29:50 2011 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 489CC106564A; Mon, 14 Nov 2011 08:29:50 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D88B58FC14; Mon, 14 Nov 2011 08:29:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAE8TncN034753; Mon, 14 Nov 2011 08:29:49 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAE8TngF034751; Mon, 14 Nov 2011 08:29:49 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201111140829.pAE8TngF034751@svn.freebsd.org> From: Martin Matuska Date: Mon, 14 Nov 2011 08:29: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: r227497 - head/cddl/contrib/opensolaris/cmd/zpool 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, 14 Nov 2011 08:29:50 -0000 Author: mm Date: Mon Nov 14 08:29:49 2011 New Revision: 227497 URL: http://svn.freebsd.org/changeset/base/227497 Log: Import upstream changesets for the output of the "zpool" command: 952 separate intent logs should be obvious in 'zpool iostat' output 1337 `zpool status -D' should tell if there are no DDT entries References: https://www.illumos.org/issues/952 https://www.illumos.org/issues/1337 Obtained from: Illumos (issues 952, 1337; changesets 13384, 13432) MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Nov 14 07:12:10 2011 (r227496) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Mon Nov 14 08:29:49 2011 (r227497) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. */ #include @@ -2206,10 +2207,15 @@ print_vdev_stats(zpool_handle_t *zhp, co return; for (c = 0; c < children; c++) { - uint64_t ishole = B_FALSE; + uint64_t ishole = B_FALSE, islog = B_FALSE; - if (nvlist_lookup_uint64(newchild[c], - ZPOOL_CONFIG_IS_HOLE, &ishole) == 0 && ishole) + (void) nvlist_lookup_uint64(newchild[c], ZPOOL_CONFIG_IS_HOLE, + &ishole); + + (void) nvlist_lookup_uint64(newchild[c], ZPOOL_CONFIG_IS_LOG, + &islog); + + if (ishole || islog) continue; vname = zpool_vdev_name(g_zfs, zhp, newchild[c], B_FALSE); @@ -2219,6 +2225,31 @@ print_vdev_stats(zpool_handle_t *zhp, co } /* + * Log device section + */ + + if (num_logs(newnv) > 0) { + (void) printf("%-*s - - - - - " + "-\n", cb->cb_namewidth, "logs"); + + for (c = 0; c < children; c++) { + uint64_t islog = B_FALSE; + (void) nvlist_lookup_uint64(newchild[c], + ZPOOL_CONFIG_IS_LOG, &islog); + + if (islog) { + vname = zpool_vdev_name(g_zfs, zhp, newchild[c], + B_FALSE); + print_vdev_stats(zhp, vname, oldnv ? + oldchild[c] : NULL, newchild[c], + cb, depth + 2); + free(vname); + } + } + + } + + /* * Include level 2 ARC devices in iostat output */ if (nvlist_lookup_nvlist_array(newnv, ZPOOL_CONFIG_L2CACHE, @@ -3565,10 +3596,16 @@ print_dedup_stats(nvlist_t *config) * table continue processing the stats. */ if (nvlist_lookup_uint64_array(config, ZPOOL_CONFIG_DDT_OBJ_STATS, - (uint64_t **)&ddo, &c) != 0 || ddo->ddo_count == 0) + (uint64_t **)&ddo, &c) != 0) return; (void) printf("\n"); + (void) printf(gettext(" dedup: ")); + if (ddo->ddo_count == 0) { + (void) printf(gettext("no DDT entries\n")); + return; + } + (void) printf("DDT entries %llu, size %llu on disk, %llu in core\n", (u_longlong_t)ddo->ddo_count, (u_longlong_t)ddo->ddo_dspace, From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 09:01:59 2011 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 482251065673; Mon, 14 Nov 2011 09:01:59 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 339AB8FC12; Mon, 14 Nov 2011 09:01:59 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id BDA311A3C6C; Mon, 14 Nov 2011 01:01:58 -0800 (PST) Date: Mon, 14 Nov 2011 01:01:58 -0800 From: Alfred Perlstein To: Doug Barton Message-ID: <20111114090157.GB1455@elvis.mu.org> References: <201111130318.pAD3IvGr074144@svn.freebsd.org> <32EF12FA-07AC-481C-A407-3C8B578484C4@gmail.com> <20111113122150.GA62828@stack.nl> <4EC03608.1050807@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EC03608.1050807@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: Garrett Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jilles Tjoelker Subject: Re: svn commit: r227483 - head/usr.sbin/portsnap/portsnap 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, 14 Nov 2011 09:01:59 -0000 * Doug Barton [111113 13:26] wrote: > On 11/13/2011 04:21, Jilles Tjoelker wrote: > > Given that you are already using 'local', why not use it everywhere? You > > may need to split up some functions to do this. > > You might want to look more deeply at the portsnap code before you > recommend that Alfred take responsibility for roto-tilling it. :) I > looked at it, and ran away screaming. The fact that Alfred is willing to > take on the task of making some incremental improvements is a feature. http://memegenerator.net/cache/instances/400x/10/11149/11417307.jpg -- - Alfred Perlstein .- VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 .- FreeBSD committer From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 10:00:37 2011 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 13CA610656B3; Mon, 14 Nov 2011 10:00:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id C81A28FC0C; Mon, 14 Nov 2011 10:00:36 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:d8ac:9806:a63d:a8d4] (unknown [IPv6:2001:7b8:3a7:0:d8ac:9806:a63d:a8d4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 9F7CB5C59; Mon, 14 Nov 2011 11:00:35 +0100 (CET) Message-ID: <4EC0E6C2.4010509@FreeBSD.org> Date: Mon, 14 Nov 2011 11:00:34 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Stefan Farfeleder References: <201111131618.pADGIm2n099696@svn.freebsd.org> <20111114082129.GA1596@mole.fafoe.narf.at> In-Reply-To: <20111114082129.GA1596@mole.fafoe.narf.at> X-Enigmail-Version: 1.3.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall Subject: Re: svn commit: r227487 - head/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: Mon, 14 Nov 2011 10:00:37 -0000 On 2011-11-14 09:21, Stefan Farfeleder wrote: > On Sun, Nov 13, 2011 at 04:18:48PM +0000, David Chisnall wrote: >> Author: theraven >> Date: Sun Nov 13 16:18:48 2011 >> New Revision: 227487 >> URL: http://svn.freebsd.org/changeset/base/227487 >> >> Log: >> The spec says that FILE must be defined in wchar.h, but it wasn't. It >> is now. Also hide some macros in C++ mode that will break C++ >> namespaced calls. >> >> Approved by: dim (mentor) > > I think this change is wrong. Whic spec are you referring to? C99 > defines FILE only in 7.19.1#2 (stdio.h). In other headers FILE is used > as parameter type for functions but that does not mean it is exported to > user space. http://pubs.opengroup.org/onlinepubs/007908799/xsh/wchar.h.html From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 15:10:43 2011 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 049B21065686; Mon, 14 Nov 2011 15:10:43 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E91268FC21; Mon, 14 Nov 2011 15:10:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAEFAgX8054482; Mon, 14 Nov 2011 15:10:42 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAEFAg7E054480; Mon, 14 Nov 2011 15:10:42 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201111141510.pAEFAg7E054480@svn.freebsd.org> From: Andre Oppermann Date: Mon, 14 Nov 2011 15:10: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: r227499 - 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: Mon, 14 Nov 2011 15:10:43 -0000 Author: andre Date: Mon Nov 14 15:10:42 2011 New Revision: 227499 URL: http://svn.freebsd.org/changeset/base/227499 Log: Note the ip_len bug fixed in r226105 in the BUGS section. Modified: head/share/man/man4/ip.4 Modified: head/share/man/man4/ip.4 ============================================================================== --- head/share/man/man4/ip.4 Mon Nov 14 15:10:01 2011 (r227498) +++ head/share/man/man4/ip.4 Mon Nov 14 15:10:42 2011 (r227499) @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd June 1, 2009 +.Dd November 14, 2011 .Dt IP 4 .Os .Sh NAME @@ -847,3 +847,9 @@ The .Vt ip_mreqn structure appeared in .Tn Linux 2.4 . +.Sh BUGS +Before +.Fx 10.0 packets received on raw IP sockets had the +.Va ip_hl +subtracted from the +.Va ip_len field. From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 15:14:42 2011 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 E49AA1065673; Mon, 14 Nov 2011 15:14:42 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D48D58FC16; Mon, 14 Nov 2011 15:14:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAEFEgEn054642; Mon, 14 Nov 2011 15:14:42 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAEFEgvu054640; Mon, 14 Nov 2011 15:14:42 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201111141514.pAEFEgvu054640@svn.freebsd.org> From: Andre Oppermann Date: Mon, 14 Nov 2011 15:14: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: r227500 - 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: Mon, 14 Nov 2011 15:14:43 -0000 Author: andre Date: Mon Nov 14 15:14:42 2011 New Revision: 227500 URL: http://svn.freebsd.org/changeset/base/227500 Log: Remove mention of ss_fltsz and ss_fltsz_local which were retired in r226447. Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Mon Nov 14 15:10:42 2011 (r227499) +++ head/share/man/man4/tcp.4 Mon Nov 14 15:14:42 2011 (r227500) @@ -38,7 +38,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd September 15, 2011 +.Dd November 14, 2011 .Dt TCP 4 .Os .Sh NAME @@ -290,14 +290,6 @@ That of 2 results in any packets to closed ports being logged. Any value unlisted above disables the logging (default is 0, i.e., the logging is disabled). -.It Va slowstart_flightsize -The number of packets allowed to be in-flight during the -.Tn TCP -slow-start phase on a non-local network. -.It Va local_slowstart_flightsize -The number of packets allowed to be in-flight during the -.Tn TCP -slow-start phase to local machines in the same subnet. .It Va msl The Maximum Segment Lifetime, in milliseconds, for a packet. .It Va keepinit @@ -411,15 +403,6 @@ maximum segment size. This helps throughput in general, but particularly affects short transfers and high-bandwidth large propagation-delay connections. -.Pp -When this feature is enabled, the -.Va slowstart_flightsize -and -.Va local_slowstart_flightsize -settings are not observed for new -connection slow starts, but they are still used for slow starts -that occur when the connection has been idle and starts sending -again. .It Va sack.enable Enable support for RFC 2018, TCP Selective Acknowledgment option, which allows the receiver to inform the sender about all successfully From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 15:39:00 2011 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 DCE6C106566B; Mon, 14 Nov 2011 15:39:00 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 63A628FC0A; Mon, 14 Nov 2011 15:39:00 +0000 (UTC) Received: by yenl11 with SMTP id l11so1593008yen.13 for ; Mon, 14 Nov 2011 07:38:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=7nhyNTuwcWzOwzXch/uxk47MQa92EzPM0OHqD84C5i8=; b=k8nekzyWLHP7lUwSNOyOl26ve7UFJf0ycCilTjN50C/SNEk9HG70hae8qNLzTPZcNy g5Y5L3DXlfY2F6pWXMREDos48ppugjEoBuKM+V3eGcy+kSSNpgV4OwyzUxWH2dmtiHRg nA8ZHzn2nR+2DA6rTqiKj7bs3U81aDXq9k+FU= MIME-Version: 1.0 Received: by 10.182.59.49 with SMTP id w17mr5082615obq.37.1321285139753; Mon, 14 Nov 2011 07:38:59 -0800 (PST) Received: by 10.182.7.34 with HTTP; Mon, 14 Nov 2011 07:38:59 -0800 (PST) In-Reply-To: <201111141510.pAEFAg7E054480@svn.freebsd.org> References: <201111141510.pAEFAg7E054480@svn.freebsd.org> Date: Mon, 14 Nov 2011 07:38:59 -0800 Message-ID: From: Garrett Cooper To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227499 - 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: Mon, 14 Nov 2011 15:39:01 -0000 On Mon, Nov 14, 2011 at 7:10 AM, Andre Oppermann wrote: > Author: andre > Date: Mon Nov 14 15:10:42 2011 > New Revision: 227499 > URL: http://svn.freebsd.org/changeset/base/227499 > > Log: > =A0Note the ip_len bug fixed in r226105 in the BUGS section. > > Modified: > =A0head/share/man/man4/ip.4 > > Modified: head/share/man/man4/ip.4 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/share/man/man4/ip.4 =A0 =A0Mon Nov 14 15:10:01 2011 =A0 =A0 =A0 = =A0(r227498) > +++ head/share/man/man4/ip.4 =A0 =A0Mon Nov 14 15:10:42 2011 =A0 =A0 =A0 = =A0(r227499) > @@ -32,7 +32,7 @@ > =A0.\" =A0 =A0 @(#)ip.4 =A0 =A0 =A0 8.2 (Berkeley) 11/30/93 > =A0.\" $FreeBSD$ > =A0.\" > -.Dd June 1, 2009 > +.Dd November 14, 2011 > =A0.Dt IP 4 > =A0.Os > =A0.Sh NAME > @@ -847,3 +847,9 @@ The > =A0.Vt ip_mreqn > =A0structure appeared in > =A0.Tn Linux 2.4 . > +.Sh BUGS > +Before > +.Fx 10.0 packets received on raw IP sockets had the > +.Va ip_hl > +subtracted from the > +.Va ip_len field. Isn't the fix going to be MFCed? -Garrett From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 15:55:43 2011 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 2E48B1065673 for ; Mon, 14 Nov 2011 15:55:43 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 930D18FC08 for ; Mon, 14 Nov 2011 15:55:42 +0000 (UTC) Received: (qmail 18777 invoked from network); 14 Nov 2011 14:30:46 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 14 Nov 2011 14:30:45 -0000 Message-ID: <4EC139FC.8020301@freebsd.org> Date: Mon, 14 Nov 2011 16:55:40 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Garrett Cooper References: <201111141510.pAEFAg7E054480@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227499 - 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: Mon, 14 Nov 2011 15:55:43 -0000 On 14.11.2011 16:38, Garrett Cooper wrote: > On Mon, Nov 14, 2011 at 7:10 AM, Andre Oppermann wrote: >> Author: andre >> Date: Mon Nov 14 15:10:42 2011 >> New Revision: 227499 >> URL: http://svn.freebsd.org/changeset/base/227499 >> >> Log: >> Note the ip_len bug fixed in r226105 in the BUGS section. >> >> Modified: >> head/share/man/man4/ip.4 >> >> Modified: head/share/man/man4/ip.4 >> ============================================================================== >> --- head/share/man/man4/ip.4 Mon Nov 14 15:10:01 2011 (r227498) >> +++ head/share/man/man4/ip.4 Mon Nov 14 15:10:42 2011 (r227499) >> @@ -32,7 +32,7 @@ >> .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 >> .\" $FreeBSD$ >> .\" >> -.Dd June 1, 2009 >> +.Dd November 14, 2011 >> .Dt IP 4 >> .Os >> .Sh NAME >> @@ -847,3 +847,9 @@ The >> .Vt ip_mreqn >> structure appeared in >> .Tn Linux 2.4 . >> +.Sh BUGS >> +Before >> +.Fx 10.0 packets received on raw IP sockets had the >> +.Va ip_hl >> +subtracted from the >> +.Va ip_len field. > > Isn't the fix going to be MFCed? It was. However there are some ports depending on this bug and due to the late stage we are in the release cycle we decided to back out the MFC. -- Andre From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 15:57:04 2011 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 26D52106566C; Mon, 14 Nov 2011 15:57:04 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1719D8FC12; Mon, 14 Nov 2011 15:57:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAEFv32n055950; Mon, 14 Nov 2011 15:57:03 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAEFv3xS055948; Mon, 14 Nov 2011 15:57:03 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201111141557.pAEFv3xS055948@svn.freebsd.org> From: Andre Oppermann Date: Mon, 14 Nov 2011 15:57: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: r227501 - 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: Mon, 14 Nov 2011 15:57:04 -0000 Author: andre Date: Mon Nov 14 15:57:03 2011 New Revision: 227501 URL: http://svn.freebsd.org/changeset/base/227501 Log: mdoc fix for r227499. Reported by: brueffer Modified: head/share/man/man4/ip.4 Modified: head/share/man/man4/ip.4 ============================================================================== --- head/share/man/man4/ip.4 Mon Nov 14 15:14:42 2011 (r227500) +++ head/share/man/man4/ip.4 Mon Nov 14 15:57:03 2011 (r227501) @@ -849,7 +849,8 @@ structure appeared in .Tn Linux 2.4 . .Sh BUGS Before -.Fx 10.0 packets received on raw IP sockets had the +.Fx 10.0 +packets received on raw IP sockets had the .Va ip_hl subtracted from the .Va ip_len field. From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 18:00:21 2011 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 03B5F1065689; Mon, 14 Nov 2011 18:00:21 +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 8C4E78FC1C; Mon, 14 Nov 2011 18:00:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAEI0FE0060023; Mon, 14 Nov 2011 18:00:15 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAEI0FPY060019; Mon, 14 Nov 2011 18:00:15 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201111141800.pAEI0FPY060019@svn.freebsd.org> From: John Baldwin Date: Mon, 14 Nov 2011 18:00: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: r227502 - in head/sys: compat/freebsd32 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: Mon, 14 Nov 2011 18:00:21 -0000 Author: jhb Date: Mon Nov 14 18:00:15 2011 New Revision: 227502 URL: http://svn.freebsd.org/changeset/base/227502 Log: - Split out a kern_posix_fadvise() from the posix_fadvise() system call so it can be used by in-kernel consumers. - Make kern_posix_fallocate() public. - Use kern_posix_fadvise() and kern_posix_fallocate() to implement the freebsd32 wrappers for the two system calls. Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/vfs_syscalls.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Mon Nov 14 15:57:03 2011 (r227501) +++ head/sys/compat/freebsd32/freebsd32_misc.c Mon Nov 14 18:00:15 2011 (r227502) @@ -2828,23 +2828,16 @@ int freebsd32_posix_fallocate(struct thread *td, struct freebsd32_posix_fallocate_args *uap) { - struct posix_fallocate_args ap; - ap.fd = uap->fd; - ap.offset = PAIR32TO64(off_t, uap->offset); - ap.len = PAIR32TO64(off_t, uap->len); - return (sys_posix_fallocate(td, &ap)); + return (kern_posix_fallocate(td, uap->fd, + PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len))); } int freebsd32_posix_fadvise(struct thread *td, struct freebsd32_posix_fadvise_args *uap) { - struct posix_fadvise_args ap; - ap.fd = uap->fd; - ap.offset = PAIR32TO64(off_t, uap->offset); - ap.len = PAIR32TO64(off_t, uap->len); - ap.advice = uap->advice; - return (sys_posix_fadvise(td, &ap)); + return (kern_posix_fadvise(td, uap->fd, PAIR32TO64(off_t, uap->offset), + PAIR32TO64(off_t, uap->len), uap->advice)); } Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Nov 14 15:57:03 2011 (r227501) +++ head/sys/kern/vfs_syscalls.c Mon Nov 14 18:00:15 2011 (r227502) @@ -4753,7 +4753,7 @@ out: return (error); } -static int +int kern_posix_fallocate(struct thread *td, int fd, off_t offset, off_t len) { struct file *fp; @@ -4855,7 +4855,8 @@ sys_posix_fallocate(struct thread *td, s * region of any current setting. */ int -sys_posix_fadvise(struct thread *td, struct posix_fadvise_args *uap) +kern_posix_fadvise(struct thread *td, int fd, off_t offset, off_t len, + int advice) { struct fadvise_info *fa, *new; struct file *fp; @@ -4863,10 +4864,9 @@ sys_posix_fadvise(struct thread *td, str off_t end; int error; - if (uap->offset < 0 || uap->len < 0 || - uap->offset > OFF_MAX - uap->len) + if (offset < 0 || len < 0 || offset > OFF_MAX - len) return (EINVAL); - switch (uap->advice) { + switch (advice) { case POSIX_FADV_SEQUENTIAL: case POSIX_FADV_RANDOM: case POSIX_FADV_NOREUSE: @@ -4881,7 +4881,7 @@ sys_posix_fadvise(struct thread *td, str return (EINVAL); } /* XXX: CAP_POSIX_FADVISE? */ - error = fget(td, uap->fd, 0, &fp); + error = fget(td, fd, 0, &fp); if (error != 0) goto out; @@ -4901,11 +4901,11 @@ sys_posix_fadvise(struct thread *td, str error = ENODEV; goto out; } - if (uap->len == 0) + if (len == 0) end = OFF_MAX; else - end = uap->offset + uap->len - 1; - switch (uap->advice) { + end = offset + len - 1; + switch (advice) { case POSIX_FADV_SEQUENTIAL: case POSIX_FADV_RANDOM: case POSIX_FADV_NOREUSE: @@ -4916,17 +4916,17 @@ sys_posix_fadvise(struct thread *td, str */ mtx_pool_lock(mtxpool_sleep, fp); fa = fp->f_advice; - if (fa != NULL && fa->fa_advice == uap->advice && - ((fa->fa_start <= end && fa->fa_end >= uap->offset) || + if (fa != NULL && fa->fa_advice == advice && + ((fa->fa_start <= end && fa->fa_end >= offset) || (end != OFF_MAX && fa->fa_start == end + 1) || - (fa->fa_end != OFF_MAX && fa->fa_end + 1 == uap->offset))) { - if (uap->offset < fa->fa_start) - fa->fa_start = uap->offset; + (fa->fa_end != OFF_MAX && fa->fa_end + 1 == offset))) { + if (offset < fa->fa_start) + fa->fa_start = offset; if (end > fa->fa_end) fa->fa_end = end; } else { - new->fa_advice = uap->advice; - new->fa_start = uap->offset; + new->fa_advice = advice; + new->fa_start = offset; new->fa_end = end; fp->f_advice = new; new = fa; @@ -4942,18 +4942,15 @@ sys_posix_fadvise(struct thread *td, str mtx_pool_lock(mtxpool_sleep, fp); fa = fp->f_advice; if (fa != NULL) { - if (uap->offset <= fa->fa_start && - end >= fa->fa_end) { + if (offset <= fa->fa_start && end >= fa->fa_end) { new = fa; fp->f_advice = NULL; - } else if (uap->offset <= fa->fa_start && - end >= fa->fa_start) + } else if (offset <= fa->fa_start && + end >= fa->fa_start) fa->fa_start = end + 1; - else if (uap->offset <= fa->fa_end && - end >= fa->fa_end) - fa->fa_end = uap->offset - 1; - else if (uap->offset >= fa->fa_start && - end <= fa->fa_end) { + else if (offset <= fa->fa_end && end >= fa->fa_end) + fa->fa_end = offset - 1; + else if (offset >= fa->fa_start && end <= fa->fa_end) { /* * If the "normal" region is a middle * portion of the existing @@ -4970,7 +4967,7 @@ sys_posix_fadvise(struct thread *td, str break; case POSIX_FADV_WILLNEED: case POSIX_FADV_DONTNEED: - error = VOP_ADVISE(vp, uap->offset, end, uap->advice); + error = VOP_ADVISE(vp, offset, end, advice); break; } out: @@ -4979,3 +4976,11 @@ out: free(new, M_FADVISE); return (error); } + +int +sys_posix_fadvise(struct thread *td, struct posix_fadvise_args *uap) +{ + + return (kern_posix_fadvise(td, uap->fd, uap->offset, uap->len, + uap->advice)); +} Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Mon Nov 14 15:57:03 2011 (r227501) +++ head/sys/sys/syscallsubr.h Mon Nov 14 18:00:15 2011 (r227502) @@ -153,6 +153,10 @@ int kern_openat(struct thread *td, int f int kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, int name, u_long flags); int kern_pipe(struct thread *td, int fildes[2]); +int kern_posix_fadvise(struct thread *td, int fd, off_t offset, off_t len, + int advice); +int kern_posix_fallocate(struct thread *td, int fd, off_t offset, + off_t len); int kern_preadv(struct thread *td, int fd, struct uio *auio, off_t offset); int kern_pselect(struct thread *td, int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tvp, sigset_t *uset, int abi_nfdbits); From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 18:02:42 2011 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 C12A3106566B; Mon, 14 Nov 2011 18:02:42 +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 30EE18FC15; Mon, 14 Nov 2011 18:02:35 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id pAEI2Zch058370; Mon, 14 Nov 2011 13:02:35 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.5/8.14.2/Submit) id pAEI2ZlL058369; Mon, 14 Nov 2011 13:02:35 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Mon, 14 Nov 2011 13:02:35 -0500 From: David Schultz To: Dimitry Andric Message-ID: <20111114180235.GA58284@zim.MIT.EDU> Mail-Followup-To: Dimitry Andric , Stefan Farfeleder , David Chisnall , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201111131618.pADGIm2n099696@svn.freebsd.org> <20111114082129.GA1596@mole.fafoe.narf.at> <4EC0E6C2.4010509@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EC0E6C2.4010509@FreeBSD.org> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, Stefan Farfeleder , David Chisnall , src-committers@FreeBSD.ORG Subject: Re: svn commit: r227487 - head/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: Mon, 14 Nov 2011 18:02:42 -0000 On Mon, Nov 14, 2011, Dimitry Andric wrote: > On 2011-11-14 09:21, Stefan Farfeleder wrote: > > On Sun, Nov 13, 2011 at 04:18:48PM +0000, David Chisnall wrote: > >> Author: theraven > >> Date: Sun Nov 13 16:18:48 2011 > >> New Revision: 227487 > >> URL: http://svn.freebsd.org/changeset/base/227487 > >> > >> Log: > >> The spec says that FILE must be defined in wchar.h, but it wasn't. It > >> is now. Also hide some macros in C++ mode that will break C++ > >> namespaced calls. > >> > >> Approved by: dim (mentor) > > > > I think this change is wrong. Whic spec are you referring to? C99 > > defines FILE only in 7.19.1#2 (stdio.h). In other headers FILE is used > > as parameter type for functions but that does not mean it is exported to > > user space. > > http://pubs.opengroup.org/onlinepubs/007908799/xsh/wchar.h.html It's a niggling detail, but that's an extension to the C standard, so properly speaking, it belongs in an #if __POSIX_VISIBLE >= 200809 || XSI_VISIBLE (or something like that). The formals were struct __sFILE * instead of FILE * for that reason -- see r103177. P.S. You're looking at a very old version of POSIX. Check out: http://pubs.opengroup.org/onlinepubs/9699919799/ From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 18:21:27 2011 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 9CB471065678; Mon, 14 Nov 2011 18:21:27 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 731DC8FC17; Mon, 14 Nov 2011 18:21:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAEILRH4060725; Mon, 14 Nov 2011 18:21:27 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAEILRmY060721; Mon, 14 Nov 2011 18:21:27 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201111141821.pAEILRmY060721@svn.freebsd.org> From: Robert Millan Date: Mon, 14 Nov 2011 18:21: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: r227503 - in head/sys: dev/bktr kern 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: Mon, 14 Nov 2011 18:21:27 -0000 Author: rmh Date: Mon Nov 14 18:21:27 2011 New Revision: 227503 URL: http://svn.freebsd.org/changeset/base/227503 Log: Remove a few bits of FreeBSD 2.x compatibility code. Approved by: kib (mentor) Modified: head/sys/dev/bktr/bktr_reg.h head/sys/kern/uipc_socket.c head/sys/net/if_spppfr.c Modified: head/sys/dev/bktr/bktr_reg.h ============================================================================== --- head/sys/dev/bktr/bktr_reg.h Mon Nov 14 18:00:15 2011 (r227502) +++ head/sys/dev/bktr/bktr_reg.h Mon Nov 14 18:21:27 2011 (r227503) @@ -717,10 +717,6 @@ struct bt848_card_sig { /* ioctl_cmd_t int on old versions, u_long on new versions */ /***********************************************************/ -#if (__FreeBSD__ == 2) -typedef int ioctl_cmd_t; -#endif - #if defined(__FreeBSD__) typedef u_long ioctl_cmd_t; #endif Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Mon Nov 14 18:00:15 2011 (r227502) +++ head/sys/kern/uipc_socket.c Mon Nov 14 18:21:27 2011 (r227503) @@ -2828,7 +2828,6 @@ bad: return (error); } -/* XXX; prepare mbuf for (__FreeBSD__ < 3) routines. */ int soopt_getm(struct sockopt *sopt, struct mbuf **mp) { @@ -2877,7 +2876,6 @@ soopt_getm(struct sockopt *sopt, struct return (0); } -/* XXX; copyin sopt data into mbuf chain for (__FreeBSD__ < 3) routines. */ int soopt_mcopyin(struct sockopt *sopt, struct mbuf *m) { @@ -2906,7 +2904,6 @@ soopt_mcopyin(struct sockopt *sopt, stru return (0); } -/* XXX; copyout mbuf chain data into soopt for (__FreeBSD__ < 3) routines. */ int soopt_mcopyout(struct sockopt *sopt, struct mbuf *m) { Modified: head/sys/net/if_spppfr.c ============================================================================== --- head/sys/net/if_spppfr.c Mon Nov 14 18:00:15 2011 (r227502) +++ head/sys/net/if_spppfr.c Mon Nov 14 18:21:27 2011 (r227503) @@ -25,7 +25,7 @@ #include -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 +#if defined(__FreeBSD__) #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipx.h" @@ -45,7 +45,7 @@ #include #include #include -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 +#if defined(__FreeBSD__) #include #endif #include @@ -149,7 +149,7 @@ struct arp_req { unsigned short ptarget2; } __packed; -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 && __FreeBSD_version < 501113 +#if defined(__FreeBSD__) && __FreeBSD_version < 501113 #define SPP_FMT "%s%d: " #define SPP_ARGS(ifp) (ifp)->if_name, (ifp)->if_unit #else From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 18:23:51 2011 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 5968C106566C; Mon, 14 Nov 2011 18:23:51 +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 49B308FC16; Mon, 14 Nov 2011 18:23:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAEINpKA060856; Mon, 14 Nov 2011 18:23:51 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAEINpbs060854; Mon, 14 Nov 2011 18:23:51 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201111141823.pAEINpbs060854@svn.freebsd.org> From: John Baldwin Date: Mon, 14 Nov 2011 18:23: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: r227504 - head/sys/fs/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: Mon, 14 Nov 2011 18:23:51 -0000 Author: jhb Date: Mon Nov 14 18:23:50 2011 New Revision: 227504 URL: http://svn.freebsd.org/changeset/base/227504 Log: Sync with the old NFS client: Remove an obsolete comment. Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Mon Nov 14 18:21:27 2011 (r227503) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Mon Nov 14 18:23:50 2011 (r227504) @@ -1232,8 +1232,6 @@ mountnfs(struct nfs_args *argp, struct m * * For V3, ncl_fsinfo will adjust this as necessary. Assume maximum * that we can handle until we find out otherwise. - * XXX Our "safe" limit on the client is what we can store in our - * buffer cache using signed(!) block numbers. */ if ((argp->flags & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) == 0) nmp->nm_maxfilesize = 0xffffffffLL; From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 18:40:04 2011 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 7C7341065672; Mon, 14 Nov 2011 18:40:04 +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 63DC18FC14; Mon, 14 Nov 2011 18:40:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAEIe4ke061386; Mon, 14 Nov 2011 18:40:04 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAEIe42w061383; Mon, 14 Nov 2011 18:40:04 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201111141840.pAEIe42w061383@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 14 Nov 2011 18:40: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: r227505 - head/sys/dev/ti 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, 14 Nov 2011 18:40:04 -0000 Author: yongari Date: Mon Nov 14 18:40:04 2011 New Revision: 227505 URL: http://svn.freebsd.org/changeset/base/227505 Log: It's bad idea to allocate large memory, 4KB, from stack. Pre-allocate the memory in device attach time. While I'm here remove unnecessary reassignment of error variable as it was already initialized. Also added a missing driver lock in TIIOCSETTRACE handler. Modified: head/sys/dev/ti/if_ti.c head/sys/dev/ti/if_tireg.h Modified: head/sys/dev/ti/if_ti.c ============================================================================== --- head/sys/dev/ti/if_ti.c Mon Nov 14 18:23:50 2011 (r227504) +++ head/sys/dev/ti/if_ti.c Mon Nov 14 18:40:04 2011 (r227505) @@ -497,7 +497,6 @@ ti_copy_mem(struct ti_softc *sc, uint32_ int segptr, segsize, cnt; caddr_t ptr; uint32_t origwin; - uint8_t tmparray[TI_WINLEN], tmparray2[TI_WINLEN]; int resid, segresid; int first_pass; @@ -557,51 +556,53 @@ ti_copy_mem(struct ti_softc *sc, uint32_ if (readdata) { bus_space_read_region_4(sc->ti_btag, sc->ti_bhandle, - ti_offset, (uint32_t *)tmparray, segsize >> 2); + ti_offset, (uint32_t *)sc->ti_membuf, segsize >> 2); if (useraddr) { /* * Yeah, this is a little on the kludgy * side, but at least this code is only * used for debugging. */ - ti_bcopy_swap(tmparray, tmparray2, segsize, - TI_SWAP_NTOH); + ti_bcopy_swap(sc->ti_membuf, sc->ti_membuf2, + segsize, TI_SWAP_NTOH); TI_UNLOCK(sc); if (first_pass) { - copyout(&tmparray2[segresid], ptr, + copyout(&sc->ti_membuf2[segresid], ptr, segsize - segresid); first_pass = 0; } else - copyout(tmparray2, ptr, segsize); + copyout(sc->ti_membuf2, ptr, segsize); TI_LOCK(sc); } else { if (first_pass) { - ti_bcopy_swap(tmparray, tmparray2, - segsize, TI_SWAP_NTOH); + + ti_bcopy_swap(sc->ti_membuf, + sc->ti_membuf2, segsize, + TI_SWAP_NTOH); TI_UNLOCK(sc); - bcopy(&tmparray2[segresid], ptr, + bcopy(&sc->ti_membuf2[segresid], ptr, segsize - segresid); TI_LOCK(sc); first_pass = 0; } else - ti_bcopy_swap(tmparray, ptr, segsize, - TI_SWAP_NTOH); + ti_bcopy_swap(sc->ti_membuf, ptr, + segsize, TI_SWAP_NTOH); } } else { if (useraddr) { TI_UNLOCK(sc); - copyin(ptr, tmparray2, segsize); + copyin(ptr, sc->ti_membuf2, segsize); TI_LOCK(sc); - ti_bcopy_swap(tmparray2, tmparray, segsize, - TI_SWAP_HTON); + ti_bcopy_swap(sc->ti_membuf2, sc->ti_membuf, + segsize, TI_SWAP_HTON); } else - ti_bcopy_swap(ptr, tmparray, segsize, + ti_bcopy_swap(ptr, sc->ti_membuf, segsize, TI_SWAP_HTON); bus_space_write_region_4(sc->ti_btag, sc->ti_bhandle, - ti_offset, (uint32_t *)tmparray, segsize >> 2); + ti_offset, (uint32_t *)sc->ti_membuf, segsize >> 2); } segptr += segsize; ptr += segsize; @@ -2231,6 +2232,16 @@ ti_attach(device_t dev) goto fail; } + /* Allocate working area for memory dump. */ + sc->ti_membuf = malloc(sizeof(uint8_t) * TI_WINLEN, M_DEVBUF, M_NOWAIT); + sc->ti_membuf2 = malloc(sizeof(uint8_t) * TI_WINLEN, M_DEVBUF, + M_NOWAIT); + if (sc->ti_membuf == NULL || sc->ti_membuf2 == NULL) { + device_printf(dev, "cannot allocate memory buffer\n"); + error = ENOMEM; + goto fail; + } + /* Allocate the general information block and ring buffers. */ if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* algnmnt, boundary */ @@ -2494,6 +2505,10 @@ ti_detach(device_t dev) } if (ifp) if_free(ifp); + if (sc->ti_membuf) + free(sc->ti_membuf, M_DEVBUF); + if (sc->ti_membuf2) + free(sc->ti_membuf2, M_DEVBUF); mtx_destroy(&sc->ti_mtx); @@ -3538,9 +3553,6 @@ ti_ioctl2(struct cdev *dev, u_long cmd, params->ti_tx_buf_ratio = sc->ti_tx_buf_ratio; params->param_mask = TI_PARAM_ALL; TI_UNLOCK(sc); - - error = 0; - break; } case TIIOCSETPARAMS: @@ -3585,9 +3597,6 @@ ti_ioctl2(struct cdev *dev, u_long cmd, sc->ti_tx_buf_ratio); } TI_UNLOCK(sc); - - error = 0; - break; } case TIIOCSETTRACE: { @@ -3600,10 +3609,9 @@ ti_ioctl2(struct cdev *dev, u_long cmd, * this register to 0 should have the effect of disabling * tracing. */ + TI_LOCK(sc); CSR_WRITE_4(sc, TI_GCR_NIC_TRACING, trace_type); - - error = 0; - + TI_UNLOCK(sc); break; } case TIIOCGETTRACE: { @@ -3637,7 +3645,6 @@ ti_ioctl2(struct cdev *dev, u_long cmd, } else trace_buf->fill_len = 0; TI_UNLOCK(sc); - break; } @@ -3659,7 +3666,6 @@ ti_ioctl2(struct cdev *dev, u_long cmd, * you're interested in every ioctl, you'll only be * able to debug one board at a time. */ - error = 0; break; case ALT_READ_TG_MEM: case ALT_WRITE_TG_MEM: @@ -3715,7 +3721,6 @@ ti_ioctl2(struct cdev *dev, u_long cmd, error = EINVAL; } TI_UNLOCK(sc); - break; } case ALT_READ_TG_REG: @@ -3751,7 +3756,6 @@ ti_ioctl2(struct cdev *dev, u_long cmd, regs->addr, &tmpval, 1); } TI_UNLOCK(sc); - break; } default: Modified: head/sys/dev/ti/if_tireg.h ============================================================================== --- head/sys/dev/ti/if_tireg.h Mon Nov 14 18:23:50 2011 (r227504) +++ head/sys/dev/ti/if_tireg.h Mon Nov 14 18:40:04 2011 (r227505) @@ -1015,6 +1015,8 @@ struct ti_softc { struct callout ti_watchdog; int ti_timer; ti_flag_vals ti_flags; + uint8_t *ti_membuf; + uint8_t *ti_membuf2; struct cdev *dev; }; From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 18:51:39 2011 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 7587A1065672; Mon, 14 Nov 2011 18:51:39 +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 648508FC0A; Mon, 14 Nov 2011 18:51:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAEIpdhd061850; Mon, 14 Nov 2011 18:51:39 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAEIpdWE061849; Mon, 14 Nov 2011 18:51:39 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201111141851.pAEIpdWE061849@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 14 Nov 2011 18:51: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: r227506 - head/sys/boot/fdt/dts 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, 14 Nov 2011 18:51:39 -0000 Author: marcel Date: Mon Nov 14 18:51:39 2011 New Revision: 227506 URL: http://svn.freebsd.org/changeset/base/227506 Log: Add DTS for the Freescale P3041DS. Added: head/sys/boot/fdt/dts/p3041ds.dts (contents, props changed) Added: head/sys/boot/fdt/dts/p3041ds.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/p3041ds.dts Mon Nov 14 18:51:39 2011 (r227506) @@ -0,0 +1,753 @@ +/* + * P3041DS Device Tree Source + * + * Copyright 2010-2011 Freescale Semiconductor Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Freescale Semiconductor nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * + * ALTERNATIVELY, this software may be distributed under the terms of the + * GNU General Public License ("GPL") as published by the Free Software + * Foundation, either version 2 of that License or (at your option) any + * later version. + * + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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$ */ + +/dts-v1/; + +/ { + model = "fsl,P3041DS"; + compatible = "fsl,P3041DS"; + #address-cells = <2>; + #size-cells = <2>; + interrupt-parent = <&mpic>; + + aliases { + ccsr = &soc; + + serial0 = &serial0; + serial1 = &serial1; + serial2 = &serial2; + serial3 = &serial3; + pci0 = &pci0; + pci1 = &pci1; + pci2 = &pci2; + pci3 = &pci3; + usb0 = &usb0; + usb1 = &usb1; + dma0 = &dma0; + dma1 = &dma1; + sdhc = &sdhc; + msi0 = &msi0; + msi1 = &msi1; + msi2 = &msi2; + + crypto = &crypto; + sec_jr0 = &sec_jr0; + sec_jr1 = &sec_jr1; + sec_jr2 = &sec_jr2; + sec_jr3 = &sec_jr3; + rtic_a = &rtic_a; + rtic_b = &rtic_b; + rtic_c = &rtic_c; + rtic_d = &rtic_d; + sec_mon = &sec_mon; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: PowerPC,e500mc@0 { + device_type = "cpu"; + reg = <0>; + next-level-cache = <&L2_0>; + L2_0: l2-cache { + next-level-cache = <&cpc>; + }; + }; + cpu1: PowerPC,e500mc@1 { + device_type = "cpu"; + reg = <1>; + next-level-cache = <&L2_1>; + L2_1: l2-cache { + next-level-cache = <&cpc>; + }; + }; + cpu2: PowerPC,e500mc@2 { + device_type = "cpu"; + reg = <2>; + next-level-cache = <&L2_2>; + L2_2: l2-cache { + next-level-cache = <&cpc>; + }; + }; + cpu3: PowerPC,e500mc@3 { + device_type = "cpu"; + reg = <3>; + next-level-cache = <&L2_3>; + L2_3: l2-cache { + next-level-cache = <&cpc>; + }; + }; + }; + + memory { + device_type = "memory"; + }; + + soc: soc@ffe000000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc"; + compatible = "simple-bus"; + ranges = <0x00000000 0xf 0xfe000000 0x1000000>; + reg = <0xf 0xfe000000 0 0x00001000>; + + soc-sram-error { + compatible = "fsl,soc-sram-error"; + interrupts = <16 2 1 29>; + }; + + corenet-law@0 { + compatible = "fsl,corenet-law"; + reg = <0x0 0x1000>; + fsl,num-laws = <32>; + }; + + memory-controller@8000 { + compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller"; + reg = <0x8000 0x1000>; + interrupts = <16 2 1 23>; + }; + + cpc: l3-cache-controller@10000 { + compatible = "fsl,p3041-l3-cache-controller", "fsl,p4080-l3-cache-controller", "cache"; + reg = <0x10000 0x1000>; + interrupts = <16 2 1 27>; + }; + + corenet-cf@18000 { + compatible = "fsl,corenet-cf"; + reg = <0x18000 0x1000>; + interrupts = <16 2 1 31>; + fsl,ccf-num-csdids = <32>; + fsl,ccf-num-snoopids = <32>; + }; + + iommu@20000 { + compatible = "fsl,pamu-v1.0", "fsl,pamu"; + reg = <0x20000 0x4000>; + interrupts = < + 24 2 0 0 + 16 2 1 30>; + }; + + mpic: pic@40000 { + clock-frequency = <0>; + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <4>; + reg = <0x40000 0x40000>; + compatible = "fsl,mpic", "chrp,open-pic"; + device_type = "open-pic"; + }; + + msi0: msi@41600 { + compatible = "fsl,mpic-msi"; + reg = <0x41600 0x200>; + msi-available-ranges = <0 0x100>; + interrupts = < + 0xe0 0 0 0 + 0xe1 0 0 0 + 0xe2 0 0 0 + 0xe3 0 0 0 + 0xe4 0 0 0 + 0xe5 0 0 0 + 0xe6 0 0 0 + 0xe7 0 0 0>; + }; + + msi1: msi@41800 { + compatible = "fsl,mpic-msi"; + reg = <0x41800 0x200>; + msi-available-ranges = <0 0x100>; + interrupts = < + 0xe8 0 0 0 + 0xe9 0 0 0 + 0xea 0 0 0 + 0xeb 0 0 0 + 0xec 0 0 0 + 0xed 0 0 0 + 0xee 0 0 0 + 0xef 0 0 0>; + }; + + msi2: msi@41a00 { + compatible = "fsl,mpic-msi"; + reg = <0x41a00 0x200>; + msi-available-ranges = <0 0x100>; + interrupts = < + 0xf0 0 0 0 + 0xf1 0 0 0 + 0xf2 0 0 0 + 0xf3 0 0 0 + 0xf4 0 0 0 + 0xf5 0 0 0 + 0xf6 0 0 0 + 0xf7 0 0 0>; + }; + + guts: global-utilities@e0000 { + compatible = "fsl,qoriq-device-config-1.0"; + reg = <0xe0000 0xe00>; + fsl,has-rstcr; + #sleep-cells = <1>; + fsl,liodn-bits = <12>; + }; + + pins: global-utilities@e0e00 { + compatible = "fsl,qoriq-pin-control-1.0"; + reg = <0xe0e00 0x200>; + #sleep-cells = <2>; + }; + + clockgen: global-utilities@e1000 { + compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0"; + reg = <0xe1000 0x1000>; + clock-frequency = <0>; + }; + + rcpm: global-utilities@e2000 { + compatible = "fsl,qoriq-rcpm-1.0"; + reg = <0xe2000 0x1000>; + #sleep-cells = <1>; + }; + + sfp: sfp@e8000 { + compatible = "fsl,p3041-sfp", "fsl,qoriq-sfp-1.0"; + reg = <0xe8000 0x1000>; + }; + + serdes: serdes@ea000 { + compatible = "fsl,p3041-serdes"; + reg = <0xea000 0x1000>; + }; + + dma0: dma@100300 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,p3041-dma", "fsl,eloplus-dma"; + reg = <0x100300 0x4>; + ranges = <0x0 0x100100 0x200>; + cell-index = <0>; + dma-channel@0 { + compatible = "fsl,p3041-dma-channel", + "fsl,eloplus-dma-channel"; + reg = <0x0 0x80>; + cell-index = <0>; + interrupts = <28 2 0 0>; + }; + dma-channel@80 { + compatible = "fsl,p3041-dma-channel", + "fsl,eloplus-dma-channel"; + reg = <0x80 0x80>; + cell-index = <1>; + interrupts = <29 2 0 0>; + }; + dma-channel@100 { + compatible = "fsl,p3041-dma-channel", + "fsl,eloplus-dma-channel"; + reg = <0x100 0x80>; + cell-index = <2>; + interrupts = <30 2 0 0>; + }; + dma-channel@180 { + compatible = "fsl,p3041-dma-channel", + "fsl,eloplus-dma-channel"; + reg = <0x180 0x80>; + cell-index = <3>; + interrupts = <31 2 0 0>; + }; + }; + + dma1: dma@101300 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,p3041-dma", "fsl,eloplus-dma"; + reg = <0x101300 0x4>; + ranges = <0x0 0x101100 0x200>; + cell-index = <1>; + dma-channel@0 { + compatible = "fsl,p3041-dma-channel", + "fsl,eloplus-dma-channel"; + reg = <0x0 0x80>; + cell-index = <0>; + interrupts = <32 2 0 0>; + }; + dma-channel@80 { + compatible = "fsl,p3041-dma-channel", + "fsl,eloplus-dma-channel"; + reg = <0x80 0x80>; + cell-index = <1>; + interrupts = <33 2 0 0>; + }; + dma-channel@100 { + compatible = "fsl,p3041-dma-channel", + "fsl,eloplus-dma-channel"; + reg = <0x100 0x80>; + cell-index = <2>; + interrupts = <34 2 0 0>; + }; + dma-channel@180 { + compatible = "fsl,p3041-dma-channel", + "fsl,eloplus-dma-channel"; + reg = <0x180 0x80>; + cell-index = <3>; + interrupts = <35 2 0 0>; + }; + }; + + spi@110000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,p3041-espi", "fsl,mpc8536-espi"; + reg = <0x110000 0x1000>; + interrupts = <53 0x2 0 0>; + fsl,espi-num-chipselects = <4>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spansion,s25sl12801"; + reg = <0>; + spi-max-frequency = <40000000>; /* input clock */ + partition@u-boot { + label = "u-boot"; + reg = <0x00000000 0x00100000>; + read-only; + }; + partition@kernel { + label = "kernel"; + reg = <0x00100000 0x00500000>; + read-only; + }; + partition@dtb { + label = "dtb"; + reg = <0x00600000 0x00100000>; + read-only; + }; + partition@fs { + label = "file system"; + reg = <0x00700000 0x00900000>; + }; + }; + }; + + sdhc: sdhc@114000 { + compatible = "fsl,p3041-esdhc", "fsl,esdhc"; + reg = <0x114000 0x1000>; + interrupts = <48 2 0 0>; + sdhci,auto-cmd12; + clock-frequency = <0>; + }; + + i2c@118000 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <0>; + compatible = "fsl-i2c"; + reg = <0x118000 0x100>; + interrupts = <38 2 0 0>; + dfsrr; + }; + + i2c@118100 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <1>; + compatible = "fsl-i2c"; + reg = <0x118100 0x100>; + interrupts = <38 2 0 0>; + dfsrr; + eeprom@51 { + compatible = "at24,24c256"; + reg = <0x51>; + }; + eeprom@52 { + compatible = "at24,24c256"; + reg = <0x52>; + }; + }; + + i2c@119000 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <2>; + compatible = "fsl-i2c"; + reg = <0x119000 0x100>; + interrupts = <39 2 0 0>; + dfsrr; + }; + + i2c@119100 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <3>; + compatible = "fsl-i2c"; + reg = <0x119100 0x100>; + interrupts = <39 2 0 0>; + dfsrr; + rtc@68 { + compatible = "dallas,ds3232"; + reg = <0x68>; + interrupts = <0x1 0x1 0 0>; + }; + }; + + serial0: serial@11c500 { + cell-index = <0>; + device_type = "serial"; + compatible = "ns16550"; + reg = <0x11c500 0x100>; + clock-frequency = <0>; + interrupts = <36 2 0 0>; + }; + + serial1: serial@11c600 { + cell-index = <1>; + device_type = "serial"; + compatible = "ns16550"; + reg = <0x11c600 0x100>; + clock-frequency = <0>; + interrupts = <36 2 0 0>; + }; + + serial2: serial@11d500 { + cell-index = <2>; + device_type = "serial"; + compatible = "ns16550"; + reg = <0x11d500 0x100>; + clock-frequency = <0>; + interrupts = <37 2 0 0>; + }; + + serial3: serial@11d600 { + cell-index = <3>; + device_type = "serial"; + compatible = "ns16550"; + reg = <0x11d600 0x100>; + clock-frequency = <0>; + interrupts = <37 2 0 0>; + }; + + gpio0: gpio@130000 { + compatible = "fsl,p3041-gpio", "fsl,qoriq-gpio"; + reg = <0x130000 0x1000>; + interrupts = <55 2 0 0>; + #gpio-cells = <2>; + gpio-controller; + }; + + usb0: usb@210000 { + compatible = "fsl,p3041-usb2-mph", + "fsl,mpc85xx-usb2-mph", "fsl-usb2-mph"; + reg = <0x210000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <44 0x2 0 0>; + phy_type = "utmi"; + port0; + }; + + usb1: usb@211000 { + compatible = "fsl,p3041-usb2-dr", + "fsl,mpc85xx-usb2-dr", "fsl-usb2-dr"; + reg = <0x211000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <45 0x2 0 0>; + dr_mode = "host"; + phy_type = "utmi"; + }; + + sata@220000 { + compatible = "fsl,p3041-sata", "fsl,pq-sata-v2"; + reg = <0x220000 0x1000>; + interrupts = <68 0x2 0 0>; + }; + + sata@221000 { + compatible = "fsl,p3041-sata", "fsl,pq-sata-v2"; + reg = <0x221000 0x1000>; + interrupts = <69 0x2 0 0>; + }; + + crypto: crypto@300000 { + compatible = "fsl,sec-v4.2", "fsl,sec-v4.0"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x300000 0x10000>; + ranges = <0 0x300000 0x10000>; + interrupts = <92 2 0 0>; + + sec_jr0: jr@1000 { + compatible = "fsl,sec-v4.2-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x1000 0x1000>; + interrupts = <88 2 0 0>; + }; + + sec_jr1: jr@2000 { + compatible = "fsl,sec-v4.2-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x2000 0x1000>; + interrupts = <89 2 0 0>; + }; + + sec_jr2: jr@3000 { + compatible = "fsl,sec-v4.2-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x3000 0x1000>; + interrupts = <90 2 0 0>; + }; + + sec_jr3: jr@4000 { + compatible = "fsl,sec-v4.2-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x4000 0x1000>; + interrupts = <91 2 0 0>; + }; + + rtic@6000 { + compatible = "fsl,sec-v4.2-rtic", + "fsl,sec-v4.0-rtic"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x6000 0x100>; + ranges = <0x0 0x6100 0xe00>; + + rtic_a: rtic-a@0 { + compatible = "fsl,sec-v4.2-rtic-memory", + "fsl,sec-v4.0-rtic-memory"; + reg = <0x00 0x20 0x100 0x80>; + }; + + rtic_b: rtic-b@20 { + compatible = "fsl,sec-v4.2-rtic-memory", + "fsl,sec-v4.0-rtic-memory"; + reg = <0x20 0x20 0x200 0x80>; + }; + + rtic_c: rtic-c@40 { + compatible = "fsl,sec-v4.2-rtic-memory", + "fsl,sec-v4.0-rtic-memory"; + reg = <0x40 0x20 0x300 0x80>; + }; + + rtic_d: rtic-d@60 { + compatible = "fsl,sec-v4.2-rtic-memory", + "fsl,sec-v4.0-rtic-memory"; + reg = <0x60 0x20 0x500 0x80>; + }; + }; + }; + + sec_mon: sec_mon@314000 { + compatible = "fsl,sec-v4.2-mon", "fsl,sec-v4.0-mon"; + reg = <0x314000 0x1000>; + interrupts = <93 2 0 0>; + }; + }; + + localbus@ffe124000 { + compatible = "fsl,p3041-elbc", "fsl,elbc", "simple-bus"; + reg = <0xf 0xfe124000 0 0x1000>; + interrupts = <25 2 0 0>; + #address-cells = <2>; + #size-cells = <1>; + + ranges = <0 0 0xf 0xe8000000 0x08000000 + 3 0 0xf 0xffdf0000 0x00008000>; + + flash@0,0 { + compatible = "cfi-flash"; + reg = <0 0 0x08000000>; + bank-width = <2>; + device-width = <2>; + }; + + board-control@3,0 { + compatible = "fsl,p3041ds-pixis"; + reg = <3 0 0x20>; + }; + }; + + pci0: pcie@ffe200000 { + compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2"; + device_type = "pci"; + #size-cells = <2>; + #address-cells = <3>; + reg = <0xf 0xfe200000 0 0x1000>; + bus-range = <0x0 0xff>; + ranges = <0x02000000 0 0xe0000000 0xc 0x00000000 0x0 0x20000000 + 0x01000000 0 0x00000000 0xf 0xf8000000 0x0 0x00010000>; + clock-frequency = <0x1fca055>; + fsl,msi = <&msi0>; + interrupts = <16 2 1 15>; + pcie@0 { + reg = <0 0 0 0 0>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + interrupts = <16 2 1 15>; + interrupt-map-mask = <0xf800 0 0 7>; + interrupt-map = < + /* IDSEL 0x0 */ + 0000 0 0 1 &mpic 40 1 0 0 + 0000 0 0 2 &mpic 1 1 0 0 + 0000 0 0 3 &mpic 2 1 0 0 + 0000 0 0 4 &mpic 3 1 0 0 + >; + ranges = <0x02000000 0 0xe0000000 + 0x02000000 0 0xe0000000 + 0 0x20000000 + + 0x01000000 0 0x00000000 + 0x01000000 0 0x00000000 + 0 0x00010000>; + }; + }; + + pci1: pcie@ffe201000 { + compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2"; + device_type = "pci"; + #size-cells = <2>; + #address-cells = <3>; + reg = <0xf 0xfe201000 0 0x1000>; + bus-range = <0 0xff>; + ranges = <0x02000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000 + 0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000>; + clock-frequency = <0x1fca055>; + fsl,msi = <&msi1>; + interrupts = <16 2 1 14>; + pcie@0 { + reg = <0 0 0 0 0>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + interrupts = <16 2 1 14>; + interrupt-map-mask = <0xf800 0 0 7>; + interrupt-map = < + /* IDSEL 0x0 */ + 0000 0 0 1 &mpic 41 1 0 0 + 0000 0 0 2 &mpic 5 1 0 0 + 0000 0 0 3 &mpic 6 1 0 0 + 0000 0 0 4 &mpic 7 1 0 0 + >; + ranges = <0x02000000 0 0xe0000000 + 0x02000000 0 0xe0000000 + 0 0x20000000 + + 0x01000000 0 0x00000000 + 0x01000000 0 0x00000000 + 0 0x00010000>; + }; + }; + + pci2: pcie@ffe202000 { + compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2"; + device_type = "pci"; + #size-cells = <2>; + #address-cells = <3>; + reg = <0xf 0xfe202000 0 0x1000>; + bus-range = <0x0 0xff>; + ranges = <0x02000000 0 0xe0000000 0xc 0x40000000 0 0x20000000 + 0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>; + clock-frequency = <0x1fca055>; + fsl,msi = <&msi2>; + interrupts = <16 2 1 13>; + pcie@0 { + reg = <0 0 0 0 0>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + interrupts = <16 2 1 13>; + interrupt-map-mask = <0xf800 0 0 7>; + interrupt-map = < + /* IDSEL 0x0 */ + 0000 0 0 1 &mpic 42 1 0 0 + 0000 0 0 2 &mpic 9 1 0 0 + 0000 0 0 3 &mpic 10 1 0 0 + 0000 0 0 4 &mpic 11 1 0 0 + >; + ranges = <0x02000000 0 0xe0000000 + 0x02000000 0 0xe0000000 + 0 0x20000000 + + 0x01000000 0 0x00000000 + 0x01000000 0 0x00000000 + 0 0x00010000>; + }; + }; + + pci3: pcie@ffe203000 { + compatible = "fsl,p3041-pcie", "fsl,qoriq-pcie-v2.2"; + device_type = "pci"; + #size-cells = <2>; + #address-cells = <3>; + reg = <0xf 0xfe203000 0 0x1000>; + bus-range = <0x0 0xff>; + ranges = <0x02000000 0 0xe0000000 0xc 0x60000000 0 0x20000000 + 0x01000000 0 0x00000000 0xf 0xf8030000 0 0x00010000>; + clock-frequency = <0x1fca055>; + fsl,msi = <&msi2>; + interrupts = <16 2 1 12>; + pcie@0 { + reg = <0 0 0 0 0>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + interrupts = <16 2 1 12>; + interrupt-map-mask = <0xf800 0 0 7>; + interrupt-map = < + /* IDSEL 0x0 */ + 0000 0 0 1 &mpic 43 1 0 0 + 0000 0 0 2 &mpic 0 1 0 0 + 0000 0 0 3 &mpic 4 1 0 0 + 0000 0 0 4 &mpic 8 1 0 0 + >; + ranges = <0x02000000 0 0xe0000000 + 0x02000000 0 0xe0000000 + 0 0x20000000 + + 0x01000000 0 0x00000000 + 0x01000000 0 0x00000000 + 0 0x00010000>; + }; + }; +}; From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 18:52:07 2011 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 B125B106564A; Mon, 14 Nov 2011 18:52:07 +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 966698FC12; Mon, 14 Nov 2011 18:52:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAEIq75j061905; Mon, 14 Nov 2011 18:52:07 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAEIq71t061900; Mon, 14 Nov 2011 18:52:07 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201111141852.pAEIq71t061900@svn.freebsd.org> From: John Baldwin Date: Mon, 14 Nov 2011 18:52: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: r227507 - in head: sbin/mount_nfs sys/fs/nfsclient 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: Mon, 14 Nov 2011 18:52:07 -0000 Author: jhb Date: Mon Nov 14 18:52:07 2011 New Revision: 227507 URL: http://svn.freebsd.org/changeset/base/227507 Log: Finish making 'wcommitsize' an NFS client mount option. Reviewed by: rmacklem MFC after: 1 week Modified: head/sbin/mount_nfs/mount_nfs.8 head/sbin/mount_nfs/mount_nfs.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/nfsclient/nfs_vfsops.c Modified: head/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- head/sbin/mount_nfs/mount_nfs.8 Mon Nov 14 18:51:39 2011 (r227506) +++ head/sbin/mount_nfs/mount_nfs.8 Mon Nov 14 18:52:07 2011 (r227507) @@ -318,6 +318,10 @@ tune the timeout interval.) .It Cm udp Use UDP transport. +.It Cm wcommitsize Ns = Ns Aq Ar value +Set the maximum pending write commit size to the specified value. +This determines the maximum amount of pending write data that the NFS +client is willing to cache for each file. .It Cm wsize Ns = Ns Aq Ar value Set the write data size to the specified value. Ditto the comments w.r.t.\& the Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Mon Nov 14 18:51:39 2011 (r227506) +++ head/sbin/mount_nfs/mount_nfs.c Mon Nov 14 18:52:07 2011 (r227507) @@ -612,6 +612,13 @@ fallback_mount(struct iovec *iov, int io } args.flags |= NFSMNT_ACDIRMAX; } + if (findopt(iov, iovlen, "wcommitsize", &opt, NULL) == 0) { + ret = sscanf(opt, "%d", &args.wcommitsize); + if (ret != 1 || args.wcommitsize < 0) { + errx(1, "illegal wcommitsize: %s", opt); + } + args.flags |= NFSMNT_WCOMMITSIZE; + } if (findopt(iov, iovlen, "deadthresh", &opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.deadthresh); if (ret != 1 || args.deadthresh <= 0) { Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Mon Nov 14 18:51:39 2011 (r227506) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Mon Nov 14 18:52:07 2011 (r227507) @@ -715,7 +715,7 @@ static const char *nfs_opts[] = { "from" "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "resvport", "readahead", "hostname", "timeout", "addr", "fh", "nfsv3", "sec", "principal", "nfsv4", "gssname", "allgssname", "dirpath", - "negnametimeo", "nocto", + "negnametimeo", "nocto", "wcommitsize", NULL }; /* @@ -949,6 +949,15 @@ nfs_mount(struct mount *mp) } args.flags |= NFSMNT_ACDIRMAX; } + if (vfs_getopt(mp->mnt_optnew, "wcommitsize", (void **)&opt, NULL) == 0) { + ret = sscanf(opt, "%d", &args.wcommitsize); + if (ret != 1 || args.wcommitsize < 0) { + vfs_mount_error(mp, "illegal wcommitsize: %s", opt); + error = EINVAL; + goto out; + } + args.flags |= NFSMNT_WCOMMITSIZE; + } if (vfs_getopt(mp->mnt_optnew, "timeout", (void **)&opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.timeo); if (ret != 1 || args.timeo <= 0) { Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Mon Nov 14 18:51:39 2011 (r227506) +++ head/sys/nfsclient/nfs_vfsops.c Mon Nov 14 18:52:07 2011 (r227507) @@ -787,7 +787,7 @@ static const char *nfs_opts[] = { "from" "readahead", "readdirsize", "soft", "hard", "mntudp", "tcp", "udp", "wsize", "rsize", "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "deadthresh", "hostname", "timeout", "addr", "fh", "nfsv3", - "sec", "maxgroups", "principal", "negnametimeo", "nocto", + "sec", "maxgroups", "principal", "negnametimeo", "nocto", "wcommitsize", NULL }; /* @@ -1019,6 +1019,15 @@ nfs_mount(struct mount *mp) } args.flags |= NFSMNT_ACDIRMAX; } + if (vfs_getopt(mp->mnt_optnew, "wcommitsize", (void **)&opt, NULL) == 0) { + ret = sscanf(opt, "%d", &args.wcommitsize); + if (ret != 1 || args.wcommitsize < 0) { + vfs_mount_error(mp, "illegal wcommitsize: %s", opt); + error = EINVAL; + goto out; + } + args.flags |= NFSMNT_WCOMMITSIZE; + } if (vfs_getopt(mp->mnt_optnew, "deadthresh", (void **)&opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.deadthresh); if (ret != 1 || args.deadthresh <= 0) { From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 19:04:24 2011 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 29CEC106564A; Mon, 14 Nov 2011 19:04:24 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id A0BAC8FC1A; Mon, 14 Nov 2011 19:04:23 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cwma5-0-0-cust875.7-3.cable.virginmedia.com [86.11.39.108]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id pAEJ4Ls5033696 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 14 Nov 2011 19:04:22 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20111114180235.GA58284@zim.MIT.EDU> Date: Mon, 14 Nov 2011 19:04:16 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <3B8C1412-E18D-47E3-A09D-4847DD078963@FreeBSD.org> References: <201111131618.pADGIm2n099696@svn.freebsd.org> <20111114082129.GA1596@mole.fafoe.narf.at> <4EC0E6C2.4010509@FreeBSD.org> <20111114180235.GA58284@zim.MIT.EDU> To: David Schultz X-Mailer: Apple Mail (2.1251.1) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Stefan Farfeleder , Dimitry Andric , src-committers@FreeBSD.org Subject: Re: svn commit: r227487 - head/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: Mon, 14 Nov 2011 19:04:24 -0000 On 14 Nov 2011, at 18:02, David Schultz wrote: > On Mon, Nov 14, 2011, Dimitry Andric wrote: >> On 2011-11-14 09:21, Stefan Farfeleder wrote: >>> On Sun, Nov 13, 2011 at 04:18:48PM +0000, David Chisnall wrote: >>>> Author: theraven >>>> Date: Sun Nov 13 16:18:48 2011 >>>> New Revision: 227487 >>>> URL: http://svn.freebsd.org/changeset/base/227487 >>>>=20 >>>> Log: >>>> The spec says that FILE must be defined in wchar.h, but it wasn't. = It >>>> is now. Also hide some macros in C++ mode that will break C++ >>>> namespaced calls. >>>>=20 >>>> Approved by: dim (mentor) >>>=20 >>> I think this change is wrong. Whic spec are you referring to? C99 >>> defines FILE only in 7.19.1#2 (stdio.h). In other headers FILE is = used >>> as parameter type for functions but that does not mean it is = exported to >>> user space. >>=20 >> http://pubs.opengroup.org/onlinepubs/007908799/xsh/wchar.h.html >=20 > It's a niggling detail, but that's an extension to the C standard, > so properly speaking, it belongs in an > #if __POSIX_VISIBLE >=3D 200809 || XSI_VISIBLE > (or something like that). The formals were struct __sFILE * > instead of FILE * for that reason -- see r103177. >=20 > P.S. You're looking at a very old version of POSIX. Check out: > http://pubs.opengroup.org/onlinepubs/9699919799/ The C99 and C1x specifications both seem to require stdio.h to be = included before wchar.h. I think this therefore places including = wchar.h and not stdio.h in the category of undefined (or, at least, not = defined) behaviour, so we are free to do anything in this case. I would = say that accepting the code and working as the programmer expected is = the least harmful thing to do here. This is what Darwin libc does = (actually, it #includes stdio.h in wchar.h). =20 David= From owner-svn-src-head@FreeBSD.ORG Mon Nov 14 19:06:29 2011 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 1B6A81065674; Mon, 14 Nov 2011 19:06:29 +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 0A6EB8FC16; Mon, 14 Nov 2011 19:06:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAEJ6TWv062415; Mon, 14 Nov 2011 19:06:29 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAEJ6T1S062413; Mon, 14 Nov 2011 19:06:29 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201111141906.pAEJ6T1S062413@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 14 Nov 2011 19:06: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/pla