projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
634c0e5
)
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>
Sat, 15 May 2021 17:29:49 +0000
(19:29 +0200)
(cherry picked from commit
5b1375035b617bbee8b22a997be527d1b7a392f8
)
(cherry picked from commit
aa6b8490870d3a793becf41cc63479043a934a73
)
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 f9d0ca54214749a2ce6f94ad6c43d04158d16c77..d8bd1679c2e4167d3ef717ca338d14cd3072c380 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(