tuxonice_checksum.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * kernel/power/tuxonice_checksum.h
  3. *
  4. * Copyright (C) 2006-2014 Nigel Cunningham (nigel at tuxonice net)
  5. *
  6. * This file is released under the GPLv2.
  7. *
  8. * This file contains data checksum routines for TuxOnIce,
  9. * using cryptoapi. They are used to locate any modifications
  10. * made to pageset 2 while we're saving it.
  11. */
  12. #if defined(CONFIG_TOI_CHECKSUM)
  13. extern int toi_checksum_init(void);
  14. extern void toi_checksum_exit(void);
  15. void check_checksums(void);
  16. int allocate_checksum_pages(void);
  17. void free_checksum_pages(void);
  18. char *tuxonice_get_next_checksum(void);
  19. int tuxonice_calc_checksum(struct page *page, char *checksum_locn);
  20. #else
  21. static inline int toi_checksum_init(void) { return 0; }
  22. static inline void toi_checksum_exit(void) { }
  23. static inline void check_checksums(void) { };
  24. static inline int allocate_checksum_pages(void) { return 0; };
  25. static inline void free_checksum_pages(void) { };
  26. static inline char *tuxonice_get_next_checksum(void) { return NULL; };
  27. static inline int tuxonice_calc_checksum(struct page *page, char *checksum_locn)
  28. { return 0; }
  29. #endif