elog: Check for large data when adding an event

This adds a check to ensure the data supplied by the user does not
cause the total event size to exceed the allowable length, which is
defined as 1 byte by SMBIOS.

BUG=chrome-os-partner:36337
BRANCH=none
TEST=Ran "mosys eventlog add" fails gracefully when exceedingly
large data payload is supplied (see below):

$ mosys eventlog add 0 `yes '1'|head -494|tr -d '\n'`
Event data size 247 too large.

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: I32b8f646c01765a1aef5651d06943f13e92cd59f
Reviewed-on: https://chromium-review.googlesource.com/248261
Reviewed-by: Shawn N <shawnn@chromium.org>
1 file changed