mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey-cryptsetup: Support debug level CRYPT_DEBUG_JSON
With libcryptsetup version 2.1 a new debug level was introduced to log the JSON structures when adding key slots, digests, etc into the LUKS2 header. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
951bd1ae54
commit
ec9c67189e
+10
-1
@@ -421,6 +421,11 @@ static void cryptsetup_log(int level, const char *msg,
|
||||
case CRYPT_LOG_DEBUG:
|
||||
fprintf(stderr, "%s: # %s\n", program_invocation_short_name, msg);
|
||||
break;
|
||||
#ifdef CRYPT_DEBUG_JSON
|
||||
case CRYPT_DEBUG_JSON:
|
||||
fprintf(stderr, "%s\n", msg);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
warnx("Internal error on logging class for msg: %s", msg);
|
||||
break;
|
||||
@@ -2278,7 +2283,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
crypt_set_log_callback(NULL, cryptsetup_log, NULL);
|
||||
if (g.debug)
|
||||
crypt_set_debug_level(-1);
|
||||
#ifdef CRYPT_DEBUG_JSON
|
||||
crypt_set_debug_level(CRYPT_DEBUG_JSON);
|
||||
#else
|
||||
crypt_set_debug_level(CRYPT_DEBUG_ALL);
|
||||
#endif
|
||||
|
||||
if (command->open_device) {
|
||||
if (g.pos_arg == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user