aboutsummaryrefslogtreecommitdiff
path: root/target-openrisc
diff options
context:
space:
mode:
authorCédric Le Goater <clg@fr.ibm.com>2016-03-10 15:03:54 +0100
committerMichael S. Tsirkin <mst@redhat.com>2016-03-11 16:59:13 +0200
commit4f298a4b2957b7833bc607c951ca27c458d98d88 (patch)
treec44df43caee9c735bdcbd3fee70ecf0044921f18 /target-openrisc
parent5da4fb001841fd4295ced9b0b63245ce485ecfe9 (diff)
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>
Diffstat (limited to 'target-openrisc')
0 files changed, 0 insertions, 0 deletions