Re: Newbie question - missing vop* structures/functions in sys/vnode.h on 10.4
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Jun 6, 2007, at 9:34 PM, Ratheesh Ramachandran wrote: = Mike _______________________________________________ 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... So, are the vop*s now to be replaced by vnop*s ? The vnop* functions seem to require an additional argument -- vfs_context_t. Is there a sample for the new usage available somewhere ? As a general rule, you should not be calling the VNOP interfaces directly. Use the KPI interfaces in <sys/vnode.h> to operate on vnode_t's. The vfs_context_t encapsulates the identity and credential of the client of an operation. Typically you will be supplied with one by a higher layer in the kernel; if you don't have one *AND* the operation you are performing is on behalf of the current process, you can obtain one with vfs_context_create(NULL) - you must release it with vfs_context_rele() when you are done. Please note that the VFS KPI changes significantly in 10.4; you will not be able to just replace one set of calls with another - your code will probably require more in-depth changes, especially if you were doing file I/O by making direct VFS calls. This email sent to site_archiver@lists.apple.com
participants (1)
-
Michael Smith