From owner-svn-src-head@freebsd.org Tue Sep 20 05:59:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AEE2BE1114; Tue, 20 Sep 2016 05:59:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 3626395F; Tue, 20 Sep 2016 05:59:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id BD5331A37E0; Tue, 20 Sep 2016 15:59:34 +1000 (AEST) Date: Tue, 20 Sep 2016 15:59:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin cc: "Ngie Cooper (yaneurabeya)" , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305998 - in head/usr.bin: cmp indent tr In-Reply-To: <8333248.dV1m5xp1ki@ralph.baldwin.cx> Message-ID: <20160920154629.K1129@besplex.bde.org> References: <201609192043.u8JKh3jv040006@repo.freebsd.org> <8333248.dV1m5xp1ki@ralph.baldwin.cx> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=nlC_4_pT8q9DhB4Ho9EA:9 a=6I5d2MoRAAAA:8 a=Hr4q2quiW_qvfm4nSNkA:9 a=45ClL6m2LaAA:10 a=IjZwj45LgO3ly-622nXo:22 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 05:59:38 -0000 On Mon, 19 Sep 2016, John Baldwin wrote: > On Monday, September 19, 2016 01:45:01 PM Ngie Cooper wrote: >> >>> On Sep 19, 2016, at 1:43 PM, Conrad E. Meyer wrote: >>> Log: >>> Move sys/capsicum.h includes after types.h or param.h >>> >>> This is not actually documented or even implied in style(9). Make the= change >>> to match convention. Someone should document this convention in style= (9). >>> >>> Reported by:=09jhb >>> Sponsored by:=09EMC Dell Isilon >> >> Uh=E2=80=A6 yes it clearly states it in style(9). From https://www.freeb= sd.org/cgi/man.cgi?query=3Dstyle&sektion=3D9 : >> Kernel include files (i.e. sys/*.h) come first; normally, include >> OR , but not both. includ= es >> , and it is okay to depend on that. > > It doesn't actually say that types.h/param.h has to come before other sys= /*.h > headers though. Normally sys/foo.h requires sys/types.h to compile hence= the > rule, but sys/capsicum.h gets around this by a nested include of sys/para= m.h > (which is itself probably dubious). This and other nested includes make sys/capsicum.h of rmrf quality. It is now not so normal to require sys/types or sys/param.h first, since too many headers have been broken using nested includes. Only a few have correct fixes for pollution. Almost none have documentation for either their non-pollution or pollution, except possibly with directives like -D_POSIX_SOURCE (restrict to ~1988 POSIX.1) where the standard has such documentation and the standard is supported. E.g., cap_enter(2) only mentions a couple of symbols and no namespaces. Its SYNOPSIS uses the undocumented symbol u_int, and doesn't mention sys/types.h or _BSD_VISIBLE, so by knowing undocumented things we can tell that its #include of is either incomplete or that it has namespace pollution including at least u_int and probably all the undocumented symbols in sys/types.h, but that is just the start of the pollution. > I do think we should explicitly add a note to style.9 though to say that > types.h|param.h comes first. I use the following: X Index: style.9 X =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D X RCS file: /home/ncvs/src/share/man/man9/style.9,v X retrieving revision 1.110 X diff -u -2 -r1.110 style.9 X --- style.9=093 Jul 2004 18:29:24 -0000=091.110 X +++ style.9=097 Jul 2004 11:47:22 -0000 X @@ -90,17 +130,22 @@ X .Ed X .Pp X -Leave another blank line before the header files. X +Leave one blank line before the header files. X .Pp X -Kernel include files (i.e.\& X +Kernel include files (i.e.,\& X .Pa sys/*.h ) X -come first; normally, include X -.In sys/types.h X -OR X -.In sys/param.h , X -but not both. X +come first; normally, X .In sys/types.h X +or X +.In sys/param.h X +will be needed before any others. X +.In sys/param.h X includes X +.In sys/types.h . X +Do not include both. X +Many headers, including X +.In sys/types.h , X +include X .In sys/cdefs.h , X -and it is okay to depend on that. X +and it is OK to depend on that. X .Bd -literal X #include =09/* Non-local includes in angle brackets. */ X @@ -116,12 +161,11 @@ X .Ed X .Pp X -Do not use files in X +Do not include files in X .Pa /usr/include X for files in the kernel. X .Pp X -Leave a blank line before the next group, the X -.Pa /usr/include X -files, X -which should be sorted alphabetically by name. X +Leave a blank line before the next group (XXX nah, all groups), X +the <*.h> include files. X +Sort the <*.h> include files (XXX nah, all groups) alphabetically. X .Bd -literal X #include X @@ -138,5 +182,6 @@ X .Ed X .Pp X -Leave another blank line before the user include files. X +Leave another blank line before the local include files. X +XXX nah, leave it before all groups. X .Bd -literal X #include "pathnames.h"=09=09/* Local includes in double quotes. */ Bruce From owner-svn-src-head@freebsd.org Tue Sep 20 06:53:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CC94BE22FB; Tue, 20 Sep 2016 06:53:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id E7D0A6C9; Tue, 20 Sep 2016 06:53:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 18576D47165; Tue, 20 Sep 2016 16:53:19 +1000 (AEST) Date: Tue, 20 Sep 2016 16:53:19 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Edward Tomasz Napierala cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r306012 - head/etc/autofs In-Reply-To: <201609200454.u8K4s0RZ025158@repo.freebsd.org> Message-ID: <20160920164312.W1333@besplex.bde.org> References: <201609200454.u8K4s0RZ025158@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=CoZCCSMD c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=IN0Lh4eCIHCjGjmA9EwA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2016 06:53:30 -0000 On Tue, 20 Sep 2016, Edward Tomasz Napierala wrote: > Log: > Fix -media to not mount ufs with "async"; it doesn't make sense when > there is softupdates. It does make sense when there isn't soft updates. With soft updates, it is silently ignored. However, I don't like changing the default. async gives less robustness and noatime breaks POSIX conformance. I use async a lot, but rarely for removable backup media except for the first use, and noatime almost always, and type a lot of mount commands, mostly using shell history to retrieve nearly-correct options and then edit just to toggle ro/rw and async/noasync flags. Bruce