diff --git a/ChangeLog b/ChangeLog index 5ab22ff4..ad33aa72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-10-25 Milan Broz + * Print informative message in isLuks only in verbose mode. + +2011-10-10 Milan Broz + * Version 1.4.0-rc1. + 2011-10-05 Milan Broz * Support Nettle 2.4 crypto backend (for ripemd160). * If device is not rotational, do not use Gutmann wipe method. diff --git a/src/cryptsetup.c b/src/cryptsetup.c index 73f4c243..5d090ed0 100644 --- a/src/cryptsetup.c +++ b/src/cryptsetup.c @@ -191,6 +191,13 @@ static void _log(int level, const char *msg, void *usrptr __attribute__((unused) } } +static void _quiet_log(int level, const char *msg, void *usrptr) +{ + if (!opt_verbose && (level == CRYPT_LOG_ERROR || level == CRYPT_LOG_NORMAL)) + level = CRYPT_LOG_VERBOSE; + _log(level, msg, usrptr); +} + static void show_status(int errcode) { char error[256], *error_; @@ -863,6 +870,7 @@ static int action_isLuks(int arg __attribute__((unused))) if ((r = crypt_init(&cd, action_argv[0]))) goto out; + crypt_set_log_callback(cd, _quiet_log, NULL); r = crypt_load(cd, CRYPT_LUKS1, NULL); out: crypt_free(cd);