diff options
author | Robert Moore <Robert.Moore@intel.com> | 2012-10-25 09:36:08 -0700 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2012-10-25 09:36:08 -0700 |
commit | 3860f05120d7578634c4a97e81f9ff38ca06c895 (patch) | |
tree | a48678e24213bcc62ac1671d521c04840af00b8e | |
parent | 891867802dac31549d6209113fa1c60f66e15004 (diff) | |
download | acpica-3860f05120d7578634c4a97e81f9ff38ca06c895.tar.gz |
AcpiSrc: Add error check after call to write().
Ensure a write error is not missed.
-rw-r--r-- | source/tools/acpisrc/asfile.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/tools/acpisrc/asfile.c b/source/tools/acpisrc/asfile.c index cfa366f1a..504b9a616 100644 --- a/source/tools/acpisrc/asfile.c +++ b/source/tools/acpisrc/asfile.c @@ -882,9 +882,11 @@ AsPutFile ( /* Write the buffer to the file */ FileSize = strlen (FileBuffer); - write (DestHandle, FileBuffer, FileSize); + if (write (DestHandle, FileBuffer, FileSize) == -1) + { + printf ("Error writing output file \"%s\"\n", Pathname); + } close (DestHandle); - return (0); } |