This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]