Date: Mon, 12 Dec 2005 22:52:00 GMT From: Matt Emmerton <matt@gsicomp.on.ca> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/90310: code cleanup for config(8) Message-ID: <200512122252.jBCMq00B094502@www.freebsd.org> Resent-Message-ID: <200512122300.jBCN0B0x019293@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 90310 >Category: bin >Synopsis: code cleanup for config(8) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Dec 12 23:00:10 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Matt Emmerton >Release: 6-STABLE >Organization: GSI Computer Services >Environment: >Description: 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. >How-To-Repeat: Read the code :) >Fix: 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: main.c mkoptions.c mkmakefile.c 2) Introduce new routines, makeenv() and makehints() to make env.c and hints.c, respectively. Files Changed: main.c mkmakefile.c config.h Diffs will be attached via follow-up. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512122252.jBCMq00B094502>