Subject: RE: bin/36609: Fix {fdisk,disklabel}(8) device path parsing
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: De Zeurkous <zeurkous@nichten.info>
List: netbsd-bugs
Date: 07/05/2007 21:15:10
The following reply was made to PR bin/36609; it has been noted by GNATS.

From: "De Zeurkous" <zeurkous@nichten.info>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: RE: bin/36609: Fix {fdisk,disklabel}(8) device path parsing
Date: Thu, 5 Jul 2007 21:11:12 -0000 (UTC)

 On Thu, July 5, 2007 20:55, Christos Zoulas wrote:
 > The following reply was made to PR bin/36609; it has been noted by GNATS.
 >
 > From: christos@zoulas.com (Christos Zoulas)
 > To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org,
 > 	netbsd-bugs@netbsd.org
 > Cc:
 > Subject: Re: bin/36609: Fix {fdisk,disklabel}(8) device path parsing
 > Date: Thu, 5 Jul 2007 16:51:01 -0400
 >
 >  On Jul 5,  8:45pm, zeurkous@nichten.info (zeurkous@nichten.info) wrote:
 >  -- Subject: bin/36609: Fix {fdisk,disklabel}(8) device path parsing
 >
 >[snip]
 >
 >  Although what you proposed satisfies POLA, it is un-unix-like to parse
 > and
 >  treat filenames specially, when filenames are accepted. Here the mistake
 >  was made when for convenience wd2 was magically rewritten to
 > /dev/rwd2{c,d}.
 
 Actually, I like this behavior. Besides, we better look beyond UNIX or
 it'll never evolve :)
 
 >  We could even do one better and stat the file to see if it is a
 > directory,
 >  and then auto-process the device file...
 
 Hmm, I should have been a bit more clear -- the fact that it was a
 directory is irrelevant to the problem.
 
 > I am not sure I like all this
 >  magic though; at least it is centralized in opendisk(3).
 
 Personally, since tools like disklabel(8) are pretty low-level (they play
 a vital role in making the disk adressable in luserspace), I parse it as
 addressing the device itself instead of the node. That's why it makes
 sense to me.
 
 --De Zeurkous.
 
 >
 >  christos
 >
 >