tech-kern archive

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

Re: How to make character devices in non spec-fs file systems



On Thursday 29 October 2009 06:51:54 David Holland wrote:
> On Wed, Oct 28, 2009 at 10:09:24AM +0100, Hans Petter Selasky wrote:
>  > As some of you might now, I have a devfs port from FreeBSD. This
>  > code does no longer work under NetBSD 5.0 because there are hooks
>  > in the kernel file system code for VREG to do special things which
>  > does not apply? How do I get around this? Using VFIFO for my
>  > character devices?
>
> Eh? I don't understand. Your character devices should be VCHR.

Yes, but if I do that, the VFS code in the kernel will call specfs functions 
on my vnode, because there are hardcoded checks like:

        if (vn->v_type == VCHR)
                call into specfs code(vn);

And because my vnode is not initialised by specfs, it panics. I am not using 
specfs for my character device. I am using a separately mounted filesystem 
called "FreeBSD devfs".

--HPS


Home | Main Index | Thread Index | Old Index