Add crypt_reencrypt_run superseding now deprecated crypt_reencrypt.

This reverts commit 367cb7a761
and retains original crypt_reencrypt() symbol marked as deprecated
in favour of new crypt_reencrypt_run(). This makes cryptsetup 2.4.0
release fully backward compatible.
This commit is contained in:
Ondrej Kozina
2021-07-22 12:45:56 +02:00
parent 82816cb52f
commit 06f132066b
5 changed files with 45 additions and 32 deletions

View File

@@ -3327,8 +3327,7 @@ static int reencrypt_teardown(struct crypt_device *cd, struct luks2_hdr *hdr,
return r;
}
CRYPT_SYMBOL_EXPORT_NEW(int, crypt_reencrypt, 2, 4,
/* crypt_reencrypt parameters follows */
int crypt_reencrypt_run(
struct crypt_device *cd,
int (*progress)(uint64_t size, uint64_t offset, void *usrptr),
void *usrptr)
@@ -3392,12 +3391,11 @@ CRYPT_SYMBOL_EXPORT_NEW(int, crypt_reencrypt, 2, 4,
return r;
}
CRYPT_SYMBOL_EXPORT_OLD(int, crypt_reencrypt, 2, 0,
/* crypt_reencrypt parameters follows */
int crypt_reencrypt(
struct crypt_device *cd,
int (*progress)(uint64_t size, uint64_t offset, void *usrptr))
{
return crypt_reencrypt(cd, progress, NULL);
return crypt_reencrypt_run(cd, progress, NULL);
}
static int reencrypt_recovery(struct crypt_device *cd,