Commit d9efd005 authored by Alexander Aring's avatar Alexander Aring Committed by David Teigland
Browse files

dlm: use __le types for options header



This patch changes to use __le types directly in the dlm option headers
structures which are casted at the right dlm message buffer positions.

Currently only midcomms.c using those headers which already was calling
endian conversions on-the-fly without using in/out functionality like
other endianness handling in dlm. Using __le types now will hopefully get
useful warnings in future if we do comparison against host byte order
values.

Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent a8449f23
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -460,9 +460,9 @@ struct dlm_rcom {
};

struct dlm_opt_header {
	uint16_t	t_type;
	uint16_t	t_length;
	uint32_t	t_pad;
	__le16		t_type;
	__le16		t_length;
	__le32		t_pad;
	/* need to be 8 byte aligned */
	char		t_value[];
};
@@ -472,8 +472,8 @@ struct dlm_opts {
	struct dlm_header	o_header;
	uint8_t			o_nextcmd;
	uint8_t			o_pad;
	uint16_t		o_optlen;
	uint32_t		o_pad2;
	__le16			o_optlen;
	__le32			o_pad2;
	char			o_opts[];
};