This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[RFA] bfd_close should write if file is writable.
- From: Michael Snyder <msnyder at cygnus dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 12 Apr 2002 11:44:34 -0700
- Subject: [RFA] bfd_close should write if file is writable.
Per a suggestion from Frank Eigler, bfd_close should write out
the contents of the file if the file was open for write OR for
read/write (as opposed to "if the file was not opened for
reading".
2002-04-12 Michael Snyder <msnyder@redhat.com>
* opncls.c (bfd_close): Write contents if writeable.
Index: opncls.c
===================================================================
RCS file: /cvs/cvsfiles/devo/bfd/opncls.c,v
retrieving revision 1.92
diff -p -r1.92 opncls.c
*** opncls.c 2002/01/21 00:18:32 1.92
--- opncls.c 2002/04/12 18:54:11
*************** bfd_close (abfd)
*** 417,423 ****
{
boolean ret;
! if (!bfd_read_p (abfd))
{
if (! BFD_SEND_FMT (abfd, _bfd_write_contents, (abfd)))
return false;
--- 417,423 ----
{
boolean ret;
! if (bfd_write_p (abfd))
{
if (! BFD_SEND_FMT (abfd, _bfd_write_contents, (abfd)))
return false;