summaryrefslogtreecommitdiff
path: root/sys/arch/atari/dev
diff options
context:
space:
mode:
authorabs <abs@NetBSD.org>2008-11-04 17:08:45 +0000
committerabs <abs@NetBSD.org>2008-11-04 17:08:45 +0000
commitd36d67412b4d764ac3866dc2dd5c8403fb4b3bf9 (patch)
tree581c37d2f9acf4c7157425e0d5a5592e17c301a4 /sys/arch/atari/dev
parentdfe1b54b07fdd7cf9ede43b97a14e1390b13f893 (diff)
Another fix from Tuomo Makinen - Use brelse() to unbusy bp buffer
to allow user to swap floppy disks when prompted.
Diffstat (limited to 'sys/arch/atari/dev')
-rw-r--r--sys/arch/atari/dev/md_root.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/atari/dev/md_root.c b/sys/arch/atari/dev/md_root.c
index db4e55862c5..4c661dccc02 100644
--- a/sys/arch/atari/dev/md_root.c
+++ b/sys/arch/atari/dev/md_root.c
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.25 2008/01/02 11:48:24 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.26 2008/11/04 17:08:45 abs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -247,6 +247,8 @@ struct read_info *rsp;
printf("\n");
done = bp->b_bcount - bp->b_resid;
+ brelse(bp, 0);
+
bytes_left -= done;
rsp->offset += done;
rsp->bufp += done;
@@ -317,6 +319,7 @@ int nbyte;
/* Wait for results */
biowait(bp);
+ error = bp->b_error;
/* Dot counter */
printf(".");
@@ -324,6 +327,8 @@ int nbyte;
printf("\n");
done = bp->b_bcount - bp->b_resid;
+ brelse(bp, 0);
+
nbyte -= done;
nread += done;
rsp->offset += done;
@@ -332,7 +337,6 @@ int nbyte;
break;
if((rsp->offset == rsp->media_sz) && (nbyte != 0)) {
- if(rsp->offset == rsp->media_sz) {
printf("\nInsert next media and hit any key...");
if(cngetc() != '\n')
printf("\n");