If fclose fails, set bfd_error to system_call_error.
authorIan Lance Taylor <ian@airs.com>
Fri, 23 Oct 1992 21:25:38 +0000 (21:25 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 23 Oct 1992 21:25:38 +0000 (21:25 +0000)
bfd/cache.c

index fbd46bf9b2f5903d8f3ae55c9f409547aeb8b1bc..6be253cffb39021e20fa4d180beb199aa1e5676b 100644 (file)
@@ -127,10 +127,13 @@ DEFUN(bfd_cache_delete,(abfd),
 {
   boolean ret;
 
-  if (fclose ((FILE *)(abfd->iostream)) == EOF)
-    ret = false;
-  else
+  if (fclose ((FILE *)(abfd->iostream)) == 0)
     ret = true;
+  else
+    {
+      ret = false;
+      bfd_error = system_call_error;
+    }
   snip (abfd);
   abfd->iostream = NULL;
   open_files--;