bin/90310: code cleanup for config(8)

Matt Emmerton matt at
Mon Dec 12 15:00:13 PST 2005

>Number:         90310
>Category:       bin
>Synopsis:       code cleanup for config(8)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 12 23:00:10 GMT 2005
>Originator:     Matt Emmerton
>Release:        6-STABLE
GSI Computer Services
Reviewing the source code for config(8) I noticed two issues:

1) Checks for required 'ident' and 'cpu' lines occur within low-level routines (read_files(), read_options(), makefile()), when they should be elsewhere.  One of these checks was marked with a comment to this effect.

2) Code to generate env.c and hints.c was in the same routine used to generate the makefile.  Comments in the code suggested that this was inappropriate.

Read the code :)
1) Remove the checks for 'ident' and 'cpu' from mkmakefile.c and mkoptions.c, and place them in main(), alongside the existing check for 'machine'.

Files Changed:

2) Introduce new routines, makeenv() and makehints() to make env.c and hints.c, respectively.

Files Changed:

Diffs will be attached via follow-up.


More information about the freebsd-bugs mailing list