Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 2014 10:14:14 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Warner Losh <imp@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r263246 - in head/sys: amd64/conf i386/conf
Message-ID:  <20140317100304.Q1131@besplex.bde.org>
In-Reply-To: <201403161522.s2GFMrBD025427@svn.freebsd.org>
References:  <201403161522.s2GFMrBD025427@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 16 Mar 2014, Warner Losh wrote:

> Log:
>  Align all comments in config files on same column. This consistency
>  helps when bits and pieces of GENERIC from i386 or amd64 are cut and
>  pasted into other architecture's config files (which in the case of
>  ARM had gotten rather akimbo).

Indentation of comments on device lines was not quite right, but this
breaks the formatting further by blindly indenting without changing the
comments, so that some lines are now too long.

> Modified: head/sys/amd64/conf/GENERIC
> ==============================================================================
> --- head/sys/amd64/conf/GENERIC	Sun Mar 16 15:22:46 2014	(r263245)
> +++ head/sys/amd64/conf/GENERIC	Sun Mar 16 15:22:52 2014	(r263246)
> @@ -70,7 +70,7 @@ options 	MAC			# TrustedBSD MAC Framewor
> options 	KDTRACE_FRAME		# Ensure frames are compiled in
> options 	KDTRACE_HOOKS		# Kernel DTrace hooks
> options 	DDB_CTF			# Kernel ELF linker loads CTF data
> -options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
> +options 	INCLUDE_CONFIG_FILE	# Include this file in kernel
>
> # Debugging support.  Always need this:
> options 	KDB			# Enable kernel debugger support.

Comments on options lines lived for longer with indentation to column 40,
so they are mostly carefully written to be not too long.

> @@ -100,253 +100,253 @@ device		pci
> device		fdc
>
> # ATA controllers
> -device		ahci		# AHCI-compatible SATA controllers
> -device		ata		# Legacy ATA/SATA controllers
> -options 	ATA_STATIC_ID	# Static device numbering
> -device		mvs		# Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
> -device		siis		# SiliconImage SiI3124/SiI3132/SiI3531 SATA
> +device		ahci			# AHCI-compatible SATA controllers
> +device		ata			# Legacy ATA/SATA controllers
> +options 	ATA_STATIC_ID		# Static device numbering
> +device		mvs			# Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
> +device		siis			# SiliconImage SiI3124/SiI3132/SiI3531 SATA

Too long by 3 or 4 characters (83 columns).

Too long by 11 or 12 characters when quoting in mail adds a prefix.

Too long by 11 or 12 characters when commenting out adds a prefix of '# ',
although an uglier prefix of '#' doesn't cause the extra indentation.

When globally reformatting device lines, they should be more carefully
formatted with spaces, like options lines are, so that commenting them
out works better.  The best formatting for this seems to be
'device<space><space><tab>'.  For options lines, we use
'options<space><tab>'.  2 spaces instead of 1 are needed after the keyword
to reach the first tab stop.

The density of device lines that were of length >= 72 is not very high, but
there are so many device lines that it is painful just to read them all.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140317100304.Q1131>