diff options
author | David Teigland <teigland@redhat.com> | 2015-06-16 16:46:13 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2015-06-23 17:08:54 -0500 |
commit | d148f3e385bac58eaf59f29eb3ddb41929e1c3a7 (patch) | |
tree | 67ee6d46dcd2921ac8d38394d23fa1d5e498f07c | |
parent | f341facf066598526dbb2a458c3633931a67a339 (diff) | |
download | lvm2-d148f3e385bac58eaf59f29eb3ddb41929e1c3a7.tar.gz |
lvmlockd: use lib xlate for endian conversion
-rw-r--r-- | daemons/lvmlockd/lvmlockd-dlm.c | 1 | ||||
-rw-r--r-- | daemons/lvmlockd/lvmlockd-internal.h | 18 | ||||
-rw-r--r-- | daemons/lvmlockd/lvmlockd-sanlock.c | 1 |
3 files changed, 2 insertions, 18 deletions
diff --git a/daemons/lvmlockd/lvmlockd-dlm.c b/daemons/lvmlockd/lvmlockd-dlm.c index 5187a3548..04336fd66 100644 --- a/daemons/lvmlockd/lvmlockd-dlm.c +++ b/daemons/lvmlockd/lvmlockd-dlm.c @@ -34,6 +34,7 @@ #include "configure.h" #include "daemon-server.h" #include "daemon-log.h" +#include "xlate.h" #include "lvmlockd-internal.h" #include "lvmlockd-client.h" diff --git a/daemons/lvmlockd/lvmlockd-internal.h b/daemons/lvmlockd/lvmlockd-internal.h index 50dc53126..f5f7a399c 100644 --- a/daemons/lvmlockd/lvmlockd-internal.h +++ b/daemons/lvmlockd/lvmlockd-internal.h @@ -241,24 +241,6 @@ int lm_data_size_sanlock(void); int lm_is_running_sanlock(void); int lm_find_free_lock_sanlock(struct lockspace *ls, uint64_t *free_offset); -#if __BYTE_ORDER == __BIG_ENDIAN -#define le16_to_cpu(x) (bswap_16((x))) -#define le32_to_cpu(x) (bswap_32((x))) -#define le64_to_cpu(x) (bswap_64((x))) -#define cpu_to_le16(x) (bswap_16((x))) -#define cpu_to_le32(x) (bswap_32((x))) -#define cpu_to_le64(x) (bswap_64((x))) -#endif - -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define le16_to_cpu(x) (x) -#define le32_to_cpu(x) (x) -#define le64_to_cpu(x) (x) -#define cpu_to_le16(x) (x) -#define cpu_to_le32(x) (x) -#define cpu_to_le64(x) (x) -#endif - #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) diff --git a/daemons/lvmlockd/lvmlockd-sanlock.c b/daemons/lvmlockd/lvmlockd-sanlock.c index 4c040f5d5..fa7ad8ab2 100644 --- a/daemons/lvmlockd/lvmlockd-sanlock.c +++ b/daemons/lvmlockd/lvmlockd-sanlock.c @@ -29,6 +29,7 @@ #include "configure.h" #include "daemon-server.h" #include "daemon-log.h" +#include "xlate.h" #include "lvmlockd-internal.h" #include "lvmlockd-client.h" |