summaryrefslogtreecommitdiffstats
path: root/util/cbfstool
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2009-12-06 12:14:39 +0000
committerPeter Stuge <peter@stuge.se>2009-12-06 12:14:39 +0000
commitf4aca1da486d06fbb8e2da080558b982e05dfbd8 (patch)
tree14f7527af487a3550ac1a9028cfd1813bd50a76b /util/cbfstool
parent1a76ebe2a20f2a30dfebd77ffea8d3daf6807505 (diff)
downloadcoreboot-staging-f4aca1da486d06fbb8e2da080558b982e05dfbd8.zip
coreboot-staging-f4aca1da486d06fbb8e2da080558b982e05dfbd8.tar.gz
cbfstool: Fill memory allocated in create_cbfs_file() with 0xff
This should improve programming speed a bit. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4975 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/cbfstool')
-rw-r--r--util/cbfstool/common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
index e87bc65..dd675ca 100644
--- a/util/cbfstool/common.c
+++ b/util/cbfstool/common.c
@@ -279,6 +279,7 @@ void *create_cbfs_file(const char *filename, void *data, uint32_t * datasize,
headersize);
exit(1);
}
+ memset(newdata, 0xff, *datasize + headersize);
struct cbfs_file *nextfile = (struct cbfs_file *)newdata;
strncpy(nextfile->magic, "LARCHIVE", 8);
nextfile->len = htonl(*datasize);
OpenPOWER on IntegriCloud