Re: argument defs for vnode scope callbacks
Re: argument defs for vnode scope callbacks
- Subject: Re: argument defs for vnode scope callbacks
- From: John Dalgliesh <email@hidden>
- Date: Wed, 11 May 2005 21:29:27 +1000 (EST)
Hi, I didn't see a reply to this one yet, so here's my attempt...
On Tue, 10 May 2005, Nicolas Berloquin wrote:
>
> I then tried to get some attributes from the vp vnode, but I got
> instant-KP out of it :
>
> struct vnode_attr vap;
> int err = vnode_getattr(vp, &vap, ctx);
>
> any suggestions are welcome.
The vnode_attr thingy must first be initialised, and then told what you
want to get out of it.
e.g. if you were interested in the size of the data fork, you'd do this:
struct vnode_attr vap;
VATTR_INIT( &vap );
VATTR_WANTED( &vap, va_data_size );
int err = vnode_getattr( vp, &vap, ctx );
There are many other things you can use with VATTR_WANTED.
Hope that helps!
{P^/
_______________________________________________
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