This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: read(): varblk tape records...(& Fix for : read())
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 13 Mar 2004 18:27:55 +0100
- Subject: Re: read(): varblk tape records...(& Fix for : read())
- References: <Sea2-F40WgP1A83xiDd00066c52@hotmail.com>
- Reply-to: cygwin at cygwin dot com
On Mar 6 08:20, Jason Winter wrote:
> Hi Corinna,
>
> When you do get a working tape drive, here is an example of read making the
> next write 'go bad'...
>
> Fixed Blocks... which I don't use... (Use a parameter on testtape.exe to
> test both cases.)
> Jason.
> ps. Why did it get a protection-fault? maybe it's the cygwin1.dll snapshot,
> but I only get it with *that* example where the API is failing.
It's a bug in your my_read1 code.
> void my_read1 (int fh) {
> int rc;
> int en;
> char buf2 [1];
>
> printf ("read1...");
> fflush (stdout);
> memset (buf2, ' ', 10);
>
> errno = 0;
> rc = read (fh, buf2, 1);
> en = errno;
>
> printf (" rc=%d, errno=%d\n", rc, en);
> buf2 [1] = 0;
=============
> printf ("%s\n", buf2);
> disp_stat ();
> common ();
> };
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/