Subject: Re: Disklabel's bug ? (or feature ?)
To: None <tech-userlevel@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 06/27/2006 00:45:20
> Now, opendisk() works as follow: it tries to open the path given by
> disklabel, if it fails, it tries to open the path with the rawpart
> appended, if it fails again, it will try (after check) to concatenate
> "/dev/" + the path , and finally, "/dev/" + the path + 'X' [1]
> What I propose is to check that file opened under '/dev' are *really*
> device file. I don't see any reason to have a regular file named
> 'sd0' under /dev, except manipulation mistake, which could be avoided
> by adding the extra check.
Neither do I, but I'm not about to say there is none.
How about what you said, but only when opendisk() was responsible for
adding the /dev? That is, if the path provided begins with /dev, the
check is not done, but when opendisk() provides it, it is?
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B