Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Sep 2017 11:45:53 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Kevin Oberman <rkoberman@gmail.com>
Cc:        Nick Hibma <nick@van-laarhoven.org>,  FreeBSD Current Mailing List <freebsd-current@freebsd.org>
Subject:   Re: How do GEOM_PART_* options configure geom_part_* modules??
Message-ID:  <CANCZdfpQGkxZFqU45T0mzXVtYQK7s2p-%2BZe2KUStGARUdB=%2BQw@mail.gmail.com>
In-Reply-To: <CAN6yY1tcGfFQHfaO3XHJScTO2LEHtZ930gFCKxdnJHWis5b3xA@mail.gmail.com>
References:  <FD2F9831-F5E9-459D-B250-E5D9AE72DA08@van-laarhoven.org> <CANCZdfoBNLVBopk0ztNeYusYYvD8KG02987boFWWsFba_DGZeQ@mail.gmail.com> <30C7B916-C022-432B-BA12-F51536F7CC7D@van-laarhoven.org> <CANCZdfoxHOcAYfyEbUm4qe5yLtO%2B2mXpf8-xuBmZ9z2Q6EYa-A@mail.gmail.com> <CAN6yY1tcGfFQHfaO3XHJScTO2LEHtZ930gFCKxdnJHWis5b3xA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 28, 2017 at 11:12 AM, Kevin Oberman <rkoberman@gmail.com> wrote:

> On Thu, Sep 28, 2017 at 9:13 AM, Warner Losh <imp@bsdimp.com> wrote:
>
>> On Thu, Sep 28, 2017 at 10:00 AM, Nick Hibma <nick@van-laarhoven.org>
>> wrote:
>>
>> > I created a new kernel config file from scratch, wondered what the
>> > GEOM_PART_MBR option and friends were doing, search for them, didn't
>> find
>> > them in the tree, and deleted them from my config. But... de resulting
>> disk
>> > image didn't boot, because of the fact that it didn't recognise the MBR
>> > partitions (it only had a single diskid entry on the mount-root prompt).
>> >
>> > Can anyone explain to me how these kernel options work, as in: they are
>> > defined in kernel configs and as a consequence in opt_geom.h, but how
>> are
>> > they actually used to select which geom_part_* modules/kernel parts to
>> > build? I thought these options were translated to stuff that cpp would
>> use,
>> > but there are not uses of for example GEOM_PART_MBR anywhere for
>> example!
>> >
>> >
>> > The module always build them because they are listed in the module's
>> > Makefile.
>> >
>> > The kernel only sometimes does. Here's the key lines from conf/files:
>> > files:geom/geom_bsd_enc.c optional geom_bsd | geom_part_bsd
>> > files:geom/part/g_part_apm.c optional geom_part_apm
>> > files:geom/part/g_part_bsd.c optional geom_part_bsd
>> > files:geom/part/g_part_bsd64.c optional geom_part_bsd64
>> > files:geom/part/g_part_ebr.c optional geom_part_ebr
>> > files:geom/part/g_part_gpt.c optional geom_part_gpt
>> > files:geom/part/g_part_ldm.c optional geom_part_ldm
>> > files:geom/part/g_part_mbr.c optional geom_part_mbr
>> > files:geom/part/g_part_vtoc8.c optional geom_part_vtoc8
>> >
>> > which turn on/off which files get included. config "helpfully" converts
>> the
>> > upper case options to lower case for this.
>> >
>> > Warner
>> >
>> >
>> > *slaps forehead* Goose chase!
>> >
>> > I actually knew that... and, at the time, thought it was weird
>> behaviour.
>> > ''grep" would not have failed me if those options would be uppercase
>> there
>> > ...
>> >
>>
>> I've been nibbled to death by these geese often enough to have a PTSD-like
>> reaction when someone mentions it and habitually add -i to my greps...
>>
>> Warner
>
>
> This horrid POLA violation seems to have been in FreeBSD configuration
> since at least 3.0 and probably goes back to the creation of the
> configuration process.
>
> Any idea why such a horrible POLA was ever introduced? Seems like an
> obviously bad idea in an OS that is ALMOST always case sensitive.
>

It's received code from the old 4.3 BSD config program (or maybe the net-2
config program).

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpQGkxZFqU45T0mzXVtYQK7s2p-%2BZe2KUStGARUdB=%2BQw>