Re: svn commit: r364637 - head/sys/kern
On 6 Sep 2020, at 21:46, Alan Somers wrote: > > On Mon, Aug 24, 2020 at 3:01 AM Mateusz Guzik wrote: > Author: mjg > Date: Mon Aug 24 09:00:57 2020 > New Revision: 364637 > URL: https://svnweb.freebsd.org/changeset/base/364637 > > Log: > cache: lockless reverse lookup > > This enables fully scalable operation for getcwd and significantly improves > realpath. > > For example: > PATH_CUSTOM=/usr/src ./getcwd_processes -t 104 > before: 1550851 > after: 380135380 > > Tested by:pho > > Modified: > head/sys/kern/vfs_cache.c > > Modified: head/sys/kern/vfs_cache.c > == > --- head/sys/kern/vfs_cache.c Mon Aug 24 09:00:07 2020(r364636) > +++ head/sys/kern/vfs_cache.c Mon Aug 24 09:00:57 2020(r364637) > @@ -477,6 +485,8 @@ STATNODE_COUNTER(shrinking_skipped, > static void cache_zap_locked(struct namecache *ncp); > static int vn_fullpath_hardlink(struct nameidata *ndp, char **retbuf, > char **freebuf, size_t *buflen); > +static int vn_fullpath_any_smr(struct vnode *vp, struct vnode *rdir, char > *buf, > +char **retbuf, size_t *buflen, bool slash_prefixed, size_t addend); > static int vn_fullpath_any(struct vnode *vp, struct vnode *rdir, char *buf, > char **retbuf, size_t *buflen); > static int vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, > @@ -2476,9 +2486,17 @@ vn_getcwd(char *buf, char **retbuf, size_t *buflen) > > What does the "smr" stand for? Safe Memory Reclamation (see sys/sys/smr.h and sys/kern/subr_smr.c). Jess ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r364637 - head/sys/kern
On Mon, Aug 24, 2020 at 3:01 AM Mateusz Guzik wrote: > Author: mjg > Date: Mon Aug 24 09:00:57 2020 > New Revision: 364637 > URL: https://svnweb.freebsd.org/changeset/base/364637 > > Log: > cache: lockless reverse lookup > > This enables fully scalable operation for getcwd and significantly > improves > realpath. > > For example: > PATH_CUSTOM=/usr/src ./getcwd_processes -t 104 > before: 1550851 > after: 380135380 > > Tested by:pho > > Modified: > head/sys/kern/vfs_cache.c > > Modified: head/sys/kern/vfs_cache.c > > == > --- head/sys/kern/vfs_cache.c Mon Aug 24 09:00:07 2020(r364636) > +++ head/sys/kern/vfs_cache.c Mon Aug 24 09:00:57 2020(r364637) > @@ -477,6 +485,8 @@ STATNODE_COUNTER(shrinking_skipped, > static void cache_zap_locked(struct namecache *ncp); > static int vn_fullpath_hardlink(struct nameidata *ndp, char **retbuf, > char **freebuf, size_t *buflen); > +static int vn_fullpath_any_smr(struct vnode *vp, struct vnode *rdir, char > *buf, > +char **retbuf, size_t *buflen, bool slash_prefixed, size_t addend); > static int vn_fullpath_any(struct vnode *vp, struct vnode *rdir, char > *buf, > char **retbuf, size_t *buflen); > static int vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char > *buf, > @@ -2476,9 +2486,17 @@ vn_getcwd(char *buf, char **retbuf, size_t *buflen) > What does the "smr" stand for? -Alan ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365391 - head/share/man/man5
Author: asomers Date: Sun Sep 6 20:32:13 2020 New Revision: 365391 URL: https://svnweb.freebsd.org/changeset/base/365391 Log: nsswitch.conf(5): recommend placing cache after files When cache precedes files, and nscd is configured to allow negative caching, commands like "pw groupadd" can fail. The sequence of events looks like: 1. A command like pkg(8) looks up the group, and finds it absent. 2. pkg invokes pw(8) to add the group 3. pkg queries the group, but nscd says it doesn't exist, since it has a negative cache entry for that group. See also: https://lists.freebsd.org/pipermail/freebsd-current/2012-January/031595.html Reviewed by: bcr (manpages) MFC after:1 week Sponsored by: Axcient Differential Revision:https://reviews.freebsd.org/D26184 Modified: head/share/man/man5/nsswitch.conf.5 Modified: head/share/man/man5/nsswitch.conf.5 == --- head/share/man/man5/nsswitch.conf.5 Sun Sep 6 20:03:13 2020 (r365390) +++ head/share/man/man5/nsswitch.conf.5 Sun Sep 6 20:32:13 2020 (r365391) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 10, 2018 +.Dd September 6, 2020 .Dt NSSWITCH.CONF 5 .Os .Sh NAME @@ -224,20 +224,24 @@ and continue on anything else (i.e, .Ss Cache You can enable caching for the particular database by specifying .Dq cache -as the first source in the +in the .Nm file. +It should come after +.Dq files , +but before remote sources like +.Dq nis . You should also enable caching for this database in .Xr nscd.conf 5 . -If for the particular query +If for a particular query .Dq cache -source returns success, no further sources are queried. +source returns success, then no further sources are queried. On the other hand, if there are no previously cached data, the query result will be placed into the cache right after all other sources are processed. -Note, that +Note that .Dq cache -requires +requires the .Xr nscd 8 daemon to be running. .Ss Compat mode: +/- syntax @@ -321,15 +325,16 @@ resides in .Pa /etc . .El .Sh EXAMPLES -To lookup hosts in cache, then in +To lookup hosts in .Pa /etc/hosts +, then in cache, and then from the DNS, and lookup user information from .Tn NIS then files, use: .Pp .Bl -tag -width passwd: -compact .It hosts: -cache files dns +files cache dns .It passwd: nis [notfound=return] files .It group: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r364098 - head/sys/dev/dwc
Li-Wen Hsu (lw...@freebsd.org) wrote: > Author: lwhsu > Date: Tue Aug 11 05:17:10 2020 > New Revision: 364098 > URL: https://svnweb.freebsd.org/changeset/base/364098 > > Log: > Fix armv{6,7} build after r364088 > > Sponsored by: The FreeBSD Foundation I overlooked this change when it was committed. Thanks for fixing and sorry for the breakage. -- gonzo ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365389 - head/sys/crypto/via
Author: asomers Date: Sun Sep 6 19:25:31 2020 New Revision: 365389 URL: https://svnweb.freebsd.org/changeset/base/365389 Log: padlock(4): fix instapanics with geli authentication cryptodev_process implementations are supposed to return 0 PR: 247986 Submitted by: jhb MFC after:1 week Modified: head/sys/crypto/via/padlock.c Modified: head/sys/crypto/via/padlock.c == --- head/sys/crypto/via/padlock.c Sun Sep 6 19:03:19 2020 (r365388) +++ head/sys/crypto/via/padlock.c Sun Sep 6 19:25:31 2020 (r365389) @@ -275,7 +275,7 @@ out: #endif crp->crp_etype = error; crypto_done(crp); - return (error); + return (0); } static device_method_t padlock_methods[] = { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365378 - head/usr.sbin/traceroute6
On Sun, Sep 06, 2020 at 08:32:46PM +0200, Oliver Pinter wrote: > On Sunday, September 6, 2020, Mariusz Zaborski wrote: > > New Revision: 365378 > > URL: https://svnweb.freebsd.org/changeset/base/365378 > > > > Log: > > traceroute6: capsicumize it > > > > ... > > @@ -13,6 +13,10 @@ > > # A PARTICULAR PURPOSE. > > # $FreeBSD$ > > > > +.include > > + > > +.include > > Dup 1) It's usually a good idea to read all svn-mail in your inbox before replying to a particular commit, the problem could already be fixed; 2) Please don't overquote, i.e. do *not* include the rest of the diff if you only wanted to comment on the first lines it. ./danfe ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365378 - head/usr.sbin/traceroute6
On Sunday, September 6, 2020, Mariusz Zaborski wrote: > Author: oshogbo > Date: Sun Sep 6 14:04:02 2020 > New Revision: 365378 > URL: https://svnweb.freebsd.org/changeset/base/365378 > > Log: > traceroute6: capsicumize it > > Submitted by: Shubh Gupta > Sponsored by: Google (GSOC 2020) > Differential Revision:https://reviews.freebsd.org/D25604 > > Modified: > head/usr.sbin/traceroute6/Makefile > head/usr.sbin/traceroute6/traceroute6.c > > Modified: head/usr.sbin/traceroute6/Makefile > > == > --- head/usr.sbin/traceroute6/Makefile Sun Sep 6 11:29:06 2020 > (r365377) > +++ head/usr.sbin/traceroute6/Makefile Sun Sep 6 14:04:02 2020 > (r365378) > @@ -13,6 +13,10 @@ > # A PARTICULAR PURPOSE. > # $FreeBSD$ > > +.include > + > +.include Dup > + > TRACEROUTE_DISTDIR?= ${SRCTOP}/contrib/traceroute > .PATH: ${TRACEROUTE_DISTDIR} > > @@ -26,7 +30,13 @@ BINMODE= 4555 > CFLAGS+= -DIPSEC -DHAVE_POLL > CFLAGS+= -I${.CURDIR} -I${TRACEROUTE_DISTDIR} -I. > > -LIBADD=ipsec > +.if ${MK_CASPER} != "no" > +LIBADD+= casper > +LIBADD+= cap_dns > +CFLAGS+= -DWITH_CASPER > +.endif > + > +LIBADD+= ipsec > > .include > > > Modified: head/usr.sbin/traceroute6/traceroute6.c > > == > --- head/usr.sbin/traceroute6/traceroute6.c Sun Sep 6 11:29:06 2020 > (r365377) > +++ head/usr.sbin/traceroute6/traceroute6.c Sun Sep 6 14:04:02 2020 > (r365378) > @@ -249,6 +249,7 @@ static const char rcsid[] = > */ > > #include > +#include > #include > #include > #include > @@ -260,6 +261,10 @@ static const char rcsid[] = > > #include > > +#include > +#include > +#include > + > #include > #include > #include > @@ -289,11 +294,6 @@ static const char rcsid[] = > > #defineMAXPACKET 65535 /* max ip packet size */ > > -#ifndef HAVE_GETIPNODEBYNAME > -#define getipnodebyname(x, y, z, u)gethostbyname2((x), (y)) > -#define freehostent(x) > -#endif > - > static u_char packet[512];/* last inbound (icmp) packet */ > static char*outpacket; /* last output packet */ > > @@ -304,6 +304,7 @@ int setpolicy(int so, char *policy); > #endif > void send_probe(int, u_long); > void *get_uphdr(struct ip6_hdr *, u_char *); > +void capdns_open(void); > intget_hoplim(struct msghdr *); > double deltaT(struct timeval *, struct timeval *); > const char *pr_type(int); > @@ -312,6 +313,8 @@ voidprint(struct msghdr *, int); > const char *inetname(struct sockaddr *); > u_int32_t sctp_crc32c(void *, u_int32_t); > u_int16_t in_cksum(u_int16_t *addr, int); > +u_int16_t udp_cksum(struct sockaddr_in6 *, struct sockaddr_in6 *, > +void *, u_int32_t); > u_int16_t tcp_chksum(struct sockaddr_in6 *, struct sockaddr_in6 *, > void *, u_int32_t); > void usage(void); > @@ -335,6 +338,8 @@ static struct cmsghdr *cmsg; > static char *source = NULL; > static char *hostname; > > +static cap_channel_t *capdns; > + > static u_long nprobes = 3; > static u_long first_hop = 1; > static u_long max_hops = 30; > @@ -368,7 +373,10 @@ main(int argc, char *argv[]) > char ipsec_inpolicy[] = "in bypass"; > char ipsec_outpolicy[] = "out bypass"; > #endif > + cap_rights_t rights; > > + capdns_open(); > + > /* > * Receive ICMP > */ > @@ -429,6 +437,7 @@ main(int argc, char *argv[]) > } > break; > case 'g': > + /* XXX use after capability mode is entered */ > hp = getipnodebyname(optarg, AF_INET6, 0, > _errno); > if (hp == NULL) { > fprintf(stderr, > @@ -560,8 +569,8 @@ main(int argc, char *argv[]) > sndsock = rcvsock; > break; > case IPPROTO_UDP: > - if ((sndsock = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { > - perror("socket(SOCK_DGRAM)"); > + if ((sndsock = socket(AF_INET6, SOCK_RAW, IPPROTO_UDP)) < > 0) { > + perror("socket(SOCK_RAW)"); > exit(5); > } > break; > @@ -606,7 +615,9 @@ main(int argc, char *argv[]) > hints.ai_socktype = SOCK_RAW; > hints.ai_protocol = IPPROTO_ICMPV6; > hints.ai_flags = AI_CANONNAME; > - error = getaddrinfo(*argv, NULL, , ); > + > + error = cap_getaddrinfo(capdns, *argv, NULL, , ); > + > if (error) { > fprintf(stderr, > "traceroute6: %s\n", gai_strerror(error)); > @@ -624,7 +635,7 @@ main(int argc, char *argv[]) > exit(1); > } > if (res->ai_next) { > - if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, > + if
svn commit: r365382 - head/usr.sbin/traceroute6
Author: oshogbo Date: Sun Sep 6 15:44:09 2020 New Revision: 365382 URL: https://svnweb.freebsd.org/changeset/base/365382 Log: Remove duplicated line. Reported by: lwhsu Modified: head/usr.sbin/traceroute6/Makefile Modified: head/usr.sbin/traceroute6/Makefile == --- head/usr.sbin/traceroute6/Makefile Sun Sep 6 14:41:35 2020 (r365381) +++ head/usr.sbin/traceroute6/Makefile Sun Sep 6 15:44:09 2020 (r365382) @@ -15,8 +15,6 @@ .include -.include - TRACEROUTE_DISTDIR?= ${SRCTOP}/contrib/traceroute .PATH: ${TRACEROUTE_DISTDIR} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r365378 - head/usr.sbin/traceroute6
Author: oshogbo Date: Sun Sep 6 14:04:02 2020 New Revision: 365378 URL: https://svnweb.freebsd.org/changeset/base/365378 Log: traceroute6: capsicumize it Submitted by: Shubh Gupta Sponsored by: Google (GSOC 2020) Differential Revision:https://reviews.freebsd.org/D25604 Modified: head/usr.sbin/traceroute6/Makefile head/usr.sbin/traceroute6/traceroute6.c Modified: head/usr.sbin/traceroute6/Makefile == --- head/usr.sbin/traceroute6/Makefile Sun Sep 6 11:29:06 2020 (r365377) +++ head/usr.sbin/traceroute6/Makefile Sun Sep 6 14:04:02 2020 (r365378) @@ -13,6 +13,10 @@ # A PARTICULAR PURPOSE. # $FreeBSD$ +.include + +.include + TRACEROUTE_DISTDIR?= ${SRCTOP}/contrib/traceroute .PATH: ${TRACEROUTE_DISTDIR} @@ -26,7 +30,13 @@ BINMODE= 4555 CFLAGS+= -DIPSEC -DHAVE_POLL CFLAGS+= -I${.CURDIR} -I${TRACEROUTE_DISTDIR} -I. -LIBADD=ipsec +.if ${MK_CASPER} != "no" +LIBADD+= casper +LIBADD+= cap_dns +CFLAGS+= -DWITH_CASPER +.endif + +LIBADD+= ipsec .include Modified: head/usr.sbin/traceroute6/traceroute6.c == --- head/usr.sbin/traceroute6/traceroute6.c Sun Sep 6 11:29:06 2020 (r365377) +++ head/usr.sbin/traceroute6/traceroute6.c Sun Sep 6 14:04:02 2020 (r365378) @@ -249,6 +249,7 @@ static const char rcsid[] = */ #include +#include #include #include #include @@ -260,6 +261,10 @@ static const char rcsid[] = #include +#include +#include +#include + #include #include #include @@ -289,11 +294,6 @@ static const char rcsid[] = #defineMAXPACKET 65535 /* max ip packet size */ -#ifndef HAVE_GETIPNODEBYNAME -#define getipnodebyname(x, y, z, u)gethostbyname2((x), (y)) -#define freehostent(x) -#endif - static u_char packet[512];/* last inbound (icmp) packet */ static char*outpacket; /* last output packet */ @@ -304,6 +304,7 @@ int setpolicy(int so, char *policy); #endif void send_probe(int, u_long); void *get_uphdr(struct ip6_hdr *, u_char *); +void capdns_open(void); intget_hoplim(struct msghdr *); double deltaT(struct timeval *, struct timeval *); const char *pr_type(int); @@ -312,6 +313,8 @@ voidprint(struct msghdr *, int); const char *inetname(struct sockaddr *); u_int32_t sctp_crc32c(void *, u_int32_t); u_int16_t in_cksum(u_int16_t *addr, int); +u_int16_t udp_cksum(struct sockaddr_in6 *, struct sockaddr_in6 *, +void *, u_int32_t); u_int16_t tcp_chksum(struct sockaddr_in6 *, struct sockaddr_in6 *, void *, u_int32_t); void usage(void); @@ -335,6 +338,8 @@ static struct cmsghdr *cmsg; static char *source = NULL; static char *hostname; +static cap_channel_t *capdns; + static u_long nprobes = 3; static u_long first_hop = 1; static u_long max_hops = 30; @@ -368,7 +373,10 @@ main(int argc, char *argv[]) char ipsec_inpolicy[] = "in bypass"; char ipsec_outpolicy[] = "out bypass"; #endif + cap_rights_t rights; + capdns_open(); + /* * Receive ICMP */ @@ -429,6 +437,7 @@ main(int argc, char *argv[]) } break; case 'g': + /* XXX use after capability mode is entered */ hp = getipnodebyname(optarg, AF_INET6, 0, _errno); if (hp == NULL) { fprintf(stderr, @@ -560,8 +569,8 @@ main(int argc, char *argv[]) sndsock = rcvsock; break; case IPPROTO_UDP: - if ((sndsock = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { - perror("socket(SOCK_DGRAM)"); + if ((sndsock = socket(AF_INET6, SOCK_RAW, IPPROTO_UDP)) < 0) { + perror("socket(SOCK_RAW)"); exit(5); } break; @@ -606,7 +615,9 @@ main(int argc, char *argv[]) hints.ai_socktype = SOCK_RAW; hints.ai_protocol = IPPROTO_ICMPV6; hints.ai_flags = AI_CANONNAME; - error = getaddrinfo(*argv, NULL, , ); + + error = cap_getaddrinfo(capdns, *argv, NULL, , ); + if (error) { fprintf(stderr, "traceroute6: %s\n", gai_strerror(error)); @@ -624,7 +635,7 @@ main(int argc, char *argv[]) exit(1); } if (res->ai_next) { - if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, + if (cap_getnameinfo(capdns, res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) strlcpy(hbuf, "?", sizeof(hbuf)); fprintf(stderr, "traceroute6: Warning: %s has multiple " @@ -803,7 +814,7 @@ main(int argc, char *argv[]) hints.ai_family =
svn commit: r365373 - in head: lib/libc/stdlib/jemalloc tools/build/options
Author: dim Date: Sun Sep 6 09:08:06 2020 New Revision: 365373 URL: https://svnweb.freebsd.org/changeset/base/365373 Log: Follow-up r365371 by removing sentences which indicate the state of the MK_MALLOC_PRODUCTION option on -CURRENT. Also, for the sake of backwards compatibility, support the old way of enabling 'production malloc', e.g. by adding a define in make.conf(5). MFC after:1 week X-MFC-With: r365371 Modified: head/lib/libc/stdlib/jemalloc/Makefile.inc head/tools/build/options/WITHOUT_MALLOC_PRODUCTION head/tools/build/options/WITH_MALLOC_PRODUCTION Modified: head/lib/libc/stdlib/jemalloc/Makefile.inc == --- head/lib/libc/stdlib/jemalloc/Makefile.inc Sun Sep 6 00:36:51 2020 (r365372) +++ head/lib/libc/stdlib/jemalloc/Makefile.inc Sun Sep 6 09:08:06 2020 (r365373) @@ -45,6 +45,6 @@ MLINKS+= \ jemalloc.3 nallocx.3 \ jemalloc.3 malloc.conf.5 -.if ${MK_MALLOC_PRODUCTION} != "no" +.if ${MK_MALLOC_PRODUCTION} != "no" || defined(MALLOC_PRODUCTION) CFLAGS+= -DMALLOC_PRODUCTION .endif Modified: head/tools/build/options/WITHOUT_MALLOC_PRODUCTION == --- head/tools/build/options/WITHOUT_MALLOC_PRODUCTION Sun Sep 6 00:36:51 2020(r365372) +++ head/tools/build/options/WITHOUT_MALLOC_PRODUCTION Sun Sep 6 09:08:06 2020(r365373) @@ -2,4 +2,3 @@ Set to enable assertions and statistics gathering in .Xr malloc 3 . It also defaults the A and J runtime options to on. -Enabled by default on -CURRENT. Modified: head/tools/build/options/WITH_MALLOC_PRODUCTION == --- head/tools/build/options/WITH_MALLOC_PRODUCTION Sun Sep 6 00:36:51 2020(r365372) +++ head/tools/build/options/WITH_MALLOC_PRODUCTION Sun Sep 6 09:08:06 2020(r365373) @@ -2,4 +2,3 @@ Set to disable assertions and statistics gathering in .Xr malloc 3 . It also defaults the A and J runtime options to off. -Disabled by default on -CURRENT. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365071 - in head/sys: net net/altq net/route net80211 netgraph netgraph/atm netgraph/atm/ccatm netgraph/atm/sscfu netgraph/atm/sscop netgraph/atm/uni netgraph/bluetooth/common netgrap
On Sat, Sep 5, 2020 at 1:42 PM Ed Maste wrote: > On Fri, 4 Sep 2020 at 23:11, Kevin Bowling > wrote: > > > > An arbitrary formater may leave a > > little bit of annoyance to each person's taste, but that is a tiny > > drop in the bucket compared to never having to discuss and especially > > correct (which may /seem/ helpful but is pretty offputting to > > newcomers). > > As an experiment I ran clang-format over an arbitrary file > (vtfontcvt.c) and put the results in > https://reviews.freebsd.org/D26340 > > Relative to the original file there are a few style(9) items that have > been fixed, a few that have been broken, and some that are arguably > worse but really indifferent. > > Fixed: > - *_FOREACH now has a space before (, equivalent to for (;;) > Except pretty much everywhere we don't have a space there... > - header sorting > - space between sizeof and ( removed > - indentation of an if body > - unwrapped function call that fits on one line > > Broken: > - indentation of if / for conditions that span 2 or more lines > broke all alignment of variables and comments that were done. broke all err() calls to wrap too much broke purposely outdented code in statistics function extra headers still included. > > Indifferent: > - lose lined-up struct members or comments > This will cause a huge amount of churn, and is a needless change. It makes things harder to read. Though this alignment style has been slowly waining after being popular early on... The comments moving is a bigger problem for the worse. > - space vs tab after #define > - newlines before quoted function arguments > Also a problem since it introduces more verticality. > - function argument wrapping (see write_glyph_buf) > - leading indentation and args-per-line (print_font_info) > An interesting experiment, but there's far more worse after than before. The rearranging of carefully aligned elements is an especially galling change for some people (myself included). Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r365071 - in head/sys: net net/altq net/route net80211 netgraph netgraph/atm netgraph/atm/ccatm netgraph/atm/sscfu netgraph/atm/sscop netgraph/atm/uni netgraph/bluetooth/common netgrap
On Fri, 4 Sep 2020 at 23:11, Kevin Bowling wrote: > > An arbitrary formater may leave a > little bit of annoyance to each person's taste, but that is a tiny > drop in the bucket compared to never having to discuss and especially > correct (which may /seem/ helpful but is pretty offputting to > newcomers). As an experiment I ran clang-format over an arbitrary file (vtfontcvt.c) and put the results in https://reviews.freebsd.org/D26340 Relative to the original file there are a few style(9) items that have been fixed, a few that have been broken, and some that are arguably worse but really indifferent. Fixed: - *_FOREACH now has a space before (, equivalent to for (;;) - header sorting - space between sizeof and ( removed - indentation of an if body - unwrapped function call that fits on one line Broken: - indentation of if / for conditions that span 2 or more lines Indifferent: - lose lined-up struct members or comments - space vs tab after #define - newlines before quoted function arguments - function argument wrapping (see write_glyph_buf) - leading indentation and args-per-line (print_font_info) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"