netbsd-bugs@netbsd.org
[Top] [All Lists]

RE: bin/36609: Fix {fdisk,disklabel}(8) device path parsing

Subject: RE: bin/36609: Fix {fdisk,disklabel}(8) device path parsing
From: "De Zeurkous"
Date: Thu, 05 Jul 2007 21:15:22 UTC
Newsgroups: fa.netbsd.bugs

The following reply was made to PR bin/36609; it has been noted by GNATS.

From: "De Zeurkous" <zeurkous@xxxxxxxxxxxx>
To: gnats-bugs@xxxxxxxxxx
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@xxxxxxxxxx (Christos Zoulas)
 > To: gnats-bugs@xxxxxxxxxx, gnats-admin@xxxxxxxxxx,
 >      netbsd-bugs@xxxxxxxxxx
 > 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@xxxxxxxxxxxx (zeurkous@xxxxxxxxxxxx) 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
 >
 >
 

<Prev in Thread] Current Thread [Next in Thread>