Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: chungto@ampex.com (Tony Chung)
Subject: How to set errno to ENOSPC
Date: 1996/01/02	[thread overview]
Message-ID: <DKKHvK.IIJ@ampex.com> (raw)

I am writing a device driver for our tape drive on
the alpha-dec-osf3.2.

When there is an EOM-encountered. I return
ENOSPC (errno 28)  within xxx_write().
I  also set bp->b_error to ENOSPC and set
bp->b_flags |= B_ERROR within xxx_strategy.

According to man pages, write() should return -1 and
set errno to ENOSPC.
Instead errno  was 0 while write() return 
something else ( i.e.. (count != write(fd, buf, count)) and
count not equal to -1)
Any idea? 
The document do not explain how it work.
I wonder how the Kernel code know there is
a problem.  I suspect this may be done within
iodone() which there is no source code.

Thanks for any help or comment.
---
=============================
Tony Chung
chungto@ampex.com




                 reply	other threads:[~1996-01-02  5:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox