qemu/hw/ipmi
Cédric Le Goater 4f298a4b29 ipmi: remove IPMI_CHECK_CMD_LEN() macro
Most IPMI command handlers in the BMC simulator start with a call to
the macro IPMI_CHECK_CMD_LEN() which verifies that a minimal number of
arguments expected by the command are indeed available. To achieve
this task, the macro implicitly uses local variables which is
misleading in the code.

This patch adds a 'cmd_len_min' attribute to the struct IPMICmdHandler
defining the minimal number of arguments expected by the command and
moves this check in the global command handler ipmi_sim_handle_command().

To clarify the checks being done on the received command, the patch
introduces a helper ipmi_get_handler().

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: remove IPMI_CHECK_CMD_LEN() macro 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