Why can't I do "mknod /dev/cdev c 32 0"

cm c beatlelittle at yahoo.com.cn
Wed Dec 1 18:42:13 PST 2004


The output of 'uname -a' is:
    FreeBSD .itc.inventec 5.1-RELEASE FreeBSD 5.1-RELEASE #0: Thu Jun  5 02:55:42 GMT 2003     root at wv1u.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC  i386
 
It's 5.x, but if the node is created automatically, how do I use open? I mean, under linux, user space processes need do 'open("/dev/cdev") before do other things, can /dev/cdev be created automatically? I don't think so.

Brian Bobowski <bbobowski at cogeco.ca> wrote:
cm c wrote:

>I'm a newbie to freebsd. I'm trying to port a simple driver to freebsd, but something stopped me. I tried to use the /usr/share/examples to have a test, but mknod failed :
> mknod /dev/cdev c 32 0
>even the make_dev call will cause system rebooting!
> 
>I don't know why.
>Who can help me?
>thanks.
> 
>
If you are using FreeBSD 5.x, the devfs makes mknod irrelevant; device
nodes are created automatically. That's all I know on the subject.

The gurus(which I am not) will probably need more information to help
you at all; the output of "uname -a" is standard. Information about what
you're trying to port will likely be key as well.

-BB
_______________________________________________
freebsd-questions at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"



---------------------------------
Do You Yahoo!?
×¢²áÊÀ½çÒ»Á÷Æ·ÖʵÄÑÅ»¢Ãâ·ÑµçÓÊ


More information about the freebsd-questions mailing list