From owner-freebsd-current@freebsd.org Thu Sep 28 17:45:56 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E275E04C4D for ; Thu, 28 Sep 2017 17:45:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A24767655 for ; Thu, 28 Sep 2017 17:45:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x234.google.com with SMTP id m123so2417893ita.3 for ; Thu, 28 Sep 2017 10:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=XnIiO1miMj/eZHSFWm2wYhzGhfWmSOx/riUJ0RkBdlg=; b=oDJycVlV2chWurZzDB7r39ncQosDknkS55jjTsAbREjXZhEGlA3NFGoaHflZ9d8wS1 c/zC9en50YuNrkD41Gma0wmJKngiqPSX7hHQxx4nfAPaWyQDP5EBjnF8VtlaMv1pFXjt xX6fCKxVm7PziVzeYyhEiy1RK46y6tV5kKgirKeGIuqsWwJFdZcdArpFW3KaZAVjwBRZ UFU6U7UERQatRNAhOxqdRrbXFy6Bsjrz9HX447iYEvHOHR5S4peMSrl9E++Ri/oWdAfS hcnTTJipblqtLUh5AjSQmqPoqBzi+fw697iD9925G553SqIQNX2+8PrES/MUMTFNjhXO 2aYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=XnIiO1miMj/eZHSFWm2wYhzGhfWmSOx/riUJ0RkBdlg=; b=b/CpPg6ySq6wtLlxzag80w6JCv61CyyDo6r2UZXSVAzQytLnd+xD6aNh9A/+IzP5vD ptAPmHOKM0h/KFRTaBN4AjHf4d4oERXpsgPSBCgaYv1VwBBiBiFi05/K1hOj6M0KaChi Km5L+Vzz+p47AqNGY22PThQ0TnDsRSi2ZfSdDCkI/xvT8xrJRY0h1YJaUBYbR031AxJE uVqXX15c6Np8lZHmOb6+VfGytftDWLkh9QeYYGPqtTrKVHG+gQ94RpbFrno4hj6dFQsJ d2oYLt4f6g/Cls1ZjF6CKXJfm6yOIxI4mcAjLMcy83bZY3I1L9qtgFHi7XIOhU92hd1D Mwzw== X-Gm-Message-State: AMCzsaVADuOgI/g8y3wP72pPWs+eJ6ICDd2sZED9oi/S46isuRKRB6Nc dt3NhIhzWrApjAyd7k1jITtspu4CBiSK5K/7PONOEQ== X-Google-Smtp-Source: AOwi7QD4/VcQElUYbl2ZnHHv5uu1lnJ+KEB+M4gqHr0TK3RbSbxvgAqo/7bfIoXhENY6qm9I+zzOXYYs+ZHgIqZu18k= X-Received: by 10.36.6.18 with SMTP id 18mr3036559itv.15.1506620754695; Thu, 28 Sep 2017 10:45:54 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Thu, 28 Sep 2017 10:45:53 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:191c:5e93:2feb:3c70] In-Reply-To: References: <30C7B916-C022-432B-BA12-F51536F7CC7D@van-laarhoven.org> From: Warner Losh Date: Thu, 28 Sep 2017 11:45:53 -0600 X-Google-Sender-Auth: c49iZY6ntl3bspq-ZgkNZPGt8so Message-ID: Subject: Re: How do GEOM_PART_* options configure geom_part_* modules?? To: Kevin Oberman Cc: Nick Hibma , FreeBSD Current Mailing List Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Sep 2017 17:45:56 -0000 On Thu, Sep 28, 2017 at 11:12 AM, Kevin Oberman wrote: > On Thu, Sep 28, 2017 at 9:13 AM, Warner Losh wrote: > >> On Thu, Sep 28, 2017 at 10:00 AM, Nick Hibma >> 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