This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: RedBoot: load.c srecord input offset fix
- To: Jonathan Larmour <jlarmour at redhat dot com>
- Subject: Re: [ECOS] RedBoot: load.c srecord input offset fix
- From: Gary Thomas <gthomas at cambridge dot redhat dot com>
- Date: Fri, 20 Apr 2001 06:40:31 -0600 (MDT)
- Cc: ecos-discuss at sources dot redhat dot com, Grant Edwards <grante at visi dot com>
- Organization: Red Hat, Inc.
On 20-Apr-2001 Jonathan Larmour wrote:
> Grant Edwards wrote:
>>
>> The "offset" variable in load_srec_image() isn't incremented
>> properly (assuming its purpose is to keep track of the current
>> byte offset in the input stream). My version of load.c has
>> diverged enough that I can't generate a usable patch, so I'll
>> summarize the changes:
> [snip]
>
> I'm probably being dumb but this doesn't seem right to me either. If it's
> purely the offset within the I/O stream, then there should be one per getc.
> If it's the offset of the decoded data bytes, there should be one for every
> two chars of actual encoded srec data, and the offset shouldn't be
> incremented for any of the header or checksum.
>
> What is the "offset" actually meant to _be_ if neither of those two
> options?
It's only purpose is to try and provide more information when there is
damage in the input [stream]. In this case, it _should_ be just a count
of the calls to getc().
I'll look at Grant's suggestions and make sure that it really does so.