Re: Checking if a file exists from the kernel
Re: Checking if a file exists from the kernel
- Subject: Re: Checking if a file exists from the kernel
- From: Shantonu Sen <email@hidden>
- Date: Wed, 5 Dec 2007 15:51:41 -0800
I'm not sure how post-mortem analysis really helps. What is your
workaround that you would use? Not use a nested devfs node? You should
do that all the time if that's the case and you have that code working.
Depending on what kind of driver you are, you should keep in mind that
it may not even be possible use the VFS KPI to access your devfs node
by path. You can publish devfs nodes any time after the VFS subsystem
has initialized, however you can only do lookups of /dev/foo after the
root filesystem has mounted, and only then after the kernel has
mounted devfs on /dev. If you are a kext loaded into the kernelcache,
you may be probed and started far before this.
Shantonu Sen
email@hidden
Sent from my Mac Pro
On Dec 5, 2007, at 3:42 PM, Terry Lambert wrote:
Alternately, use the darwin version which was discussed last wee to
decide how you are going to code your code.
-- Terry
On Dec 5, 2007, at 12:04 PM, mm w wrote:
nm -pg /mach_kernel | grep VNOP
Cheers!
-mmw
On Dec 5, 2007 10:41 AM, David Rose <email@hidden> wrote:
Hi,
I would like to know if it is possible to check if a file exists
from a kernel
extension. The reason I am interested in doing this is because I am
creating a device in the /dev directory. Under Tiger this works
fine, but in
Leopard my device name is truncated at the / using the
devfs_make_node function.
Calling devfs_make_node with the path "direct/file" results in the
node "/dev/direc/file" being created on Leopard and "/dev/direct/
file"
on Tiger. I would then like to check for the existence of /dev/
direct so
that I know If I have to code for a work around in my driver.
The open or stat call does not seem to be available to my kernel
extension.
Thanks,
David Rose
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
_______________________________________________
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
--
echo zapydapntpd.rxltw@nzx | tr a-z@. p-za-o.@
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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