]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cryptsetup: also define crypt_token_max() as fallback locally, not just sym_crypt_tok...
authorLennart Poettering <lennart@poettering.net>
Fri, 8 Oct 2021 21:48:51 +0000 (23:48 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 8 Oct 2021 21:50:04 +0000 (23:50 +0200)
Our code that links directly against libcryptsetup, and doesn't use
dlopen() might want to use this fallback glue function too.

src/shared/cryptsetup-util.h

index 1bf9830a7daad2b68e44bcb3ba3e9d46dec5f773..ff44af84410c4715346c9f4d84ab9497b30274a3 100644 (file)
@@ -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);