* How to set errno to ENOSPC
@ 1996-01-02 5:00 Tony Chung
0 siblings, 0 replies; only message in thread
From: Tony Chung @ 1996-01-02 5:00 UTC (permalink / 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-01-02 5:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-01-02 5:00 How to set errno to ENOSPC Tony Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox