/drivers/s390/crypto/zcrypt_debug.h

https://github.com/minipli/linux-unofficial_grsec · C Header · 29 lines · 16 code · 8 blank · 5 comment · 0 complexity · 67699bde4fa55a320091f43c9b54706b MD5 · raw file

  1. /*
  2. * Copyright IBM Corp. 2016
  3. * Author(s): Holger Dengler (hd@linux.vnet.ibm.com)
  4. * Harald Freudenberger <freude@de.ibm.com>
  5. */
  6. #ifndef ZCRYPT_DEBUG_H
  7. #define ZCRYPT_DEBUG_H
  8. #include <asm/debug.h>
  9. #define DBF_ERR 3 /* error conditions */
  10. #define DBF_WARN 4 /* warning conditions */
  11. #define DBF_INFO 5 /* informational */
  12. #define DBF_DEBUG 6 /* for debugging only */
  13. #define RC2ERR(rc) ((rc) ? DBF_ERR : DBF_INFO)
  14. #define RC2WARN(rc) ((rc) ? DBF_WARN : DBF_INFO)
  15. #define DBF_MAX_SPRINTF_ARGS 5
  16. #define ZCRYPT_DBF(...) \
  17. debug_sprintf_event(zcrypt_dbf_info, ##__VA_ARGS__)
  18. extern debug_info_t *zcrypt_dbf_info;
  19. int zcrypt_debug_init(void);
  20. void zcrypt_debug_exit(void);
  21. #endif /* ZCRYPT_DEBUG_H */