Files
OpenCellular/common
David Hendricks 29af184eb7 copy reboot parameters in host_command_reboot()
Currently host_command_reboot() casts the supplied buffer and access
it directly. This works until about half-way thru the function when
the same buffer potentially gets overwritten when sending the response
code to the host.

This CL gets around that by copying the reboot parameters into a
separate buffer.

Signed-off-by: David Hendricks <dhendrix@chromium.org>
BUG=none
TEST=Tested using 'ectool reboot_ec' on Snow (see below)

Before, EC console displayed "[Executing host reboot command]" and
ectool showed no actual change (reboot command was being overwritten
with EC_REBOOT_CANCEL):
localhost ~ # ectool version | grep 'Firmware copy'
Firmware copy: RO
localhost ~ # ectool reboot_ec A
localhost ~ # ectool version | grep 'Firmware copy'
Firmware copy: RO

With the patch applied, the EC console shows the EC boot-up messages
and ectool confirms that the jump took place:
localhost ~ # ectool version | grep 'Firmware copy'
Firmware copy: RO
localhost ~ # ectool reboot_ec A
localhost ~ # ectool version | grep 'Firmware copy'
Firmware copy: A

Change-Id: I8aca8d468d1125c3fb8d320ec0fb79d2822b0b20
Reviewed-on: https://gerrit.chromium.org/gerrit/26998
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
2012-07-10 11:27:08 -07:00
..
2012-05-25 13:34:06 -07:00
2012-06-22 15:35:41 -07:00
2012-06-25 15:37:41 -07:00
2012-06-27 00:55:04 -07:00
2012-06-25 07:15:50 -07:00
2012-05-25 13:34:06 -07:00
2012-06-07 14:33:26 -07:00
2012-05-25 13:34:06 -07:00
2012-07-03 10:50:45 -07:00
2012-06-25 15:37:42 -07:00
2012-06-26 17:01:52 -07:00
2012-06-26 13:58:54 -07:00