summaryrefslogtreecommitdiffstats
path: root/resources/utilities/ich9deblob/src/common/descriptor_gbe.c
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-01-10 18:07:56 (EST)
committer Francis Rowe <info@gluglug.org.uk>2015-01-10 18:07:56 (EST)
commitf6da483213c5a9ad026c2740eeff120414492a40 (patch)
tree72c62f49cc617a15a023134c26679c30133aacab /resources/utilities/ich9deblob/src/common/descriptor_gbe.c
parent74adfa0f8c41754d1a74006b6ca5f923fd2af503 (diff)
downloadlibreboot-f6da483213c5a9ad026c2740eeff120414492a40.zip
libreboot-f6da483213c5a9ad026c2740eeff120414492a40.tar.gz
libreboot-f6da483213c5a9ad026c2740eeff120414492a40.tar.bz2
ich9deblob/ich9gen: use portable data types
For those integers that need to be a certain byte size.
Diffstat (limited to 'resources/utilities/ich9deblob/src/common/descriptor_gbe.c')
-rw-r--r--resources/utilities/ich9deblob/src/common/descriptor_gbe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/resources/utilities/ich9deblob/src/common/descriptor_gbe.c b/resources/utilities/ich9deblob/src/common/descriptor_gbe.c
index ca50ac0..581f755 100644
--- a/resources/utilities/ich9deblob/src/common/descriptor_gbe.c
+++ b/resources/utilities/ich9deblob/src/common/descriptor_gbe.c
@@ -31,8 +31,8 @@ int notCreatedDescriptorGbeFile(struct DESCRIPTORREGIONRECORD descriptorStruct,
FILE* fileStream = NULL;
/* These will have the structs copied to them */
- char descriptorBuffer[DESCRIPTORREGIONSIZE];
- char gbeBuffer8k[GBEREGIONSIZE_8K];
+ uint8_t descriptorBuffer[DESCRIPTORREGIONSIZE];
+ uint8_t gbeBuffer8k[GBEREGIONSIZE_8K];
/* Copy the structs to buffers, to make writing them as files easier */
memcpy(&descriptorBuffer, &descriptorStruct, DESCRIPTORREGIONSIZE); /* descriptor */
@@ -45,14 +45,14 @@ int notCreatedDescriptorGbeFile(struct DESCRIPTORREGIONRECORD descriptorStruct,
fileStream = fopen(fileName, "ab");
/* write the descriptor region into the first part */
- if (DESCRIPTORREGIONSIZE != fwrite(descriptorBuffer, sizeof(char), DESCRIPTORREGIONSIZE, fileStream))
+ if (DESCRIPTORREGIONSIZE != fwrite(descriptorBuffer, 1, DESCRIPTORREGIONSIZE, fileStream))
{
printf("\nerror: writing descriptor region failed\n");
return 1;
}
/* add gbe to the end of the file */
- if (GBEREGIONSIZE_8K != fwrite(gbeBuffer8k, sizeof(char), GBEREGIONSIZE_8K, fileStream))
+ if (GBEREGIONSIZE_8K != fwrite(gbeBuffer8k, 1, GBEREGIONSIZE_8K, fileStream))
{
printf("\nerror: writing GBe region failed\n");
return 1;