Subject: Re: vnconfig is broken (was: vnd is broken?)
To: None <>
From: Rui Paulo <>
List: current-users
Date: 05/10/2005 22:29:10
On 2005-05-10, Steven M. Bellovin <> wrote:
> In message <>, Peter Seebach writ
> es:
>>>Make sure you don't have a file called vnd0 or vnd0d in the current directory
>>This seems sorta crazy.  I would assume that the sane default would be to
>>assume that I want a device, and the system knows where devices come from.
>>Having vnconfig check . is like having the shell check for a file called
>>"./stdout" if I type "2>&1".  If I want to specify a file in the current
>>directory, I can.
>>This behavior makes the by-far-most-common case unpredictable.  That seems
>>bad.  The Principle of Least Astonishment dictates that devices should be
>>taken from /dev by default.
> More to the point -- what is the namespace for the argument? 

From the manpage:


           vnconfig vnd0 /tmp/diskimage
           vnconfig /dev/rvnd0c /tmp/diskimage

     Configures the vnode disk vnd0.  Please note that use of the second form
     of the command is discouraged because it requires knowledge of the raw
     partition which varies between architectures.


I find useful to get the second argument for -c from the CWD, but not the
first argument. If I really want it to choose a device not in /dev, I would
use a full path. Another approach is: if 'vnd??' is specified for the first
argument, check /dev first and if the file doesn't exists, check for it in
the CWD.

Rui Paulo <>