]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/cryptsetup-util.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
4 #include "cryptsetup-util.h"
7 static void cryptsetup_log_glue(int level
, const char *msg
, void *usrptr
) {
15 case CRYPT_LOG_VERBOSE
:
22 log_error("Unknown libcryptsetup log level: %d", level
);
26 log_full(level
, "%s", msg
);
29 void cryptsetup_enable_logging(struct crypt_device
*cd
) {
30 crypt_set_log_callback(cd
, cryptsetup_log_glue
, NULL
);
31 crypt_set_debug_level(DEBUG_LOGGING
? CRYPT_DEBUG_ALL
: CRYPT_DEBUG_NONE
);