This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: read(): varblk tape records...(& Fix for : read())


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]