svn commit: r344479 - head/sys/mips/conf

Bruce Evans brde at optusnet.com.au
Sat Feb 23 03:05:29 UTC 2019


On Sat, 23 Feb 2019, Maxim Sobolev wrote:

> Log:
>  o Get rid of silly comment which seems to have got life of its own via
>    copy-and-paste process;

It is perhaps better than no comment on a misformatted options line.

>  o Return geom_uzip(4) usage back to how manual page prescribes it to be
>    used while I am here.

Section 4 man pages unfortunately don't usually have examples of comments
on options line, and never have correct formatting.

> Modified: head/sys/mips/conf/AP94
> ==============================================================================
> --- head/sys/mips/conf/AP94	Fri Feb 22 23:15:32 2019	(r344478)
> +++ head/sys/mips/conf/AP94	Sat Feb 23 00:00:49 2019	(r344479)
> @@ -21,7 +21,6 @@ hints		"AP94.hints"
>
> # GEOM modules
> device		geom_redboot	# to get access to the SPI flash partitions
> -device		geom_uzip	# compressed in-memory filesystem hackery!
> options 	GEOM_UZIP
>
> options 	ROOTDEVNAME=\"ufs:md0.uzip\"

Now there is no comment on the remaining GEOM_UZIP line.

"device foo" is sometimes abused to access an unsupported option (an option
that is not listed in conf/options*).  "foo" is then not available as a
macro, but it is available as a keyword for selecting files from conf/files.
Also, if DEV_FOO is listed in conf/options, then this is a syntax error if
"foo" is _not_ used as a keyword in conf/files, but if "foo" is so used then
DEV_FOO is not a syntax error and a #define of it is generated.  Everything
seems to be case-sensitive, except there is no way to prevent the conversion
of "foo" to "FOO" in DEV_FOO.

"device loop" is an example of use of this.  This just selects the file
if_loop.c, and there are no messy ifdefs, so DEV_LOOP is not needed and
is not an option and not generated.  "device bpf" is a messier example
which needs ifdefs on DEV_BPF, so DEV_BPF must be an option.

"device gzip" is an example of abuse of this.  gzip is very far from being
a device.

> Modified: head/sys/mips/conf/DIR-825B1
> Modified: head/sys/mips/conf/ROUTERSTATION_MFS
> Modified: head/sys/mips/conf/RSPRO_MFS
> Modified: head/sys/mips/conf/WZR-300HP

4 more removals leaving no comment.

> ==============================================================================
> --- head/sys/mips/conf/WZR-300HP	Fri Feb 22 23:15:32 2019	(r344478)
> +++ head/sys/mips/conf/WZR-300HP	Sat Feb 23 00:00:49 2019	(r344479)
> @@ -26,7 +26,7 @@ options 	BOOTVERBOSE
>
> # GEOM modules
> device		geom_map	# to get access to the SPI flash partitions
> -device		geom_uzip	# compressed in-memory filesystem hackery!
> +options		GEOM_UZIP
>
> options 	ROOTDEVNAME=\"ufs:/dev/map/rootfs.uzip\"

This is an addition with a misformatted options line and no comment.

conf/NOTES provides an example with correct formatting.  It even provides
a comment suitable for copying.

conf/NOTES has many misformatted options lines (27 with the keyword followed
by 2 tabs and 1 with it followed by 1 tab), but all GEOM_FOO lines are
formatted normally.

*/NOTES has too many lines not suitable for copying since they have no
comment.  NOTES tends to have more verbose comments written in separate
paragraphs and lists.  The lists are better made up of options lines
with short comments.

> Modified: head/sys/mips/conf/WZR-HPAG300H

Another addition with a misformatted options line and no comment.

Normal formatting of options lines lines things up nicely, but wastes
8 or 16 columns which would be better used for comments.  Many options
names are too long.  GENERIC is more consistent than NOTES in wasting
an extra 8 columns for short option names so as to line up the comments.
device names are better, and not wasting an extra 8 columns to line up
the comments for device directives gives another set of inconsistencies.

Bruce


More information about the svn-src-all mailing list