aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/intel/gma
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2016-09-25 22:36:26 +0200
committerNico Huber <nico.h@gmx.de>2016-09-27 15:43:11 +0200
commit2e77e0aa3fa9d2fd7b65f19c6fcabcbcfba7be2d (patch)
tree19f44723e78b313113fdec3c1fdf2b9f3413e9f7 /src/drivers/intel/gma
parent91fa9d7696ef88e580caa1f762e72bd9e3e18a18 (diff)
intel/gma/vbt.c: pad the ID string with spaces.
The VBT id string is 20 characters long. If the string is shorter than 20 it needs spaces at the end. This change is cosmetic as all strings were padded by hand. Change-Id: Id6439f1d3dbd09319ee99ce9d15dbc3bcead1f53 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/16739 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/drivers/intel/gma')
-rw-r--r--src/drivers/intel/gma/vbt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drivers/intel/gma/vbt.c b/src/drivers/intel/gma/vbt.c
index e768402b04..9ec09d313c 100644
--- a/src/drivers/intel/gma/vbt.c
+++ b/src/drivers/intel/gma/vbt.c
@@ -34,7 +34,9 @@ static size_t generate_vbt(const struct i915_gpu_controller_info *conf,
memset (head, 0, sizeof (*head));
- memcpy (head->signature, idstr, 20);
+ memset(head->signature, ' ', sizeof(head->signature));
+ memcpy(head->signature, idstr, MIN(strlen(idstr),
+ sizeof(head->signature)));
head->version = 100;
head->header_size = sizeof (*head);
head->bdb_offset = sizeof (*head);