| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Date: | Mon, 26 Feb 2001 16:02:25 +0300 |
| From: | Egor Duda <deo AT logos-m DOT ru> |
| X-Mailer: | The Bat! (v1.45) Personal |
| Reply-To: | Egor Duda <cygwin AT cygwin DOT com> |
| Organization: | DEO |
| X-Priority: | 3 (Normal) |
| Message-ID: | <613331659.20010226160225@logos-m.ru> |
| To: | Jesper Eskilson <jojo AT virtutech DOT se> |
| CC: | cygwin AT cygwin DOT com |
| Subject: | Re: lseek() fails to seek on /dev/fd0 ('\\.\A:') |
| In-reply-To: | <u671ysl8xda.fsf@rachel.hq.vtech> |
| References: | <u67ae79bw6v DOT fsf AT rachel DOT hq DOT vtech> <u671ysl8xda DOT fsf AT rachel DOT hq DOT vtech> |
| Mime-Version: | 1.0 |
Hi!
Monday, 26 February, 2001 Jesper Eskilson jojo AT virtutech DOT se wrote:
JE> However, this was not the error I was really trying to fix (the real
JE> program passed the parameters in the correct order). The real problem was
JE> that lseek() fails when doing SEEK_END on a raw device. On Linux and
JE> Solaris, lseek() return 0 when doing SEEK_END on raw devices.
Single Unix Specification v2 states that "The behaviour of lseek() on
devices which are incapable of seeking is implementation-dependent.
The value of the file offset associated with such a device is
undefined." and
" The lseek() function will fail if:
...
[EINVAL]
The whence argument is not a proper value, or the resulting file offset
would be invalid.
...
"
Win32 API doesn't allow seeking from the end of floppy devices,
so i think it's pretty reasonable for cygwin to return -1
with errno==EINVAL in this case.
Anyway, if we decide to be linux- and solaris- compatible here, the
patch would be trivial.
Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |