From: Ivan Shapovalov Date: Sat, 6 Jul 2019 10:51:23 +0000 (+0300) Subject: cryptsetup: enable libcryptsetup debug logging if we want it X-Git-Tag: v243-rc1~180^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=568a84048e7140223df46cfd581e75b4c0633079;p=thirdparty%2Fsystemd.git cryptsetup: enable libcryptsetup debug logging if we want it Even if we set a log callback that would accept debug messages, libcryptsetup needs debug logging enabled explicitly for it to happen. --- diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 54c787857d6..02f131086bd 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -638,6 +638,10 @@ static int run(int argc, char *argv[]) { log_setup_service(); crypt_set_log_callback(NULL, cryptsetup_log_glue, NULL); + if (DEBUG_LOGGING) + /* libcryptsetup won't even consider debug messages by default */ + crypt_set_debug_level(CRYPT_DEBUG_ALL); + umask(0022); if (streq(argv[1], "attach")) {