From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1ikrNn-0002jF-MC for mharc-grub-devel@gnu.org; Fri, 27 Dec 2019 10:18:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48970) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikrNk-0002fD-9A for grub-devel@gnu.org; Fri, 27 Dec 2019 10:18:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ikrNi-000086-B8 for grub-devel@gnu.org; Fri, 27 Dec 2019 10:18:28 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:55647) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ikrNi-00007x-7J for grub-devel@gnu.org; Fri, 27 Dec 2019 10:18:26 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id F150D21FE6; Fri, 27 Dec 2019 10:18:25 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 27 Dec 2019 10:18:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=Ry3+TXhqP+t7i lkdgRSth3osxR309lrH6YHmqqhsZzs=; b=Wry9NmcOf3IyRppTgtXKGIPWtey7h +IbAzo2nvl81G9xZOyRoSWMlQYBaPa4iJ2p1PBIkiGx1VYhCHMg3uYMkQbFZ3UGH eN5pLpHY6Er6fC2ERMDf2574V0Td7Z+ACC9tXVqwuWh4IEKsCJ3XVdyQ7AiWDwk2 z4LyV4YMGa5iBPisLBiZHcrOJu3g2kjKKO0UtIU/asfbHaDuQQNGG/5esbOwRWVz T8VcjuOFSgrVRqYuG9hi/qF3B+v3eytB4g9WnNIV8QEk+E3ZD+5dYQv/OoAPqN7Q zBszkyedU6oSbvXIW4y8T5/tJDUFgqc2ldF8sRwghdKuOP2xTpRToRFhQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=Ry3+TXhqP+t7ilkdgRSth3osxR309lrH6YHmqqhsZzs=; b=FPVu14GK ffANS1mam3ssqAOhUYzl+lrhurtYnFO17cWedLYM1U0w1hz8G3QPikkBqKgREei2 /8d9UvJCf6SgIKTdaidqHFFhjHu46ycmQA8inbd39eRfTe/2E1RxI/ZlIFFNkuCl 2m0rCE4oeq9QxK2viI++gV4YcGBV925PS3jj4RrSDkH8CCWl3iH26M3z2woNIcsw 965tv4oTM/F2m2TBs35F/mtIUsrFr+8bvpGzTOWX0Ect8+QkJ/maadpS66+JmeeO YGGyL5EqUagNudYAGJ8lXWPlfsyCArK5f5d5S8oaqKcQaWu3Bz+KrqQ+Nl8GyNEr 7nzv1Hxj9co8bA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvddvkedgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefrrghtrhhi tghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucfkphepkeelrdduvd drudeifedrgeelnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdrihhmnecu vehluhhsthgvrhfuihiivgepud X-ME-Proxy: Received: from vm-mail (x590ca331.dyn.telefonica.de [89.12.163.49]) by mail.messagingengine.com (Postfix) with ESMTPA id 358EB80065; Fri, 27 Dec 2019 10:18:25 -0500 (EST) Received: from localhost ( [10.192.0.11]) by vm-mail (OpenSMTPD) with ESMTPSA id 4513c895 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2019 15:18:21 +0000 (UTC) From: Patrick Steinhardt To: grub-devel@gnu.org Cc: Patrick Steinhardt , Daniel Kiper , Daniel Kiper Subject: [PATCH v7 4/6] afsplitter: Move into its own module Date: Fri, 27 Dec 2019 16:18:37 +0100 Message-Id: X-Mailer: git-send-email 2.24.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.26 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 15:18:29 -0000 While the AFSplitter code is currently used only by the luks module, upcoming support for luks2 will add a second module that depends on it. To avoid any linker errors when adding the code to both modules because of duplicated symbols, this commit moves it into its own standalone module "afsplitter" as a preparatory step. Signed-off-by: Patrick Steinhardt Reviewed-by: Daniel Kiper --- grub-core/Makefile.core.def | 6 +++++- grub-core/disk/AFSplitter.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index 037de4023..db346a9f4 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -1181,10 +1181,14 @@ module = { common = lib/json/json.c; }; +module = { + name = afsplitter; + common = disk/AFSplitter.c; +}; + module = { name = luks; common = disk/luks.c; - common = disk/AFSplitter.c; }; module = { diff --git a/grub-core/disk/AFSplitter.c b/grub-core/disk/AFSplitter.c index f5a8ddc61..249163ff0 100644 --- a/grub-core/disk/AFSplitter.c +++ b/grub-core/disk/AFSplitter.c @@ -21,9 +21,12 @@ */ #include +#include #include #include +GRUB_MOD_LICENSE ("GPLv2+"); + gcry_err_code_t AF_merge (const gcry_md_spec_t * hash, grub_uint8_t * src, grub_uint8_t * dst, grub_size_t blocksize, grub_size_t blocknumbers); -- 2.24.1