projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22344fc
)
gpt-auto-generator: don't generate systemd-cryptsetup@.service when --Dlibcryptsetup...
author
gaoyi
<ymuemc@163.com>
Tue, 6 Apr 2021 02:44:33 +0000
(10:44 +0800)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Fri, 9 Apr 2021 15:18:09 +0000
(17:18 +0200)
src/gpt-auto-generator/gpt-auto-generator.c
patch
|
blob
|
history
diff --git
a/src/gpt-auto-generator/gpt-auto-generator.c
b/src/gpt-auto-generator/gpt-auto-generator.c
index dda9b1881581b058b07907e8c05bca0159908877..42549a2cd8c6785c864767433fc30376b175b2ff 100644
(file)
--- a/
src/gpt-auto-generator/gpt-auto-generator.c
+++ b/
src/gpt-auto-generator/gpt-auto-generator.c
@@
-105,6
+105,7
@@
static int open_parent_block_device(dev_t devnum, int *ret_fd) {
}
static int add_cryptsetup(const char *id, const char *what, bool rw, bool require, char **device) {
+#if HAVE_LIBCRYPTSETUP
_cleanup_free_ char *e = NULL, *n = NULL, *d = NULL;
_cleanup_fclose_ FILE *f = NULL;
int r;
@@
-182,6
+183,9
@@
static int add_cryptsetup(const char *id, const char *what, bool rw, bool requir
}
return 0;
+#else
+ return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Partition is encrypted, but the project was compiled without libcryptsetup support");
+#endif
}
static int add_mount(