Re: Newbie question - missing vop* structures/functions in sys/vnode.h on 10.4
Re: Newbie question - missing vop* structures/functions in sys/vnode.h on 10.4
- Subject: Re: Newbie question - missing vop* structures/functions in sys/vnode.h on 10.4
- From: Michael Smith <email@hidden>
- Date: Wed, 6 Jun 2007 23:00:59 -0700
On Jun 6, 2007, at 9:34 PM, Ratheesh Ramachandran wrote:
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.
= Mike
_______________________________________________
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