qemu/hw/ipmi
Cédric Le Goater a580d82085 ipmi: replace IPMI_ADD_RSP_DATA() macro with inline helpers
The IPMI command handlers in the BMC simulator use a macro
IPMI_ADD_RSP_DATA() to push bytes in a response buffer. The macro
hides the fact that it implicitly uses variables local to the handler,
which is misleading.

This patch introduces a simple 'struct RspBuffer' and inlined helper
routines to store byte(s) in a response buffer. rsp_buffer_push()
replaces the macro IPMI_ADD_RSP_DATA() and rsp_buffer_pushmore() is
new helper to push multiple bytes. The latest is used in the command
handlers get_msg() and get_sdr() which are manipulating the buffer
directly.

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-03-11 16:59:13 +02:00
..
ipmi_bmc_extern.c hw: Clean up includes 2016-01-29 15:07:25 +00:00
ipmi_bmc_sim.c ipmi: replace IPMI_ADD_RSP_DATA() macro with inline helpers 2016-03-11 16:59:13 +02:00
ipmi.c ipmi: do not take/drop iothread lock 2016-02-09 15:46:54 +01:00
isa_ipmi_bt.c hw: Clean up includes 2016-01-29 15:07:25 +00:00
isa_ipmi_kcs.c hw: Clean up includes 2016-01-29 15:07:25 +00:00
Makefile.objs ipmi: Add a BT low-level interface 2015-12-22 18:39:19 +02:00