From 08cb76bbfd8e5c0af4857a440cf4d14ac3742993 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Sat, 4 Jul 2020 11:31:12 +0200 Subject: [PATCH] Do not expose json_object in luks2.h. Later we can use different implementation of JSON parser. Also define structs in one place. --- lib/luks2/luks2.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/luks2/luks2.h b/lib/luks2/luks2.h index a17f341b..70161aa6 100644 --- a/lib/luks2/luks2.h +++ b/lib/luks2/luks2.h @@ -59,9 +59,10 @@ #define LUKS2_REENCRYPT_MAX_HOTZONE_LENGTH 0x40000000 struct device; -struct json_object; struct luks2_reenc_context; struct crypt_lock_handle; +struct crypt_dm_active_device; +struct luks_phdr; /* LUKS1 for conversion */ /* * LUKS2 header on-disk. @@ -107,7 +108,7 @@ struct luks2_hdr { uint8_t salt1[LUKS2_SALT_L]; uint8_t salt2[LUKS2_SALT_L]; char uuid[LUKS2_UUID_L]; - struct json_object *jobj; + void *jobj; }; struct luks2_keyslot_params { @@ -330,8 +331,6 @@ int LUKS2_activate_multi(struct crypt_device *cd, uint64_t device_size, uint32_t flags); -struct crypt_dm_active_device; - int LUKS2_deactivate(struct crypt_device *cd, const char *name, struct luks2_hdr *hdr, @@ -399,7 +398,6 @@ int LUKS2_volume_key_load_in_keyring_by_keyslot(struct crypt_device *cd, int LUKS2_volume_key_load_in_keyring_by_digest(struct crypt_device *cd, struct luks2_hdr *hdr, struct volume_key *vk, int digest); -struct luks_phdr; int LUKS2_luks1_to_luks2(struct crypt_device *cd, struct luks_phdr *hdr1, struct luks2_hdr *hdr2);