Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" 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 Content-Type: text/plain; format=flowed Message-ID: 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/