]>
Commit | Line | Data |
---|---|---|
58f21e63 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
691c2e2e ZJS |
2 | |
3 | #if HAVE_LIBCRYPTSETUP | |
4 | #include "crypt-util.h" | |
5 | #include "log.h" | |
6 | ||
7 | void cryptsetup_log_glue(int level, const char *msg, void *usrptr) { | |
aa2cc005 JJ |
8 | switch (level) { |
9 | case CRYPT_LOG_NORMAL: | |
10 | level = LOG_NOTICE; | |
11 | break; | |
12 | case CRYPT_LOG_ERROR: | |
13 | level = LOG_ERR; | |
14 | break; | |
15 | case CRYPT_LOG_VERBOSE: | |
16 | level = LOG_INFO; | |
17 | break; | |
18 | case CRYPT_LOG_DEBUG: | |
19 | level = LOG_DEBUG; | |
20 | break; | |
21 | default: | |
22 | log_error("Unknown libcryptsetup log level: %d", level); | |
23 | level = LOG_ERR; | |
24 | } | |
25 | ||
26 | log_full(level, "%s", msg); | |
691c2e2e ZJS |
27 | } |
28 | #endif |