diff options
author | phk <phk@FreeBSD.org> | 1998-07-31 09:00:39 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-07-31 09:00:39 +0000 |
commit | ac78fb5edaf125582252b57367985c0468ebe7df (patch) | |
tree | c7c243bf468d85f5e8362c5a0fff07f6f6b5185e | |
parent | d6b040d2aa86b0adfa84ed78133c382df2540944 (diff) | |
download | FreeBSD-src-ac78fb5edaf125582252b57367985c0468ebe7df.zip FreeBSD-src-ac78fb5edaf125582252b57367985c0468ebe7df.tar.gz |
In sys/scsi/st.c, st_close() does not check for errors from calling
st_write_filemarks(). This means that it is possible to write a file
on the tape for which all the writes and the close return without
errors, but the all bits did not make it onto the tape.
PR: 741
Reviewed by: phk
Submitted by: Andrew Heybey <ath@niksun.com>
-rw-r--r-- | sys/scsi/st.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/scsi/st.c b/sys/scsi/st.c index f7558f2..21d1267 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -12,7 +12,7 @@ * on the understanding that TFS is not responsible for the correct * functioning of this software in any circumstances. * - * $Id: st.c,v 1.90 1998/07/04 22:30:24 julian Exp $ + * $Id: st.c,v 1.91 1998/07/11 07:46:01 bde Exp $ */ /* @@ -452,13 +452,14 @@ st_close(dev_t dev, int flag, int fmt, struct proc *p, { u_int32_t unit, mode; struct scsi_data *st; + errval errcode = 0; unit = STUNIT(dev); mode = MODE(dev); st = sc_link->sd; if ((st->flags & (ST_WRITTEN | ST_FM_WRITTEN)) == ST_WRITTEN) - st_write_filemarks(unit, 1, 0); + errcode = st_write_filemarks(unit, 1, 0); /* * Since the device has seen its last close, allow media removal. @@ -484,7 +485,7 @@ st_close(dev_t dev, int flag, int fmt, struct proc *p, sc_link->flags &= ~SDEV_OPEN; st->flags &= ~ST_OPEN; - return (0); + return (errcode); } /* |