suspend-default-compress.diff 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Index: suspend.c
  2. ===================================================================
  3. --- suspend.c.orig
  4. +++ suspend.c
  5. @@ -1768,13 +1768,15 @@ int main(int argc, char *argv[])
  6. if (compute_checksum != 'y' && compute_checksum != 'Y')
  7. compute_checksum = 0;
  8. #ifdef CONFIG_COMPRESS
  9. - if (do_compress != 'y' && do_compress != 'Y') {
  10. + if (do_compress != 'n' && do_compress != 'N') {
  11. + do_compress = 1;
  12. + if (lzo_init() != LZO_E_OK) {
  13. + suspend_error("Failed to initialize LZO. "
  14. + "Compression disabled.\n");
  15. + do_compress = 0;
  16. + }
  17. + } else
  18. do_compress = 0;
  19. - } else if (lzo_init() != LZO_E_OK) {
  20. - suspend_error("Failed to initialize LZO. "
  21. - "Compression disabled.\n");
  22. - do_compress = 0;
  23. - }
  24. #endif
  25. #ifdef CONFIG_ENCRYPT
  26. if (do_encrypt != 'y' && do_encrypt != 'Y')
  27. Index: conf/suspend.conf
  28. ===================================================================
  29. --- conf/suspend.conf.orig
  30. +++ conf/suspend.conf
  31. @@ -25,7 +25,7 @@
  32. ## Debugging option, default n
  33. #compute checksum = y
  34. #
  35. -## compression will often speed up suspend and resume (default n)
  36. +## compression will often speed up suspend and resume (default y)
  37. #compress = n
  38. #
  39. ## encryption support is rather basic right now - e.g. USB keyboards will not