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]

Re: [rfa] Add the bfd_iovec


Andrew Cagney <cagney@gnu.org> writes:

> Ok, the attached should differ by the original by:
> 
> - removing ->berror()
> 
> - adding a description of each b*() method
> The interface doesn't treat EOF as an error, and -1 is always an error
> indication.
> 
> - setting bfd_error when there's an error
> 
> Having done this, I'm wondering if setting bfd_error is all that
> useful. You'll notice that the interfaces now all consistently return
> -1 and set bfd_error_system_call when there's an error.  I guess the
> memory IOVEC will get the chance to set bfd_error_no_memory.
> 
> anyway, ok?

Thanks.  I like it.

Does anybody dislike it?

> +.  {* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching
> +.     bytes starting at PTR.  Return the number of bytes actually
> +.     transfered (a read past end-of-file returns less than NBYTES),
> +.     or -1 (setting <<bfd_error>>) if an error occures.  *}

That last word should be "occurs", unless this is some sort of
Australian spelling or something.

> +.  {* Return the current IOSTREAM file offset, or -1 (setting <<bfd_error>>
> +.     if an error occures.  *}

Here too.

> +static int
> +opncls_berror (struct bfd *abfd ATTRIBUTE_UNUSED)
> +{
> +  return 0;
> +}

Seems like opncls_berror should have gone away.

Ian


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