Re: Checking if a file exists from the kernel
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Shantonu Sen ssen@apple.com Sent from my Mac Pro On Dec 5, 2007, at 3:42 PM, Terry Lambert wrote: -- Terry nm -pg /mach_kernel | grep VNOP Cheers! -mmw Hi, Thanks, David Rose _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/openspecies%40gmail.com This email sent to openspecies@gmail.com -- 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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/tlambert%40apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/ssen%40apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... 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. Alternately, use the darwin version which was discussed last wee to decide how you are going to code your code. On Dec 5, 2007, at 12:04 PM, mm w wrote: On Dec 5, 2007 10:41 AM, David Rose <david.rose43@yahoo.com> wrote: 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. ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ This email sent to tlambert@apple.com This email sent to ssen@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Shantonu Sen