Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com To: cygwin AT cygwin DOT com Subject: Re: lseek() fails to seek on /dev/fd0 ('\\.\A:') References: From: Jesper Eskilson Organization: Virtutech AB Date: 26 Feb 2001 13:03:29 +0100 In-Reply-To: Jesper Eskilson's message of "26 Feb 2001 11:00:40 +0100" Message-ID: Lines: 21 User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.2 (Thalia) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Jesper Eskilson 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. Any comments? /Jesper -- ------------------------------------------------------------------------- Jesper Eskilson jojo AT virtutech DOT se Virtutech http://www.virtutech.se ------------------------------------------------------------------------- -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple