b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 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 | |
| 8 | Fix mkfs not creating UUIDs for new filesystems. |
| 9 | |
| 10 | Thanks to Lars Noodén for reporting the bug at |
| 11 | <https://bugs.launchpad.net/bugs/737002>. |
| 12 | |
| 13 | This closes LP: #737002. |
| 14 | --- |
| 15 | include/missing.h | 8 +++++++- |
| 16 | 1 file changed, 7 insertions(+), 1 deletion(-) |
| 17 | |
| 18 | --- a/include/missing.h |
| 19 | +++ b/include/missing.h |
| 20 | @@ -71,7 +71,7 @@ |
| 21 | #define NAME_MAX 255 |
| 22 | |
| 23 | /* Byteswap stuff */ |
| 24 | -#define NXSwapHostLongToBig(x) cpu_to_be64(x) |
| 25 | +#define NXSwapHostLongToBig(x) cpu_to_be32(x) |
| 26 | #define NXSwapBigShortToHost(x) be16_to_cpu(x) |
| 27 | #define OSSwapBigToHostInt16(x) be16_to_cpu(x) |
| 28 | #define NXSwapBigLongToHost(x) be32_to_cpu(x) |
| 29 | @@ -87,6 +87,9 @@ |
| 30 | #ifndef be32_to_cpu |
| 31 | #define be32_to_cpu(x) bswap_32(x) |
| 32 | #endif |
| 33 | +#ifndef cpu_to_be32 |
| 34 | +#define cpu_to_be32(x) bswap_32(x) |
| 35 | +#endif |
| 36 | #ifndef be64_to_cpu |
| 37 | #define be64_to_cpu(x) bswap_64(x) |
| 38 | #endif |
| 39 | @@ -101,6 +104,9 @@ |
| 40 | #ifndef be32_to_cpu |
| 41 | #define be32_to_cpu(x) (x) |
| 42 | #endif |
| 43 | +#ifndef cpu_to_be32 |
| 44 | +#define cpu_to_be32(x) (x) |
| 45 | +#endif |
| 46 | #ifndef be64_to_cpu |
| 47 | #define be64_to_cpu(x) (x) |
| 48 | #endif |