mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-25 06:03:40 +03:00
gpt-auto-generator: don't generate systemd-cryptsetup@.service when --Dlibcryptsetup=false
This commit is contained in:
parent
22344fcfb9
commit
5b1375035b
@ -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) {
|
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_free_ char *e = NULL, *n = NULL, *d = NULL;
|
||||||
_cleanup_fclose_ FILE *f = NULL;
|
_cleanup_fclose_ FILE *f = NULL;
|
||||||
int r;
|
int r;
|
||||||
@ -182,6 +183,9 @@ static int add_cryptsetup(const char *id, const char *what, bool rw, bool requir
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
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(
|
static int add_mount(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user