tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: raid1: unable to open device, error = 16



On Thu, 26 Jul 2012, matthew green wrote:
library functions like
opendisk() will look for a file-path of the given name before
trying other names.  that tends to make them use the block
dev when you want the char dev.  eg, compare the ktrace for
"newfs raid1d" when you are in/not in /dev.

I think that opendisk should do something like this:

   if (path contains a slash) {
       use specified path, do not search in any way
   } else {
       try /dev/[r]foo
       try /dev/[r]fooX, where X is "c" or "d" depending on kern.rawpartition
   }

If the user wants to open a file in the cwd, then let the
user pass "./foo" instead of "foo" to opendisk.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index