projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3b4eba
)
shared/dissect-image: adapt to LUKS2 format
author
Ondrej Kozina
<okozina@redhat.com>
Fri, 13 Oct 2017 13:27:30 +0000
(15:27 +0200)
committer
Ondrej Kozina
<okozina@redhat.com>
Fri, 13 Oct 2017 13:30:05 +0000
(15:30 +0200)
Load any LUKS format available (and recognized) by libcryptsetup
src/shared/dissect-image.c
patch
|
blob
|
history
diff --git
a/src/shared/dissect-image.c
b/src/shared/dissect-image.c
index
4b59f2c
..
258e8ca
100644
(file)
--- a/
src/shared/dissect-image.c
+++ b/
src/shared/dissect-image.c
@@
-19,6
+19,9
@@
#if HAVE_LIBCRYPTSETUP
#include <libcryptsetup.h>
+#ifndef CRYPT_LUKS
+#define CRYPT_LUKS NULL
+#endif
#endif
#include <sys/mount.h>
@@
-843,7
+846,7
@@
static int decrypt_partition(
if (r < 0)
return log_debug_errno(r, "Failed to initialize dm-crypt: %m");
- r = crypt_load(cd, CRYPT_LUKS
1
, NULL);
+ r = crypt_load(cd, CRYPT_LUKS, NULL);
if (r < 0) {
log_debug_errno(r, "Failed to load LUKS metadata: %m");
goto fail;