devfs_make_node() bug in 9.0.0d8
devfs_make_node() bug in 9.0.0d8
- Subject: devfs_make_node() bug in 9.0.0d8
- From: Nick Blievers <email@hidden>
- Date: Wed, 16 May 2007 15:28:47 +0800
Hi,
I noticed something while porting our driver to leopard today. It seems
that devfs_make_node() is truncating characters from the fmt specifier
when creating subdirectories. Eg if I make a call:
devfs_hdl = devfs_make_node(dev, DEVFS_CHAR, 0, 0, 0777, "%sxvm/%s",
prefix, edgename);
What I end up with is:
/dev/xv/<edgename>
A much simpler test for what (i assume) is the same problem can be
illustrated here:
: [cxfsmac11{cxfs-dev}]kern ; sudo ln -s /dev/xv /dev/xvm
: [cxfsmac11{cxfs-dev}]kern ; ls -la /dev/xvm
lrwxr-xr-x 1 root wheel 0 May 16 16:58 /dev/xvm -> /dev/x
Note that the link points to /dev/x rather than /dev/xv as the command
line suggested. Adding a bogus extra character does actually work in
creating the correct link.
Hope this helps,
Nick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden