mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
Fixed AMC point-to-point record parsing in FRU
-Fixed detection of packing support in GCC -Added packing support detection magic on all packed structures in project
This commit is contained in:
parent
b23f858ee3
commit
ba83ecd7d3
@ -56,13 +56,19 @@ static const struct valstr asf_type_vals[] __attribute__((unused)) = {
|
||||
};
|
||||
|
||||
/* ASF message header */
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct asf_hdr {
|
||||
uint32_t iana;
|
||||
uint8_t type;
|
||||
uint8_t tag;
|
||||
uint8_t __reserved;
|
||||
uint8_t len;
|
||||
} __attribute__((packed));
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
int handle_asf(struct ipmi_intf * intf, uint8_t * data, int data_len);
|
||||
|
||||
|
@ -64,14 +64,23 @@ static const struct valstr rmcp_class_vals[] __attribute__((unused)) = {
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
/* RMCP message header */
|
||||
struct rmcp_hdr {
|
||||
uint8_t ver;
|
||||
uint8_t __reserved;
|
||||
uint8_t seq;
|
||||
uint8_t class;
|
||||
} __attribute__((packed));
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct rmcp_pong {
|
||||
struct rmcp_hdr rmcp;
|
||||
struct asf_hdr asf;
|
||||
@ -80,7 +89,10 @@ struct rmcp_pong {
|
||||
uint8_t sup_entities;
|
||||
uint8_t sup_interact;
|
||||
uint8_t reserved[6];
|
||||
} __attribute__((packed));
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
int handle_rmcp(struct ipmi_intf * intf, uint8_t * data, int data_len);
|
||||
|
||||
|
@ -56,13 +56,19 @@ static const struct valstr asf_type_vals[] __attribute__((unused)) = {
|
||||
};
|
||||
|
||||
/* ASF message header */
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct asf_hdr {
|
||||
uint32_t iana;
|
||||
uint8_t type;
|
||||
uint8_t tag;
|
||||
uint8_t __reserved;
|
||||
uint8_t len;
|
||||
} __attribute__((packed));
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
int handle_asf(struct ipmi_intf * intf, uint8_t * data, int data_len);
|
||||
|
||||
|
@ -64,12 +64,18 @@ static const struct valstr rmcp_class_vals[] __attribute__((unused)) = {
|
||||
};
|
||||
|
||||
/* RMCP message header */
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct rmcp_hdr {
|
||||
uint8_t ver;
|
||||
uint8_t __reserved;
|
||||
uint8_t seq;
|
||||
uint8_t class;
|
||||
} __attribute__((packed));
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
int handle_rmcp(struct ipmi_intf * intf, uint8_t * data, int data_len);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user