From owner-freebsd-current@freebsd.org Thu Sep 28 16:00:46 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 64022E0239A for ; Thu, 28 Sep 2017 16:00:46 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from valery.hibma.org (valery.hibma.org [178.21.114.54]) by mx1.freebsd.org (Postfix) with ESMTP id C7F4B63E7A for ; Thu, 28 Sep 2017 16:00:45 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from [IPv6:2001:980:530a:1:d199:f536:37f0:a864] (unknown [IPv6:2001:980:530a:1:d199:f536:37f0:a864]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by valery.hibma.org (Postfix) with ESMTPSA id 3008F6E0A17; Thu, 28 Sep 2017 18:00:44 +0200 (CEST) From: Nick Hibma Message-Id: <30C7B916-C022-432B-BA12-F51536F7CC7D@van-laarhoven.org> Content-Type: multipart/signed; boundary="Apple-Mail=_9577C347-7CF2-41EC-8029-473806168AC8"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: How do GEOM_PART_* options configure geom_part_* modules?? Date: Thu, 28 Sep 2017 18:00:43 +0200 In-Reply-To: Cc: FreeBSD Current Mailing List To: Warner Losh References: X-Mailer: Apple Mail (2.3273) 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:00:46 -0000 --Apple-Mail=_9577C347-7CF2-41EC-8029-473806168AC8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii >> 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). >>=20 >> 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! >>=20 >=20 > The module always build them because they are listed in the module's > Makefile. >=20 > 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 >=20 > which turn on/off which files get included. config "helpfully" = converts the > upper case options to lower case for this. >=20 > 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 ... Thanks, Warner. Nick --Apple-Mail=_9577C347-7CF2-41EC-8029-473806168AC8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 Comment: GPGTools - https://gpgtools.org iQIzBAEBCgAdFiEETFbRZ/gKjBgO10CrH3Ic7sY0duAFAlnNHKsACgkQH3Ic7sY0 duBQRg/+PfO2q/GcbDsinZUz9dODAIl29H9Tk/JPYdT2itrd4+MyYKpP0GYLQamE QktYP+3rmonZsK4bw3iTEiZyegb+3gSXR7C6WP/yZT5Nw4oejKeCfibEyauSiIxl 1CvT1ux0aGUQOH3QNBCts3N5ULWYwGzU7KRboSdeyq8Gqe+/fb51/06LXMJSh1Mr cWcrN5OSPXW/fd2zpvb2gb3CCCBxIMzM+FAeIGGcN5gGrckxW6wmwp/JNh58Y3jZ yvHWMicjMrMTGBpxpKy3X0KydrPlI8v1UMOdhgx+A3EzUNS082TQ189thiVE1iqU PreTd06m9+Tex4dr2LJXgECvdKQnNEpNzzciz2BtWtR75vOr4SKLZex6smZ5CQmt pazrTNcXQMoJ/2xWDBeRm6uV53Np8YbcrPHz+Y7VLp1X4PCcKBzcPoGS7iVkr4Up j/HO3ZIWJVDgB4LpU+/OWd5vNUdS5t296PakjfKjYp3d2He4zi74bnHe3h9J+J17 ApSiBTeYa8kzTMVgvaeEPJBGu/gE1fJ2aQNqiq5WvflDzaSaU2DdPw7agUx2MfpL 82YTHimTujJ6TNGMFOzqUP1VgAIq6OKctDwXRmml8yNNzI5U871GxCWVkwnVQYJc r00jIo/JnPYV+32/TIzXmrc7/T5VStWmNR85h8O4kUfXE/JE+wA= =55js -----END PGP SIGNATURE----- --Apple-Mail=_9577C347-7CF2-41EC-8029-473806168AC8--