From 2c362dc181b2013d9ce19d506a6fd532076fb722 Mon Sep 17 00:00:00 2001 From: bde Date: Thu, 30 Jul 1998 15:16:06 +0000 Subject: Added a flags arg to dsopen() and updated drivers. The DSO_ONESLICE and DSO_NOLABELS flags prevent searching for slices and labels respectively. Current drivers don't set these flags. When DSO_NOLABELS is set, the in-core label for the whole disk is cloned to create an in-core label for each slice. This gives the correct result (a good in-core label for the compatibility slice) if DSO_ONESLICE is set or only one slice is found, but usually gives broken labels otherwise, so DSO_ONESLICE should be set if DSO_NOLABELS is set. --- sys/i386/isa/wfd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/i386/isa/wfd.c') diff --git a/sys/i386/isa/wfd.c b/sys/i386/isa/wfd.c index 7f66c48..31ee4c2 100644 --- a/sys/i386/isa/wfd.c +++ b/sys/i386/isa/wfd.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: wfd.c,v 1.12 1998/07/04 22:30:19 julian Exp $ + * $Id: wfd.c,v 1.13 1998/07/13 09:53:03 bde Exp $ */ /* @@ -374,8 +374,9 @@ int wfdopen (dev_t dev, int flags, int fmt, struct proc *p) label.d_secperunit = label.d_secpercyl * t->cap.cyls; /* Initialize slice tables. */ - errcode = dsopen("wfd", dev, fmt, &t->dk_slices, &label, wfdstrategy1, - (ds_setgeom_t *)NULL, &wfd_cdevsw, &wfd_cdevsw); + errcode = dsopen("wfd", dev, fmt, 0, &t->dk_slices, &label, + wfdstrategy1, (ds_setgeom_t *)NULL, &wfd_cdevsw, + &wfd_cdevsw); if (errcode != 0) return errcode; -- cgit v1.1