tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: config(5) break down

One more reason to split: localize options (signature change).

Example: sys/conf/files has this:

        defflag opt_dkwedge.h   DKWEDGE_AUTODISCOVER

Actually DKWEDGE_METHOD_* is not options, but modules.  They enable build of
dkwedge methods like:

        file    dev/dkwedge/dkwedge_bsdlabel.c  dkwedge_method_bsdlabel
        file    dev/dkwedge/dkwedge_gpt.c       dkwedge_method_gpt
        file    dev/dkwedge/dkwedge_mbr.c       dkwedge_method_mbr

DKWEDGE_AUTODISCOVER is an option, and change the signature of
sys/dev/dkwedge/dk.c like:

    851 int     dkwedge_autodiscover = 1;
    852 #else
    853 int     dkwedge_autodiscover = 0;
    854 #endif

This means that the option DKWEDGE_AUTODISCOVER is *local* to the module "dk"
(or "dkwedge"), which in turn means that the option doesn't affect outer
files.  So the line "defflag opt_dkwedge.h ..." is written in dk.conf so that
it's only visible to users who really use the dk module.

(We also need to sanitize defflag/defparam/opt_*.h too.)


Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635

Home | Main Index | Thread Index | Old Index