0012-Fix-mkfs-not-creating-UUIDs-for-new-filesystems.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From: Matthew Garrett <mjg59@codon.org.uk>
  2. Date: Thu, 24 Oct 2013 01:11:22 -0200
  3. Subject: Fix mkfs not creating UUIDs for new filesystems.
  4. MIME-Version: 1.0
  5. Content-Type: text/plain; charset=UTF-8
  6. Content-Transfer-Encoding: 8bit
  7. Fix mkfs not creating UUIDs for new filesystems.
  8. Thanks to Lars Noodén for reporting the bug at
  9. <https://bugs.launchpad.net/bugs/737002>.
  10. This closes LP: #737002.
  11. ---
  12. include/missing.h | 8 +++++++-
  13. 1 file changed, 7 insertions(+), 1 deletion(-)
  14. diff --git a/include/missing.h b/include/missing.h
  15. index 0a859c4..f50e8fb 100644
  16. --- a/include/missing.h
  17. +++ b/include/missing.h
  18. @@ -72,7 +72,7 @@
  19. #define NAME_MAX 255
  20. /* Byteswap stuff */
  21. -#define NXSwapHostLongToBig(x) cpu_to_be64(x)
  22. +#define NXSwapHostLongToBig(x) cpu_to_be32(x)
  23. #define NXSwapBigShortToHost(x) be16_to_cpu(x)
  24. #define OSSwapBigToHostInt16(x) be16_to_cpu(x)
  25. #define NXSwapBigLongToHost(x) be32_to_cpu(x)
  26. @@ -88,6 +88,9 @@
  27. #ifndef be32_to_cpu
  28. #define be32_to_cpu(x) bswap_32(x)
  29. #endif
  30. +#ifndef cpu_to_be32
  31. +#define cpu_to_be32(x) bswap_32(x)
  32. +#endif
  33. #ifndef be64_to_cpu
  34. #define be64_to_cpu(x) bswap_64(x)
  35. #endif
  36. @@ -102,6 +105,9 @@
  37. #ifndef be32_to_cpu
  38. #define be32_to_cpu(x) (x)
  39. #endif
  40. +#ifndef cpu_to_be32
  41. +#define cpu_to_be32(x) (x)
  42. +#endif
  43. #ifndef be64_to_cpu
  44. #define be64_to_cpu(x) (x)
  45. #endif