]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/crypt-util.c
pkgconfig: define variables relative to ${prefix}/${rootprefix}/${sysconfdir}
[thirdparty/systemd.git] / src / basic / crypt-util.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
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) {
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);
27 }
28 #endif