return _debug_level;
}
-
-void crypt_log(struct crypt_device *cd, int level, const char *msg)
-{
- if (cd && cd->log)
- cd->log(level, msg, cd->log_usrptr);
- else if (_default_log)
- _default_log(level, msg, NULL);
-}
-
static void crypt_set_error(struct crypt_device *cd, const char *error)
{
size_t size = strlen(error);
}
}
+void crypt_log(struct crypt_device *cd, int level, const char *msg)
+{
+ if (cd && cd->log)
+ cd->log(level, msg, cd->log_usrptr);
+ else if (_default_log)
+ _default_log(level, msg, NULL);
+
+ if (level == CRYPT_LOG_ERROR)
+ crypt_set_error(cd, msg);
+}
+
__attribute__((format(printf, 5, 6)))
void logger(struct crypt_device *cd, int level, const char *file,
int line, const char *format, ...)
} else if (_debug_level)
printf("# %s\n", target);
#endif
-
- if (level == CRYPT_LOG_ERROR)
- crypt_set_error(cd, target);
}
va_end(argp);