diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2014-03-27 23:50:54 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2014-03-27 23:50:54 +0000 |
commit | 7c6f304a2eb855cf2d71ca0638d4f3c72f436fcd (patch) | |
tree | d3e9e38245f10de28c87606c945c7fdd4bed0d76 /source/tools/acpisrc/asfile.c | |
parent | 526d99544ba42a5a2155021975b3b97da425819e (diff) |
Notes
Diffstat (limited to 'source/tools/acpisrc/asfile.c')
-rw-r--r-- | source/tools/acpisrc/asfile.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source/tools/acpisrc/asfile.c b/source/tools/acpisrc/asfile.c index 42cefa46e88e1..d3b72de798b2f 100644 --- a/source/tools/acpisrc/asfile.c +++ b/source/tools/acpisrc/asfile.c @@ -42,6 +42,7 @@ */ #include "acpisrc.h" +#include "acapps.h" /* Local prototypes */ @@ -714,8 +715,6 @@ AsGetFile ( FILE *File; UINT32 Size; char *Buffer; - int Seek1; - int Seek2; size_t Actual; @@ -730,11 +729,8 @@ AsGetFile ( /* Need file size to allocate a buffer */ - Seek1 = fseek (File, 0L, SEEK_END); - Size = ftell (File); - Seek2 = fseek (File, 0L, SEEK_SET); - - if (Seek1 || Seek2 || (Size == -1)) + Size = CmGetFileSize (File); + if (Size == ACPI_UINT32_MAX) { printf ("Could not get file size for %s\n", Filename); goto ErrorExit; |