afsplitter: Move into its own module

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 <ps@pks.im>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Patrick Steinhardt 2019-12-27 16:18:37 +01:00 committed by Daniel Kiper
parent 9fbdec2f6b
commit 5324c335b1
2 changed files with 8 additions and 1 deletions

View File

@ -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 = {

View File

@ -21,9 +21,12 @@
*/
#include <grub/crypto.h>
#include <grub/dl.h>
#include <grub/mm.h>
#include <grub/misc.h>
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);