gsmi: Fix bug in append_to_eventlog sysfs handler
authorDuncan Laurie <dlaurie@chromium.org>
Mon, 25 Jun 2012 17:15:11 +0000 (10:15 -0700)
committerGerrit <chrome-bot@google.com>
Tue, 26 Jun 2012 18:07:44 +0000 (11:07 -0700)
commit727f083b576e9d61895c19b3f83dea138afacb67
tree0f80e98349faf3f7e8463f3a53f5e23f11184a53
parenta35e771694c1bfb76a215a69e404eb6ce33accc0
gsmi: Fix bug in append_to_eventlog sysfs handler

The sysfs handler should return the number of bytes
consumed, which in the case of a successful write is
the entire buffer.

BUG=chrome-os-partner:9195
TEST=manual

Successfully append an event to the log with gsmi sysfs.
This sample event is for a "Kernel Software Watchdog"

> xxd -g 1 event.kernel_software_watchdog
0000000: 01 00 00 00 ad de 06 00 00 00

> cat event.kernel_software_watchdog > /sys/firmware/gsmi/append_to_eventlog

> mosys eventlog list | tail -1
14 | 2012-06-25 10:14:14 | Kernl Event | Software Watchdog

Change-Id: I7e238a83d6a4f04a998a384d96422c08f4768dcc
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26028
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
drivers/firmware/google/gsmi.c