SHA256
1
0
forked from pool/bcache-tools
bcache-tools/0005-bcache-tools-bitwise.h-more-swap-bitwise-for-differe.patch
Jan Engelhardt 3dff4d17f4 Accepting request 841483 from home:colyli:branches:filesystems
- Remove dependence of smartcols bcache-tools.spec, bcache-tools
  code doesn't need it now. (jsc#SLE-9807)
- Remove 1001-udev-do-not-rely-on-DRIVER-variable.patch because
  we have 0013-bcache-tools-Export-CACHED_UUID-and-CACHED_LABEL.patch
  to provide static UUIDs. (jsc#SLE-9807)
- bcache-tools: add man page bcache-status.8 (jsc#SLE-9807)
  0017-bcache-tools-add-man-page-bcache-status.8.patch
- bcache-tools: add bcache-status (jsc#SLE-9807)
  0016-bcache-tools-add-bcache-status.patch
- bcache-tools: make: permit only one cache device to be
  specified (jsc#SLE-9807)
  0015-bcache-tools-make-permit-only-one-cache-device-to-be.patch
- bcache-tools: Remove the dependency on libsmartcols
  (jsc#SLE-9807)
  0014-bcache-tools-Remove-the-dependency-on-libsmartcols.patch
- bcache-tools: Export CACHED_UUID and CACHED_LABEL
  (jsc#SLE-9807)
  0013-bcache-tools-Export-CACHED_UUID-and-CACHED_LABEL.patch
- bcache-tools: Fix potential coredump issues (jsc#SLE-9807)
  0012-bcache-tools-Fix-potential-coredump-issues.patch
- bcache-tools: add print_cache_set_supported_feature_sets()
  in lib.c (jsc#SLE-9807)
  0011-bcache-tools-add-print_cache_set_supported_feature_s.patch
- bcache-tools: add large_bucket incompat feature (jsc#SLE-9807)
  0010-bcache-tools-add-large_bucket-incompat-feature.patch
- bcache-tools: upgrade super block versions for feature sets
  (jsc#SLE-9807)
  0009-bcache-tools-upgrade-super-block-versions-for-featur.patch
- bcache-tools: define separated super block for in-memory and
  on-disk format (jsc#SLE-9807)

OBS-URL: https://build.opensuse.org/request/show/841483
OBS-URL: https://build.opensuse.org/package/show/filesystems/bcache-tools?expand=0&rev=27
2020-10-30 14:10:22 +00:00

49 lines
1.3 KiB
Diff

From 45d1412ee834b062a03b42596ee945d9916d3242 Mon Sep 17 00:00:00 2001
From: Coly Li <colyli@suse.de>
Date: Sun, 16 Aug 2020 23:41:32 +0800
Subject: [PATCH 05/17] bcache-tools: bitwise.h: more swap bitwise for
different CPU endians
Git-commit: 45d1412ee834b062a03b42596ee945d9916d3242
Patch-mainline: bcache-tools-1.1
References: jsc#SLE-9807
This patch adds more swap routines to bitwise.h,
le16_to_cpu()
le32_to_cpu()
le64_to_cpu()
Signed-off-by: Coly Li <colyli@suse.de>
---
bitwise.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/bitwise.h b/bitwise.h
index 968002f..1194b27 100644
--- a/bitwise.h
+++ b/bitwise.h
@@ -45,11 +45,21 @@
#define cpu_to_le16(val) ((__le16)(val))
#define cpu_to_le32(val) ((__le32)(val))
#define cpu_to_le64(val) ((__le64)(val))
+
+#define le16_to_cpu(val) ((__le16)(val))
+#define le32_to_cpu(val) ((__le32)(val))
+#define le64_to_cpu(val) ((__le64)(val))
+
#else
/* For big endian */
#define cpu_to_le16(val) ((__be16)__swab16((__u16)(val)))
#define cpu_to_le32(val) ((__be32)__swab32((__u32)(val)))
#define cpu_to_le64(val) ((__be64)__swab64((__u64)(val)))
+
+#define le16_to_cpu(val) ((__be16)__swab16((__u16)(val)))
+#define le32_to_cpu(val) ((__be32)__swab32((__u32)(val)))
+#define le64_to_cpu(val) ((__be64)__swab64((__u64)(val)))
+
#endif
#endif
--
2.26.2