From 4a76413bf71f6fde742dd7aeaa9f8b8468d5b663 Mon Sep 17 00:00:00 2001 From: Steve Price Date: Sun, 13 Dec 1998 23:30:15 +0000 Subject: wcd_read_toc returns zero on success and EIO on failure, so change the test in open to return EIO if non-zero. PR: 8316 Submitted by: Masatoshi TAMURA --- sys/i386/isa/wcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/i386') diff --git a/sys/i386/isa/wcd.c b/sys/i386/isa/wcd.c index 13b3ce0fda6f..bfd96a7f1894 100644 --- a/sys/i386/isa/wcd.c +++ b/sys/i386/isa/wcd.c @@ -13,7 +13,7 @@ * all derivative works or modified versions. * * From: Version 1.9, Mon Oct 9 20:27:42 MSK 1995 - * $Id: wcd.c,v 1.59 1998/09/15 08:15:29 gibbs Exp $ + * $Id: wcd.c,v 1.60 1998/10/30 10:57:09 luigi Exp $ */ #include "wdc.h" @@ -530,7 +530,7 @@ wcdopen (dev_t dev, int flags, int fmt, struct proc *p) /* On the first open, read the table of contents. */ if (! (t->flags & F_BOPEN) && ! t->refcnt) { /* Read table of contents. */ - if (wcd_read_toc (t) < 0) + if (wcd_read_toc (t) != 0) return (EIO); /* Lock the media. */ -- cgit v1.2.3