summaryrefslogtreecommitdiff
path: root/source/common/adfile.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2012-11-14 22:20:16 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2012-11-14 22:20:16 +0000
commitc2463a8709e5b3a5ce54c09d35b4820a756b0fc5 (patch)
tree2ffc551e57f0545a17c165d729c1438a26236f60 /source/common/adfile.c
parent31aa864e8c068201d58aad3a8f82ddb51df11015 (diff)
Notes
Diffstat (limited to 'source/common/adfile.c')
-rw-r--r--source/common/adfile.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/common/adfile.c b/source/common/adfile.c
index 2c864d4bc096..660b45bdf19d 100644
--- a/source/common/adfile.c
+++ b/source/common/adfile.c
@@ -124,19 +124,24 @@ AdWriteBuffer (
char *Buffer,
UINT32 Length)
{
- FILE *fp;
+ FILE *File;
ACPI_SIZE Actual;
- fp = fopen (Filename, "wb");
- if (!fp)
+ File = fopen (Filename, "wb");
+ if (!File)
{
- printf ("Couldn't open %s\n", Filename);
+ printf ("Could not open file %s\n", Filename);
return (-1);
}
- Actual = fwrite (Buffer, (size_t) Length, 1, fp);
- fclose (fp);
+ Actual = fwrite (Buffer, 1, (size_t) Length, File);
+ if (Actual != Length)
+ {
+ printf ("Could not write to file %s\n", Filename);
+ }
+
+ fclose (File);
return ((INT32) Actual);
}