From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13708 invoked by alias); 9 May 2005 09:33:05 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 13664 invoked by uid 22791); 9 May 2005 09:33:01 -0000 Received: from iv.ro (HELO iv.iv.ro) (194.105.28.94) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 09 May 2005 09:33:01 +0000 Received: from silvester (silvester.iv.ro [192.168.1.2] (may be forged)) by iv.iv.ro (8.13.0/8.13.0) with ESMTP id j499Wucn032042 for ; Mon, 9 May 2005 12:32:57 +0300 (EEST) From: Gratian Crisan To: ecos-discuss@ecos.sourceware.org Date: Mon, 09 May 2005 11:25:00 -0000 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505091228.04579.nelu@iv.ro> Subject: [ECOS] fatfs lseek EOF bug X-SW-Source: 2005-05/txt/msg00121.txt.bz2 Hi all, I think I've found a bug in the ecos FAT implementation for lseek function. (fatfs_fo_lseek). When calling the function like this 'lseek(fd, 0, SEEK_CUR)' to get the current file position and the postion is right at the end of the file the fat lseek function returns end of file error EEOF. I've looked at the other filesystems from ecos and did a test in linux and the correct behavior seems to be to return the current position of the end of file if the read/write pointer is at the end of file (equal with the file size). This bug occurs for example when creating a new file, writing some data in it and calling lseek(fd, 0, SEEK_CUR) to get the current file position. Suggestions? Thanks, 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