summaryrefslogtreecommitdiff
path: root/src/shared/cryptsetup-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-10-08 23:48:51 +0200
committerLennart Poettering <lennart@poettering.net>2021-10-08 23:50:04 +0200
commit4a09a677551e47f51d6444565e3d98b4b8023c09 (patch)
treeebb569e109af61652257e482b02ff00b13e4c419 /src/shared/cryptsetup-util.h
parentb98416e1002bccfa2cf576a290d321fdf1ce254e (diff)
downloadsystemd-4a09a677551e47f51d6444565e3d98b4b8023c09.tar.gz
cryptsetup: also define crypt_token_max() as fallback locally, not just sym_crypt_token_max()
Our code that links directly against libcryptsetup, and doesn't use dlopen() might want to use this fallback glue function too.
Diffstat (limited to 'src/shared/cryptsetup-util.h')
-rw-r--r--src/shared/cryptsetup-util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/cryptsetup-util.h b/src/shared/cryptsetup-util.h
index 1bf9830a7d..ff44af8441 100644
--- a/src/shared/cryptsetup-util.h
+++ b/src/shared/cryptsetup-util.h
@@ -54,11 +54,12 @@ extern int (*sym_crypt_token_json_set)(struct crypt_device *cd, int token, const
extern int (*sym_crypt_token_max)(const char *type);
#else
/* As a fallback, use the same hard-coded value libcryptsetup uses internally. */
-static inline int sym_crypt_token_max(_unused_ const char *type) {
+static inline int crypt_token_max(_unused_ const char *type) {
assert(streq(type, CRYPT_LUKS2));
return 32;
}
+#define sym_crypt_token_max(type) crypt_token_max(type)
#endif
extern crypt_token_info (*sym_crypt_token_status)(struct crypt_device *cd, int token, const char **type);
extern int (*sym_crypt_volume_key_get)(struct crypt_device *cd, int keyslot, char *volume_key, size_t *volume_key_size, const char *passphrase, size_t passphrase_size);