scoutfs: add 64bit endian swapping helper

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2017-11-15 08:47:26 -08:00
committed by Mark Fasheh
parent 77f25a71d5
commit 413953adbd

View File

@@ -1,9 +1,11 @@
#ifndef _SCOUTFS_ENDIAN_SWAP_H_
#define _SCOUTFS_ENDIAN_SWAP_H_
#define le64_to_be64(x) cpu_to_be64(le64_to_cpu(x))
#define le32_to_be32(x) cpu_to_be32(le32_to_cpu(x))
#define le16_to_be16(x) cpu_to_be16(le16_to_cpu(x))
#define be64_to_le64(x) cpu_to_le64(be64_to_cpu(x))
#define be32_to_le32(x) cpu_to_le32(be32_to_cpu(x))
#define be16_to_le16(x) cpu_to_le16(be16_to_cpu(x))