Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Mon, 26 Feb 2001 15:08:27 +0100
From: Corinna Vinschen <cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: lseek() fails to seek on /dev/fd0 ('\\.\A:')
Message-ID: <20010226150827.N27406@cygbert.vinschen.de>
Mail-Followup-To: cygwin@cygwin.com
References: <u67ae79bw6v.fsf@rachel.hq.vtech> <u671ysl8xda.fsf@rachel.hq.vtech>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <u671ysl8xda.fsf@rachel.hq.vtech>; from jojo@virtutech.se on Mon, Feb 26, 2001 at 01:03:29PM +0100

On Mon, Feb 26, 2001 at 01:03:29PM +0100, Jesper Eskilson wrote:
> Jesper Eskilson <jojo@virtutech.se> writes:
> 
> > Why is it ok to seek to 0 bytes and 1 byte, but not 2?
> 
> The test-program passed parameters in the wrong order, the correct order is
> 
>         lseek(fd, pos, whence)
> 
> However, this was not the error I was really trying to fix (the real
> program passed the parameters in the correct order). The real problem was
> that lseek() fails when doing SEEK_END on a raw device. On Linux and
> Solaris, lseek() return 0 when doing SEEK_END on raw devices.

My catchword. SEEK_END is not supported on raw devices by Cygwin
currently. The reason is that the Windows function SetFilePointer()
returns EINVAL or sth similar when called with FILE_END on raw disk
devices. Since I didn't get any meaningful result when calling
GetFileSize() either, I currently don't have a way to support
SEEK_END. Hints welcome.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

