*BSD News Article 18601


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!metro!sequoia!ultima!kralizec.zeta.org.au!kralizec.zeta.org.au!not-for-mail
From: bde@kralizec.zeta.org.au (Bruce Evans)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: pk0.2.4: error with DKFL_QUIET (wd.c), w/ patch
Date: 19 Jul 1993 01:45:15 +1000
Organization: Kralizec Dialup Unix Sydney: +61-2-837-1183 V.32bis
Lines: 38
Message-ID: <22br6bINNi58@kralizec.zeta.org.au>
References: <1993Jul16.125843.6987@hq.demos.su> <GENE.93Jul17073841@stark.uucp>
NNTP-Posting-Host: kralizec.zeta.org.au

In <GENE.93Jul17073841@stark.uucp> gene@cs.sunysb.edu!stark (Gene Stark) writes:

>In article <1993Jul16.125843.6987@hq.demos.su> apg@demos.su (Paul Antonov) writes:

>   With newest patchkit 0.2.4 it's virtually impossible to install
>   386bsd to empty disk drive because of small bug in wd.c: DKFL_QUIET
>   must be set if proper disklabel doesn't exist.

>   [patch omitted]

>Actually, wouldn't it be better to revert to the way the old driver was:
>to set DKFL_QUIET *only* if one is attempting to open the raw drive
>(d partition)?

No.

All these versions are buggy:

The pre-patchkit-0.2.4 version only cleared the DKFL_QUIET flag for the
'd' partition, and then only if the 'd' partition happens to be opened
first.  (The comment in the source still mentions the 'c' partition, but
is out of date.)  The 'a' partition is usually opened first so the error
messages are usually turned off.

The patchkit-0.2.4 version never turns on the DKFL_QUIET flag, so the
error messages are always turned on for all partitions.

The patch for the patchkit-0.2.4 version always turns on the DKFL_QUIET
flag, so the error messages are always turned off.

I prefer getting an error message for all errors.  The 0.2.4 version
can be salvaged by not setting errno after reading the disk label fails
iff the partition being opened is the raw partition.

Ignoring the error like the other versions do is completely wrong.  At
best the unititialized copy of the disklabel contains harmless data.
-- 
Bruce Evans  bde@kralizec.zeta.org.au