diff options
author | David Seifert <soap@gentoo.org> | 2022-10-12 21:47:29 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-10-12 23:39:38 +0200 |
commit | d0523bb0d12766485fde3b87bb42db8dfc3c45d3 (patch) | |
tree | fad76a0d8afd127f5d04ded5ff8eaf35a5e8208a /src/gpt-auto-generator | |
parent | test: disable LSan in the ASan env wrapper (diff) | |
download | systemd-d0523bb0d12766485fde3b87bb42db8dfc3c45d3.tar.xz systemd-d0523bb0d12766485fde3b87bb42db8dfc3c45d3.zip |
gpt-auto: allow using without cryptsetup
Fixes #24978
Diffstat (limited to 'src/gpt-auto-generator')
-rw-r--r-- | src/gpt-auto-generator/gpt-auto-generator.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index 31377d877d..5584eb22af 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -571,11 +571,15 @@ static int add_root_rw(DissectedPartition *p) { #if ENABLE_EFI static int add_root_cryptsetup(void) { +#if HAVE_LIBCRYPTSETUP /* If a device /dev/gpt-auto-root-luks appears, then make it pull in systemd-cryptsetup-root.service, which * sets it up, and causes /dev/gpt-auto-root to appear which is all we are looking for. */ return add_cryptsetup("root", "/dev/gpt-auto-root-luks", true, false, NULL); +#else + return 0; +#endif } #endif |