🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #4633

Installable Device Drivers

#4633
From: Reino de Boer
Date: Fri, 08 Feb 1991 09:15
34 lines
2114 bytes
The Context:
A colleague of mine has written an installable device driver for a
network disk. When implementing the read function, he encountered an
ambiguity in the documentation he used (The MS-DOS Encyclopedia).

The Specs:
[quote from the The Encyclopedia] "... Then the functions must return
the number of bytes or sectors actually transferred in the appropriate
field of the request header and also set the done flag in the request
header status word. If an error is encountered during an operation, the
functions must set the done flag, the error flag, and the error type in
the status word and also report the number of bytes successfully
transferred before the error; ..."

The Problem:
When less bytes (sectors) are read than there were requested, and the
device driver does not consider this to be an error, according to the
above specs the driver "...must return the number ... actually
transferred ... and also set the done flag ...". When performing
according to this scheme, MS-DOS thinks that all requested bytes
(sectors) were read.
When, on the other hand, the error flag is also set, MS-DOS thinks there
was an error and responds in the usual "Abort, Retry, ..." manner.

The Question:
How can the device driver convince MS-DOS that there was no error, but
that there were less bytes (sectors) transferred than there were
requested?

Any help (pointers) appreciated -- Reino
-- 
Reino R. A. de Boer     "We want to build the right product right, right?"
Erasmus University Rotterdam ( Informatica )
e-mail: reino@cs.eur.nl
Technical Details
Message-ID: <1991Feb8.091558.17122@cs.eur.nl>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!eurtrx!euraiv1!reino

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!eurtrx!euraiv1!reino
From: reino@cs.eur.nl (Reino de Boer)
Newsgroups: comp.os.msdos.programmer
Subject: Installable Device Drivers
Summary: What to do on successfully read too few blocks
Keywords: Read function
Message-ID: <1991Feb8.091558.17122@cs.eur.nl>
Date: 8 Feb 91 09:15:58 GMT
Distribution: comp
Organization: Erasmus Universiteit Rotterdam, dept. CS (Informatica)
Lines: 34