* as.h (as_perror): Delete declaration.
[deliverable/binutils-gdb.git] / gas / write.c
index 9e28a6f5492bacee00e89457bd42524e30423d5e..66a05a530faf362c31f5d10f6fb64377d4c846e8 100644 (file)
@@ -1014,11 +1014,8 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
                                        f->fr_literal, (file_ptr) offset,
                                        (bfd_size_type) f->fr_fix);
          if (!x)
-           {
-             bfd_perror (stdoutput->filename);
-             as_perror (_("FATAL: Can't write %s"), stdoutput->filename);
-             exit (EXIT_FAILURE);
-           }
+           as_fatal (_("can't write %s: %s"), stdoutput->filename,
+                     bfd_errmsg (bfd_get_error ()));
          offset += f->fr_fix;
        }
       fill_literal = f->fr_literal + f->fr_fix;
@@ -1038,12 +1035,8 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
                                                (file_ptr) offset,
                                                (bfd_size_type) fill_size);
                  if (!x)
-                   {
-                     bfd_perror (stdoutput->filename);
-                     as_perror (_("FATAL: Can't write %s"),
-                                stdoutput->filename);
-                     exit (EXIT_FAILURE);
-                   }
+                   as_fatal (_("can't write %s: %s"), stdoutput->filename,
+                             bfd_errmsg (bfd_get_error ()));
                  offset += fill_size;
                }
            }
This page took 0.025854 seconds and 4 git commands to generate.