mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Move internal structure definition to internal header file.
This commit is contained in:
committed by
Milan Broz
parent
082d23af92
commit
346f104f26
@@ -138,6 +138,30 @@ typedef struct {
|
||||
keyslot_repair_func repair;
|
||||
} keyslot_handler;
|
||||
|
||||
struct reenc_protection {
|
||||
enum { REENC_PROTECTION_NONE = 0, /* none should be 0 always */
|
||||
REENC_PROTECTION_CHECKSUM,
|
||||
REENC_PROTECTION_JOURNAL,
|
||||
REENC_PROTECTION_DATASHIFT } type;
|
||||
|
||||
union {
|
||||
struct {
|
||||
} none;
|
||||
struct {
|
||||
char hash[LUKS2_CHECKSUM_ALG_L];
|
||||
struct crypt_hash *ch;
|
||||
size_t hash_size;
|
||||
/* buffer for checksums */
|
||||
void *checksums;
|
||||
size_t checksums_len;
|
||||
size_t block_size;
|
||||
} csum;
|
||||
struct {
|
||||
uint64_t data_shift;
|
||||
} ds;
|
||||
} p;
|
||||
};
|
||||
|
||||
/* can not fit prototype alloc function */
|
||||
int reenc_keyslot_alloc(struct crypt_device *cd,
|
||||
struct luks2_hdr *hdr,
|
||||
|
||||
@@ -22,30 +22,6 @@
|
||||
#include "luks2_internal.h"
|
||||
#include "utils_device_locking.h"
|
||||
|
||||
struct reenc_protection {
|
||||
enum { REENC_PROTECTION_NONE = 0, /* none should be 0 always */
|
||||
REENC_PROTECTION_CHECKSUM,
|
||||
REENC_PROTECTION_JOURNAL,
|
||||
REENC_PROTECTION_DATASHIFT } type;
|
||||
|
||||
union {
|
||||
struct {
|
||||
} none;
|
||||
struct {
|
||||
char hash[LUKS2_CHECKSUM_ALG_L]; // or include luks.h
|
||||
struct crypt_hash *ch;
|
||||
size_t hash_size;
|
||||
/* buffer for checksums */
|
||||
void *checksums;
|
||||
size_t checksums_len;
|
||||
size_t block_size;
|
||||
} csum;
|
||||
struct {
|
||||
uint64_t data_shift;
|
||||
} ds;
|
||||
} p;
|
||||
};
|
||||
|
||||
struct luks2_reencrypt {
|
||||
/* reencryption window attributes */
|
||||
uint64_t offset;
|
||||
|
||||
Reference in New Issue
Block a user