devfs
[Top] [All Lists]

devfs and raw devices again

To: devfs@xxxxxxxxxxx
Subject: devfs and raw devices again
From: jurgen@xxxxxxxx
Date: Mon, 27 May 2002 12:39:21 -0700
Sender: owner-devfs@xxxxxxxxxxx
I took a look at a couple of the patches that are floating around
to make raw devices work with devfs, and I found them all a bit
unsatisfying.  The problem is that they pre-generate a fixed
number of raw device files in devfs which don't actually do anything
until they are bound.  It seems to me that it would be much more
devfs-ish to just create the control device initially and then
generate raw device files as needed.  This is possible, but would 
require some minor changes to the 'raw' utility.

Here's how I think it should work... initially we just have...

  /dev/raw/ctl

To bind a raw device  for i.e. /dev/scsi/.../part2 you just do...

  $ raw /dev/scsi/.../part2
  /dev/raw/1

 ..the raw utility prints the name of the raw device it has bound,
which now appears in devfs.  In addition devfs now has symlinks...

  /dev/scsi/.../rpart2 -> /dev/raw/1
  /dev/discs/disc0/rpart2 -> /dev/raw/1

 ..etc.  Comments?

:j




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