From owner-freebsd-current@freebsd.org Thu Sep 28 16:13:16 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 046DAE02A42 for ; Thu, 28 Sep 2017 16:13:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (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 BC0FF6475A for ; Thu, 28 Sep 2017 16:13:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22d.google.com with SMTP id d16so2011404ioj.3 for ; Thu, 28 Sep 2017 09:13:15 -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=Ar/tgfeW0mxAYhx21zHRX7b31hh3vv7QgOklm9uWtI0=; b=VoPk3cqq9zlg3N+wJZOPmPLTazSRB19x8Wq1zIAtfZ95WvPM7ELSxy2UqMynR0YnZl Sr16W19aPC1sVvtu75uHmAVjN3l7+AYUQSS/0AkTelkRfSTI376sAIdzZLKzpaoEaRfa Xth2NUz69B11jlOsvirZbZ8ibUrL3NwEURyYFQ1OB5YNvRi+MN8UkE3XS4XW6DMyyvZK 9cJlbMUxyNZaF/VMMRmqqGxzKMwuvKpNNEMTDdA/0XP9bXsxelGTep/k5niDf2/AZo+9 VbnhMyazRYtYSYfbrvYsjJAyu8ctDNAf704ZqQUfUzlSyqq6NnUYESEV5qdwmChgpdNS ycBg== 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=Ar/tgfeW0mxAYhx21zHRX7b31hh3vv7QgOklm9uWtI0=; b=RaA2JYAGB5wkwAdqn1UBQHKftEn9Vp1QDOpJh88ZXujdoyShy8OO26N5C+bkjaiMh7 d0CaTE9AR6vt3nLR5z3rQa3WVa8eLoiswhT7Eyd63vcC8chJrQB7K7Ex1arZjCJf8XsY 4jCUb1BfbLF5esLenbrNMAp17lqGto5/oDF+YRA3kei7g/zjwNQIP3pdYCx9jrMi1yYa i9i8Rz1OEMU52We6LSyXJ2YFh9oYQVhBe9re1fedowEF+aFpJj89bVK4RRuNqnwiFHPn 9YcEh4JROfd/YvWDnW/rTFC1fn2bK7JPS8UFvT8ySdu3GDsMjnmn0NpY2xx34dNr/e39 xJvA== X-Gm-Message-State: AMCzsaXuhQZ7NHYHsI0zNAB+3DRb390kwPPWEL/JOhrBJWsr1cynvEbL SEWDgpDFZU+L5qgsClyoV0bNINo3rU53iOJWjvmvgA== X-Google-Smtp-Source: AOwi7QAW7b1CYNDjZA6bVqe+WAIYa0QnoGjClSEzDFuAG7mn5TBCHB93RjD07a3e1hrBPxMCaJwYsnT8Ze562SvGdPs= X-Received: by 10.107.185.7 with SMTP id j7mr8397262iof.221.1506615195101; Thu, 28 Sep 2017 09:13:15 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.2.194 with HTTP; Thu, 28 Sep 2017 09:13:14 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:191c:5e93:2feb:3c70] In-Reply-To: <30C7B916-C022-432B-BA12-F51536F7CC7D@van-laarhoven.org> References: <30C7B916-C022-432B-BA12-F51536F7CC7D@van-laarhoven.org> From: Warner Losh Date: Thu, 28 Sep 2017 10:13:14 -0600 X-Google-Sender-Auth: oJzI2Uo5MhCGNbbXGEX570j2StM Message-ID: Subject: Re: How do GEOM_PART_* options configure geom_part_* modules?? To: Nick Hibma Cc: 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 16:13:16 -0000 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