From owner-freebsd-current@freebsd.org Thu Sep 28 17:12:48 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 8688BE04496 for ; Thu, 28 Sep 2017 17:12:48 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-vk0-x233.google.com (mail-vk0-x233.google.com [IPv6:2607:f8b0:400c:c05::233]) (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 3CCA366A49 for ; Thu, 28 Sep 2017 17:12:48 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mail-vk0-x233.google.com with SMTP id d12so1147327vkf.1 for ; Thu, 28 Sep 2017 10:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=DNVDvAiv9o+eE3Y6xz2UIlW5G8aLQu/BUSqb7Ex7bO0=; b=rN0JyUKuXa619vUkjD0CYTaA1gj1S9AEeO/5YDJuB4qDrs/uSPU7myZuIcX/ZJeBdV lgaMmkWWhJHLSAX7xkscq+vIYDa52gYgmm83maqVWsHx3yUvdkxwyk9+58g81eqRPzkW Xsf6xAEimHVY2vMiDY/3rUL0JDQmIlGzyTNWqyh4IC0tqFT0FIuYs+lGYp9drpACLzSX f2jK/UAAfFlXrjkmUYvVR4tb9qhXoiztjwgkx+oGBjadp/RtpbKVsx0sRTMD3snE0Ins 1YkEbVfTqZGVLCEo2nTtbvuQJvvrOnUz7h40qZtGEg8oHFesACb7M3iymuAxAxWhDzjm +A8Q== 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=DNVDvAiv9o+eE3Y6xz2UIlW5G8aLQu/BUSqb7Ex7bO0=; b=BkQFmp4YfyBX75isw+wPYkN4j1uNvCNG1V9VT0BDa560ddnQzNBlscEng0gV1kkh7i y9GVwWfQPrL6sg/pCruCMb4FJGgOjBSmL2xMJuL+I684w20fMVsBQR1NgxH8u5DVVBYE gj68+F1jLKQCuM9N2a8aGDcJ9lRm63t6guIebBcxYgRLhCzNjAQIHz6RES4wiTRgnCZ9 3+Bz8Njh4gu1IxB16jcif+pF8/7aZIW3WZbihznIw5bsCNokwYy6tWvR4dqSySR/BugV V01gIarKxmrV19YKQXbKUSbq+UJmTrRbb14asgXolxVu6QUb/vPZhZhO+K4tJLFFbvr6 OMHQ== X-Gm-Message-State: AHPjjUiagqFTSmd3+r6/vXDS4vHiNpXEWhpmmEtRWlAAbv7fZqGigjGp TZUNh4bFECDnZ3RimO+L7xohw2G8fogBoO9oijfpCLU3 X-Google-Smtp-Source: AOwi7QBsgt0vgg0wh4b6ykif3vKGJy7rVMCSAiEEPPUez0o9KS/enCLFIK6OJ+AhB4+gDbBbMUtGu396xbSC0SJPfq8= X-Received: by 10.31.141.14 with SMTP id p14mr2765323vkd.53.1506618767134; Thu, 28 Sep 2017 10:12:47 -0700 (PDT) MIME-Version: 1.0 Sender: kob6558@gmail.com Received: by 10.103.134.194 with HTTP; Thu, 28 Sep 2017 10:12:46 -0700 (PDT) In-Reply-To: References: <30C7B916-C022-432B-BA12-F51536F7CC7D@van-laarhoven.org> From: Kevin Oberman Date: Thu, 28 Sep 2017 10:12:46 -0700 X-Google-Sender-Auth: n5pqtQx4aKOjcKDc7EOvmTKotHk Message-ID: Subject: Re: How do GEOM_PART_* options configure geom_part_* modules?? To: Warner Losh 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:12:48 -0000 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. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683