Mail Archives: cygwin/2001/02/26/09:54:11
Hi!
Monday, 26 February, 2001 Earnie Boyd earnie_boyd AT yahoo DOT com wrote:
>> Anyway, if we decide to be linux- and solaris- compatible here, the
>> patch would be trivial.
>>
EB> I thought the decision to be as Linux compatible as possible had already
EB> been determined. I suggest that someone submit the trivial patch.
unfortunately, i haven't any linux boxes with floppies around to
check, so could somebody run this program on linux with or
without media in drive and (if possible) with media of different
sizes, i.e. 1.44M and 720K floppies, and report what it prints when
run as './floppy 0' or './floppy 1000' or './floppy 1024' ?
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
int main (int argc, char** argv)
{
off_t rv;
off_t offset = ( argc > 1 ? atoi (argv[1]) : 0 );
int fd = open ( "/dev/fd0", O_RDONLY );
if ( fd >= 0 )
{
rv = lseek ( fd, offset, SEEK_END );
printf ( "offset = %ld; filepos = %ld\n", offset, rv );
if ( rv < 0 ) perror ( "lseek" );
}
else perror ( "open" );
}
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
- Raw text -