delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/05/10:38:02

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Originating-IP: [203.61.170.170]
X-Originating-Email: [jasonwinter AT hotmail DOT com]
X-Sender: jasonwinter AT hotmail DOT com
From: "Jason Winter" <jasonwinter AT hotmail DOT com>
To: cygwin AT cygwin DOT com
Subject: RE: read(): varblk tape records...(& Fix for : read())
Date: Fri, 05 Mar 2004 15:37:34 +0000
Mime-Version: 1.0
Message-ID: <Sea2-F18QHtMFaukyCK0001f372@hotmail.com>
X-OriginalArrivalTime: 05 Mar 2004 15:37:35.0051 (UTC) FILETIME=[C80191B0:01C402C7]

Hi Corinna,

>I don't quite understand what you mean.  The first thing in raw_read()
>is to call writebuf() which checks if devbuf is used as a write buffer
>and if so, tries to write the data in the buffer onto the medium.  This
>also sets devbufstart and devbufend to zero.  Am I missing something?

But what about calling read() first, then write().

So, read() sets the writing flag off, and flushes any data that needs it,
then uses devbufstart etc. and leaves it in a non-zero state.

Now write() gets called.  writing flag is no: so devbufend is assigned to
devbufstart (which is non-zero) and devbufstart is reset to 0.

Now, write() starts to process buffers!  But these buffers are not write
buffers!  They are leftover read buffers (and as I wrote before, doesn't
effect val-blk-writes due to other code-paths.)

Or, am I missing something?
Jason.
ps. Igor, I thought my DAT drive was broken for weeks, until I used the NT 
API directly...

_________________________________________________________________
Get Extra Storage in 10MB, 25MB, 50MB and 100MB options now! Go to  
http://join.msn.com/?pgmarket=en-au&page=hotmail/es2


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019