public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gratian Crisan <nelu@iv.ro>
To: Savin Zlobec <savin@elatec.si>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] fatfs lseek EOF bug
Date: Tue, 10 May 2005 13:00:00 -0000	[thread overview]
Message-ID: <200505101500.19717.nelu@iv.ro> (raw)
In-Reply-To: <428091CE.20300@elatec.si>

On Tuesday 10 May 2005 13:49, Savin Zlobec wrote:
>
> [snip]
>
> >	See the file attached. The test is for an MMC driver but should be pretty
> >straight forward to adapt (only the mount command should be changed).
> >The test creates a file and writes blocks of data into it while printing
> > the current file offset. In a new file after writing the first block, for
> > which the value returned is 0, the value returned by lseek function is
> > -1. The strange thing is that if you overwrite an existing file the lseek
> > function correctly returns the current file offset (equal to EOF).
>
> Found the BUG -- Please try the attached patch and let me know if it works.
>
> savin

The patch works OK :), thanks.

On a side note: I'm looking for an alternative implementation for 'ftruncate' 
POSIX function which is missing from eCos. Do you know how I could implement 
it for fatfs?

-nelu

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2005-05-10 12:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-09 11:25 Gratian Crisan
2005-05-10 10:51 ` Savin Zlobec
2005-05-10 12:05   ` Gratian Crisan
2005-05-10 12:30     ` Savin Zlobec
2005-05-10 13:00       ` Gratian Crisan [this message]
2005-05-11  9:32         ` Savin Zlobec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200505101500.19717.nelu@iv.ro \
    --to=nelu@iv.ro \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=savin@elatec.si \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).